File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -234,6 +234,7 @@ if(PCBREV STREQUAL NB4P)
234234endif ()
235235
236236if (USE_VS1053B)
237+ add_definitions (-DUSE_VS1053B )
237238 target_sources (board PRIVATE targets/common/arm/stm32/vs1053b.cpp )
238239else ()
239240 target_sources (board PRIVATE targets/common/arm/stm32/audio_dac_driver.cpp )
Original file line number Diff line number Diff line change 212212#define TELEMETRY_DMA_TX_Stream_IRQ DMA1_Stream6_IRQn
213213#define TELEMETRY_DMA_TX_IRQHandler DMA1_Stream6_IRQHandler
214214#define TELEMETRY_DMA_TX_FLAG_TC DMA_IT_TCIF6
215- // #define TELEMETRY_DMA_Stream_RX LL_DMA_STREAM_5
216- // #define TELEMETRY_DMA_Channel_RX LL_DMA_CHANNEL_4
215+ #if defined(USE_VS1053B )
216+ // RX DMA can only be enabled when DAC audio is not used,
217+ // as it would conflict with the DAC audio DMA (DMA1 Stream 5)
218+ #define TELEMETRY_DMA_Stream_RX LL_DMA_STREAM_5
219+ #define TELEMETRY_DMA_Channel_RX LL_DMA_CHANNEL_4
220+ #endif
217221#define TELEMETRY_USART_IRQHandler USART2_IRQHandler
218222
219223#define TELEMETRY_DIR_OUTPUT () TELEMETRY_DIR_GPIO->BSRRH = TELEMETRY_DIR_GPIO_PIN
326330#define SDRAM_RCC_AHB3Periph RCC_AHB3Periph_FMC
327331
328332// Audio
329- #if defined(RADIO_NV14_FAMILY ) || defined( RADIO_PL18U )
333+ #if defined(USE_VS1053B )
330334 #define AUDIO_XDCS_GPIO GPIO_PIN(GPIOH, 14) // PH.14
331335 #define AUDIO_CS_GPIO GPIO_PIN(GPIOH, 13) // PH.13
332336 #define AUDIO_DREQ_GPIO GPIO_PIN(GPIOH, 15) // PH.15
You can’t perform that action at this time.
0 commit comments