mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-12 19:10:32 +03:00
REFACTOR: More platform specific defines moved to platform (#14471)
This commit is contained in:
parent
cb6fc5aabd
commit
f45c5c5355
4 changed files with 17 additions and 7 deletions
|
@ -4680,7 +4680,7 @@ static void cliStatus(const char *cmdName, char *cmdline)
|
|||
|
||||
cliPrintf("MCU %s Clock=%dMHz", getMcuTypeName(), (SystemCoreClock / 1000000));
|
||||
|
||||
#if defined(STM32F4) || defined(STM32G4) || defined(APM32F4)
|
||||
#if PLATFORM_TRAIT_CONFIG_HSE
|
||||
// Only F4 and G4 is capable of switching between HSE/HSI (for now)
|
||||
int sysclkSource = SystemSYSCLKSource();
|
||||
|
||||
|
@ -5402,15 +5402,11 @@ dmaoptEntry_t dmaoptEntryTable[] = {
|
|||
#define DMA_OPT_UI_INDEX(i) ((i) + 1)
|
||||
#define DMA_OPT_STRING_BUFSIZE 5
|
||||
|
||||
#if defined(STM32H7) || defined(STM32G4) || defined(AT32F435)
|
||||
#define DMA_CHANREQ_STRING "Request"
|
||||
#else
|
||||
#if !defined(DMA_CHANREQ_STRING)
|
||||
#define DMA_CHANREQ_STRING "Channel"
|
||||
#endif
|
||||
|
||||
#if defined(STM32F4) || defined(STM32F7) || defined(STM32H7) || defined(APM32F4)
|
||||
#define DMA_STCH_STRING "Stream"
|
||||
#else
|
||||
#if !defined(DMA_STCH_STRING)
|
||||
#define DMA_STCH_STRING "Channel"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -209,4 +209,6 @@
|
|||
#define USB_DP_PIN PA12
|
||||
|
||||
#define FLASH_CONFIG_BUFFER_TYPE uint32_t
|
||||
|
||||
#define DMA_STCH_STRING "Stream"
|
||||
#endif
|
||||
|
|
|
@ -162,3 +162,7 @@ typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
|
|||
#define FLASH_CONFIG_BUFFER_TYPE uint32_t
|
||||
|
||||
#define USB_DP_PIN PA12
|
||||
|
||||
#if defined(AT32F435)
|
||||
#define DMA_CHANREQ_STRING "Request"
|
||||
#endif
|
||||
|
|
|
@ -463,3 +463,11 @@ extern uint8_t _dmaram_end__;
|
|||
#define MCO_SOURCE_COUNT 8
|
||||
#define MCO_DIVIDER_COUNT 5
|
||||
#endif
|
||||
|
||||
#if defined(STM32H7) || defined(STM32G4)
|
||||
#define DMA_CHANREQ_STRING "Request"
|
||||
#endif
|
||||
|
||||
#if defined(STM32F4) || defined(STM32F7) || defined(STM32H7)
|
||||
#define DMA_STCH_STRING "Stream"
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue