1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

F4 Dshot-DMAR initial working version

This commit is contained in:
jflyper 2017-12-23 02:52:01 +09:00
parent 5594a5c5b9
commit 759e03c47e
8 changed files with 220 additions and 52 deletions

View file

@ -109,9 +109,14 @@ typedef enum {
typedef struct {
TIM_TypeDef *timer;
uint16_t timerDmaSources;
#ifdef USE_DSHOT_DMAR
#if defined(USE_DSHOT_DMAR)
#if !defined(USE_HAL_DRIVER)
DMA_Stream_TypeDef *dmaBurstRef;
uint16_t dmaBurstLength;
#endif
uint32_t dmaBurstBuffer[DSHOT_DMA_BUFFER_SIZE * 4];
#else
uint16_t timerDmaSources;
#endif
} motorDmaTimer_t;
@ -119,7 +124,9 @@ typedef struct {
ioTag_t ioTag;
const timerHardware_t *timerHardware;
uint16_t value;
#if !defined(USE_DSHOT_DMAR)
uint16_t timerDmaSource;
#endif
motorDmaTimer_t *timer;
volatile bool requestTelemetry;
#if defined(STM32F3) || defined(STM32F4) || defined(STM32F7)
@ -127,11 +134,10 @@ typedef struct {
#else
uint8_t dmaBuffer[DSHOT_DMA_BUFFER_SIZE];
#endif
#if defined(STM32F7)
#if defined(USE_HAL_DRIVER)
TIM_HandleTypeDef TimHandle;
DMA_HandleTypeDef hdma_tim;
uint16_t timerDmaIndex;
uint8_t timerIndex;
#endif
} motorDmaOutput_t;