mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +03:00
CC3D - Add sonar.
This also ensures that the PWM mapping does not use the sonar pins when sonar is enabled in a board agnostic way. Conflicts: src/main/config/config.c src/main/drivers/pwm_mapping.h src/main/main.c src/main/target/CC3D/target.h
This commit is contained in:
parent
a370d60595
commit
4ed6fdfea5
13 changed files with 91 additions and 34 deletions
|
@ -36,6 +36,12 @@
|
|||
#define PWM_TIMER_MHZ 1
|
||||
#define ONESHOT125_TIMER_MHZ 8
|
||||
|
||||
typedef struct sonarGPIOConfig_s {
|
||||
GPIO_TypeDef *gpio;
|
||||
uint16_t triggerPin;
|
||||
uint16_t echoPin;
|
||||
} sonarGPIOConfig_t;
|
||||
|
||||
typedef struct drv_pwm_config_t {
|
||||
bool useParallelPWM;
|
||||
bool usePPM;
|
||||
|
@ -65,6 +71,7 @@ typedef struct drv_pwm_config_t {
|
|||
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;
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue