Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions radio/src/targets/pl18/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ if(PCBREV STREQUAL NB4P)
endif()

if(USE_VS1053B)
add_definitions(-DUSE_VS1053B)
target_sources(board PRIVATE targets/common/arm/stm32/vs1053b.cpp)
else()
target_sources(board PRIVATE targets/common/arm/stm32/audio_dac_driver.cpp)
Expand Down
10 changes: 7 additions & 3 deletions radio/src/targets/pl18/hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,12 @@
#define TELEMETRY_DMA_TX_Stream_IRQ DMA1_Stream6_IRQn
#define TELEMETRY_DMA_TX_IRQHandler DMA1_Stream6_IRQHandler
#define TELEMETRY_DMA_TX_FLAG_TC DMA_IT_TCIF6
// #define TELEMETRY_DMA_Stream_RX LL_DMA_STREAM_5
// #define TELEMETRY_DMA_Channel_RX LL_DMA_CHANNEL_4
#if defined(USE_VS1053B)
// RX DMA can only be enabled when DAC audio is not used,
// as it would conflict with the DAC audio DMA (DMA1 Stream 5)
#define TELEMETRY_DMA_Stream_RX LL_DMA_STREAM_5
#define TELEMETRY_DMA_Channel_RX LL_DMA_CHANNEL_4
#endif
#define TELEMETRY_USART_IRQHandler USART2_IRQHandler

#define TELEMETRY_DIR_OUTPUT() TELEMETRY_DIR_GPIO->BSRRH = TELEMETRY_DIR_GPIO_PIN
Expand Down Expand Up @@ -326,7 +330,7 @@
#define SDRAM_RCC_AHB3Periph RCC_AHB3Periph_FMC

// Audio
#if defined(RADIO_NV14_FAMILY) || defined(RADIO_PL18U)
#if defined(USE_VS1053B)
#define AUDIO_XDCS_GPIO GPIO_PIN(GPIOH, 14) // PH.14
#define AUDIO_CS_GPIO GPIO_PIN(GPIOH, 13) // PH.13
#define AUDIO_DREQ_GPIO GPIO_PIN(GPIOH, 15) // PH.15
Expand Down