mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Disambiguate MAX_MOTORS and MAX_SUPPORTED_MOTORS
Achieved by renaming MAX_MOTORS to MAX_PWM_MOTORS Disambiguate MAX_MOTORS and MAX_SUPPORTED_SERVOS Achieved by renaming MAX_SERVOS to MAX_PWM_SERVOS It now shows there is a dependency on the pwm driver if MAX_PWM_* is used. Coupled pwm_common and timer_common by using USABLE_TIMER_CHANNEL_COUNT since the current pwm driver and timer driver is only usable by the STM32F103.
This commit is contained in:
parent
a5f0999c26
commit
aa84439b21
8 changed files with 25 additions and 24 deletions
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#define MAX_MOTORS 12
|
||||
#define MAX_SERVOS 8
|
||||
#define MAX_INPUTS 8
|
||||
#define MAX_PWM_MOTORS 12
|
||||
#define MAX_PWM_SERVOS 8
|
||||
#define MAX_PPM_AND_PWM_INPUTS 8
|
||||
|
||||
#define PULSE_1MS (1000) // 1ms pulse width
|
||||
|
||||
|
@ -23,7 +23,7 @@ typedef struct drv_pwm_config_t {
|
|||
uint16_t failsafeThreshold;
|
||||
} drv_pwm_config_t;
|
||||
|
||||
// This indexes into the read-only hardware definition structure in drv_pwm.c, as well as into pwmPorts[] structure with dynamic data.
|
||||
// This indexes into the read-only hardware definition structure, timerHardware_t, as well as into pwmPorts structure with dynamic data.
|
||||
enum {
|
||||
PWM1 = 0,
|
||||
PWM2,
|
||||
|
@ -38,8 +38,7 @@ enum {
|
|||
PWM11,
|
||||
PWM12,
|
||||
PWM13,
|
||||
PWM14,
|
||||
MAX_PORTS
|
||||
PWM14
|
||||
};
|
||||
|
||||
void pwmICConfig(TIM_TypeDef *tim, uint8_t channel, uint16_t polarity);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue