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

Initial preparation for cleaning up multiple files per MCU (#2500)

* Initial preparation for cleaning up multiple files per MCU

* Combined DSHOT for F3 and F4 (F7 todo)

* Build fixes (mixed some adjustments needed in transponder_ir.c)

* Fix F7 warnings/bugs

* Updated timer periods for transponder.

Fixed FURY including old pwm_output files.

* Added method to calculate prescaler and period on the fly for varying clock speeds.

This can be used for overclocking :)

* Consolidated led_strip

* Moved led strip to use system clock for timing (allowing overclocking)

* Fixed incorrect channel, and removed comparison warning.

* More cleanup

* Fix KIWIF4 target

* Cleaned up target.mk files
This commit is contained in:
J Blackman 2017-03-02 06:50:23 +11:00 committed by Martin Budden
parent 67ac6dfefa
commit 792941606f
30 changed files with 204 additions and 653 deletions

View file

@ -97,10 +97,10 @@ typedef struct timerHardware_s {
#endif
#if defined(USE_DSHOT) || defined(LED_STRIP)
#if defined(STM32F4) || defined(STM32F7)
DMA_Stream_TypeDef *dmaStream;
DMA_Stream_TypeDef *dmaRef;
uint32_t dmaChannel;
#elif defined(STM32F3) || defined(STM32F1)
DMA_Channel_TypeDef *dmaChannel;
DMA_Channel_TypeDef *dmaRef;
#endif
uint8_t dmaIrqHandler;
#endif
@ -197,3 +197,6 @@ void timerOCPreloadConfig(TIM_TypeDef *tim, uint8_t channel, uint16_t preload);
volatile timCCR_t *timerCCR(TIM_TypeDef *tim, uint8_t channel);
uint16_t timerDmaSource(uint8_t channel);
uint16_t timerGetPrescalerByDesiredMhz(TIM_TypeDef *tim, uint16_t mhz);
uint16_t timerGetPeriodByPrescaler(TIM_TypeDef *tim, uint16_t prescaler, uint32_t hertz);