Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
scanvideo too
  • Loading branch information
will-v-pi authored Sep 10, 2025
commit 2c6e8f4bbba66ede75f09da8e0a750c2985c33f9
16 changes: 16 additions & 0 deletions src/common/pico_scanvideo/include/pico/scanvideo/scanvideo_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,20 +319,36 @@ extern void scanvideo_default_configure_pio(pio_hw_t *pio, uint sm, uint offset,
#endif

#ifndef PICO_SPINLOCK_ID_VIDEO_SCANLINE_LOCK
#if PICO_RP2350 && !PICO_USE_SW_SPIN_LOCKS
#error "When not using software spin locks on RP2350, you must explicitly define the pico-extras spinlock IDs, accounting for Errata E2 and the SDK spin lock IDs"
#else
#define PICO_SPINLOCK_ID_VIDEO_SCANLINE_LOCK 2
#endif
#endif

#ifndef PICO_SPINLOCK_ID_VIDEO_FREE_LIST_LOCK
#if PICO_RP2350 && !PICO_USE_SW_SPIN_LOCKS
#error "When not using software spin locks on RP2350, you must explicitly define the pico-extras spinlock IDs, accounting for Errata E2 and the SDK spin lock IDs"
#else
#define PICO_SPINLOCK_ID_VIDEO_FREE_LIST_LOCK 3
#endif
#endif

#ifndef PICO_SPINLOCK_ID_VIDEO_DMA_LOCK
#if PICO_RP2350 && !PICO_USE_SW_SPIN_LOCKS
#error "When not using software spin locks on RP2350, you must explicitly define the pico-extras spinlock IDs, accounting for Errata E2 and the SDK spin lock IDs"
#else
#define PICO_SPINLOCK_ID_VIDEO_DMA_LOCK 4
#endif
#endif

#ifndef PICO_SPINLOCK_ID_VIDEO_IN_USE_LOCK
#if PICO_RP2350 && !PICO_USE_SW_SPIN_LOCKS
#error "When not using software spin locks on RP2350, you must explicitly define the pico-extras spinlock IDs, accounting for Errata E2 and the SDK spin lock IDs"
#else
#define PICO_SPINLOCK_ID_VIDEO_IN_USE_LOCK 5
#endif
#endif

// note this is not necessarily an absolute gpio pin mask, it is still shifted by PICO_SCANVIDEO_COLOR_PIN_BASE
#define PICO_SCANVIDEO_ALPHA_MASK (1u << PICO_SCANVIDEO_ALPHA_PIN)
Expand Down