1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00

Initial implementation of DSHOT protocol (600 and 150)

This commit is contained in:
blckmn 2016-10-13 22:03:37 +11:00
parent 7db9b9cbc7
commit 4e529642d1
22 changed files with 637 additions and 100 deletions

View file

@ -80,6 +80,15 @@ typedef struct timerHardware_s {
#if defined(STM32F3) || defined(STM32F4)
uint8_t alternateFunction;
#endif
#if defined(USE_DSHOT)
#if defined(STM32F4)
DMA_Stream_TypeDef *dmaStream;
uint32_t dmaChannel;
#elif defined(STM32F3)
DMA_Channel_TypeDef *dmaChannel;
#endif
uint8_t dmaIrqHandler;
#endif
} timerHardware_t;
typedef enum {
@ -149,6 +158,8 @@ void timerInit(void);
void timerStart(void);
void timerForceOverflow(TIM_TypeDef *tim);
uint8_t timerClockDivisor(TIM_TypeDef *tim);
void configTimeBase(TIM_TypeDef *tim, uint16_t period, uint8_t mhz); // TODO - just for migration
rccPeriphTag_t timerRCC(TIM_TypeDef *tim);