mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-07-28 18:03:45 +02:00
ESP32 rewrite PWM LEDC to use pin mux
This commit is contained in:
@@ -411,10 +411,10 @@ void MotorDriver::throttleInrush(bool on) {
|
||||
duty = 255-duty;
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
if(on) {
|
||||
DCCTimer::DCCEXanalogWrite(brakePin,duty);
|
||||
DCCTimer::DCCEXanalogWriteFrequency(brakePin, 7); // 7 means max
|
||||
DCCTimer::DCCEXInrushControlOn(brakePin);
|
||||
} else {
|
||||
ledcDetachPin(brakePin);
|
||||
ledcDetachPin(brakePin); // not DCCTimer::DCCEXledcDetachPin() as we have not
|
||||
// registered the pin in the pin to channel array
|
||||
}
|
||||
#elif defined(ARDUINO_ARCH_STM32)
|
||||
if(on) {
|
||||
|
Reference in New Issue
Block a user