fix(pl18): telemetry RX DMA can be enabled for non-DAC audio radios#7417
Open
richardclli wants to merge 4 commits into
Open
fix(pl18): telemetry RX DMA can be enabled for non-DAC audio radios#7417richardclli wants to merge 4 commits into
richardclli wants to merge 4 commits into
Conversation
📝 WalkthroughWalkthroughHardware-specific VS1053B audio configuration and telemetry DMA macros are now conditionally compiled using the ChangesVS1053B Feature Flag Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Member
|
@richardclli what about something like that: diff --git a/radio/src/targets/pl18/CMakeLists.txt b/radio/src/targets/pl18/CMakeLists.txt
index f33a4ce130..83ee579f47 100644
--- a/radio/src/targets/pl18/CMakeLists.txt
+++ b/radio/src/targets/pl18/CMakeLists.txt
@@ -235,6 +235,7 @@ endif()
if(USE_VS1053B)
target_sources(board PRIVATE targets/common/arm/stm32/vs1053b.cpp)
+ add_definitions(-DUSE_VS1053B)
else()
target_sources(board PRIVATE targets/common/arm/stm32/audio_dac_driver.cpp)
add_definitions(-DSOFTWARE_VOLUME)
diff --git a/radio/src/targets/pl18/hal.h b/radio/src/targets/pl18/hal.h
index 8e5961845a..3b453937e6 100644
--- a/radio/src/targets/pl18/hal.h
+++ b/radio/src/targets/pl18/hal.h
@@ -212,9 +212,9 @@
#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
-#if defined(RADIO_NV14_FAMILY) || defined(RADIO_PL18U)
+#if defined(USE_VS1053B)
// RX DMA can only be enabled when DAC audio is not used,
-// having DMA conflict with DAC audio
+// 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
@@ -330,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 |
Member
Author
|
Commit your changes to my branch, it is in origin repository |
Member
Author
|
I already amend the requested changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes:
Enable RX DMA for S.Port if non-DAC audio is used
Summary by CodeRabbit