1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 14:55:21 +03:00

Rework Fast PWM protocol configuration and timing

This commit is contained in:
borisbstyle 2016-05-07 00:51:25 +02:00
parent c74c5df73d
commit 9e5c5e88c7
12 changed files with 67 additions and 77 deletions

View file

@ -36,9 +36,11 @@
#define MAX_INPUTS 8
#define PWM_TIMER_MHZ 1
#define ONESHOT_TIMER_MHZ 24
#define PWM_BRUSHED_TIMER_MHZ 8
#define MULTISHOT_TIMER_MHZ 12
#define ONESHOT42_TIMER_MHZ 24
#define ONESHOT125_TIMER_MHZ 8
typedef struct sonarGPIOConfig_s {
GPIO_TypeDef *gpio;
@ -59,9 +61,8 @@ typedef struct drv_pwm_config_s {
bool useUART3;
#endif
bool useVbat;
bool useOneshot;
bool useOneshot42;
bool useMultiShot;
bool useFastPwm;
bool useUnsyncedPwm;
bool useSoftSerial;
bool useLEDStrip;
#ifdef SONAR
@ -70,6 +71,7 @@ typedef struct drv_pwm_config_s {
#ifdef USE_SERVOS
bool useServos;
bool useChannelForwarding; // configure additional channels as servos
uint8_t fastPwmProtocolType;
uint16_t servoPwmRate;
uint16_t servoCenterPulse;
#endif