1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-21 23:35:34 +03:00

STM32F4: Drivers

This commit is contained in:
blckmn 2016-06-08 05:37:08 +10:00
parent 96757c18a2
commit 7ca39bbde6
29 changed files with 2082 additions and 282 deletions

View file

@ -59,6 +59,10 @@ typedef struct drv_pwm_config_s {
#endif
#ifdef STM32F303xC
bool useUART3;
#endif
#ifdef STM32F4
bool useUART2;
bool useUART6;
#endif
bool useVbat;
bool useFastPwm;
@ -71,7 +75,6 @@ typedef struct drv_pwm_config_s {
#ifdef USE_SERVOS
bool useServos;
bool useChannelForwarding; // configure additional channels as servos
uint8_t pwmProtocolType;
uint16_t servoPwmRate;
uint16_t servoCenterPulse;
#endif
@ -79,12 +82,19 @@ typedef struct drv_pwm_config_s {
bool useBuzzerP6;
#endif
bool airplane; // fixed wing hardware config, lots of servos etc
uint8_t pwmProtocolType;
uint16_t motorPwmRate;
uint16_t idlePulse; // PWM value to use when initializing the driver. set this to either PULSE_1MS (regular pwm),
// some higher value (used by 3d mode), or 0, for brushed pwm drivers.
sonarGPIOConfig_t *sonarGPIOConfig;
} drv_pwm_config_t;
enum {
MAP_TO_PPM_INPUT = 1,
MAP_TO_PWM_INPUT,
MAP_TO_MOTOR_OUTPUT,
MAP_TO_SERVO_OUTPUT,
};
typedef enum {
PWM_PF_NONE = 0,
@ -129,4 +139,9 @@ enum {
PWM16
};
extern const uint16_t multiPPM[];
extern const uint16_t multiPWM[];
extern const uint16_t airPPM[];
extern const uint16_t airPWM[];
pwmOutputConfiguration_t *pwmGetOutputConfiguration(void);