Skip to content

Commit

Permalink
pico: reserve scanvideo SMs
Browse files Browse the repository at this point in the history
  • Loading branch information
Daft-Freak committed Feb 26, 2023
1 parent dd36885 commit 6d82590
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions 32blit-pico/display_scanvideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ void init_display() {
// channel 0 get claimed later, channel 3 doesn't get claimed, but does get used
// reserve them so out claims don't conflict
dma_claim_mask(1 << 0 | 1 << 3);

// PIO SMs that get claimed later
pio_claim_sm_mask(pio0, 1 << 0 | 1 << 3);
}

void update_display(uint32_t time) {
Expand All @@ -60,6 +63,8 @@ void update_display(uint32_t time) {

void init_display_core1() {
dma_unclaim_mask(1 << 0 | 1 << 3);
pio_sm_unclaim(pio0, 0);
pio_sm_unclaim(pio0, 3);

// no mode switching yet
#if ALLOW_HIRES
Expand Down

0 comments on commit 6d82590

Please sign in to comment.