diff --git a/src/common/pico_audio/include/pico/audio.h b/src/common/pico_audio/include/pico/audio.h index 2059bcc..ffb9e33 100644 --- a/src/common/pico_audio/include/pico/audio.h +++ b/src/common/pico_audio/include/pico/audio.h @@ -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 SPINLOCK_ID_AUDIO_FREE_LIST_LOCK, taking Errata RP2350-E2 and the SDK spin lock IDs into account" +#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 SPINLOCK_ID_AUDIO_PREPARED_LISTS_LOCK, taking Errata RP2350-E2 and the SDK spin lock IDs into account" +#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 diff --git a/src/common/pico_scanvideo/include/pico/scanvideo/scanvideo_base.h b/src/common/pico_scanvideo/include/pico/scanvideo/scanvideo_base.h index 645d0fd..4e7a25d 100644 --- a/src/common/pico_scanvideo/include/pico/scanvideo/scanvideo_base.h +++ b/src/common/pico_scanvideo/include/pico/scanvideo/scanvideo_base.h @@ -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 PICO_SPINLOCK_ID_VIDEO_SCANLINE_LOCK, taking Errata RP2350-E2 and the SDK spin lock IDs into account" +#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 PICO_SPINLOCK_ID_VIDEO_FREE_LIST_LOCK, taking Errata RP2350-E2 and the SDK spin lock IDs into account" +#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 PICO_SPINLOCK_ID_VIDEO_DMA_LOCK, taking Errata RP2350-E2 and the SDK spin lock IDs into account" +#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 PICO_SPINLOCK_ID_VIDEO_IN_USE_LOCK, taking Errata RP2350-E2 and the SDK spin lock IDs into account" +#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)