mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 12:51:24 +01:00
STM32 fix inverted pin mode
This commit is contained in:
parent
d367f5dc81
commit
7b77d4ce1e
@ -413,11 +413,9 @@ void MotorDriver::throttleInrush(bool on) {
|
||||
// registered the pin in the pin to channel array
|
||||
}
|
||||
#elif defined(ARDUINO_ARCH_STM32)
|
||||
if (invertBrake)
|
||||
duty = 255-duty;
|
||||
if(on) {
|
||||
DCCTimer::DCCEXanalogWriteFrequency(brakePin, 7); // 7 means max
|
||||
DCCTimer::DCCEXanalogWrite(brakePin,duty);
|
||||
DCCTimer::DCCEXanalogWrite(brakePin,duty,invertBrake);
|
||||
} else {
|
||||
pinMode(brakePin, OUTPUT);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user