Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
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
8 changes: 8 additions & 0 deletions src/common/pico_audio/include/pico/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,21 @@ extern "C" {

// PICO_CONFIG: SPINLOCK_ID_AUDIO_FREE_LIST_LOCK, Spinlock number for the audio free list, min=0, max=31, default=6, group=audio
#ifndef SPINLOCK_ID_AUDIO_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 SPINLOCK_ID_AUDIO_FREE_LIST_LOCK 6
#endif
#endif

// PICO_CONFIG: SPINLOCK_ID_AUDIO_PREPARED_LISTS_LOCK, Spinlock number for the audio prepared list, min=0, max=31, default=7, group=audio
#ifndef SPINLOCK_ID_AUDIO_PREPARED_LISTS_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 SPINLOCK_ID_AUDIO_PREPARED_LISTS_LOCK 7
#endif
#endif

// PICO_CONFIG: PICO_AUDIO_NOOP, Enable/disable audio by forcing NOOPS, type=bool, default=0, group=audio
#ifndef PICO_AUDIO_NOOP
Expand Down
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