mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 04:15:44 +03:00
Combined timer output and inverted fields
This commit is contained in:
parent
94f95d6f16
commit
c10129bc50
36 changed files with 402 additions and 403 deletions
|
@ -456,7 +456,7 @@ void timerChConfigOC(const timerHardware_t* timHw, bool outEnable, bool stateHig
|
|||
if(outEnable) {
|
||||
TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_Inactive;
|
||||
TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable;
|
||||
if (timHw->outputInverted) {
|
||||
if (timHw->output & TIMER_OUTPUT_INVERTED) {
|
||||
stateHigh = !stateHigh;
|
||||
}
|
||||
TIM_OCInitStructure.TIM_OCPolarity = stateHigh ? TIM_OCPolarity_High : TIM_OCPolarity_Low;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue