AP_BoardConfig: use polarity for 3.3/5v selection
This commit is contained in:
parent
d283dd7d00
commit
4b047625fc
@ -428,9 +428,9 @@ void AP_BoardConfig::board_setup()
|
|||||||
|
|
||||||
#ifdef HAL_GPIO_PWM_VOLT_PIN
|
#ifdef HAL_GPIO_PWM_VOLT_PIN
|
||||||
if (_pwm_volt_sel == 0) {
|
if (_pwm_volt_sel == 0) {
|
||||||
hal.gpio->write(HAL_GPIO_PWM_VOLT_PIN, 1); //set pin for 3.3V PWM Output
|
hal.gpio->write(HAL_GPIO_PWM_VOLT_PIN, HAL_GPIO_PWM_VOLT_3v3); //set pin for 3.3V PWM Output
|
||||||
} else if (_pwm_volt_sel == 1) {
|
} else if (_pwm_volt_sel == 1) {
|
||||||
hal.gpio->write(HAL_GPIO_PWM_VOLT_PIN, 0); //set pin for 5V PWM Output
|
hal.gpio->write(HAL_GPIO_PWM_VOLT_PIN, !HAL_GPIO_PWM_VOLT_3v3); //set pin for 5V PWM Output
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
board_setup_uart();
|
board_setup_uart();
|
||||||
|
Loading…
Reference in New Issue
Block a user