No patch needed for non-libmaple analogWrite

See https://github.com/pinchies/Marlin/pull/1#issuecomment-471388743
This commit is contained in:
Scott Lahteine
2019-03-13 07:21:10 -05:00
parent f89b375fb9
commit 67bee06e43
21 changed files with 15 additions and 36 deletions

View File

@ -70,7 +70,7 @@ void update_case_light() {
#else // !CASE_LIGHT_USE_NEOPIXEL
if (PWM_PIN(CASE_LIGHT_PIN))
ANALOG_WRITE(CASE_LIGHT_PIN, n10ct);
analogWrite(CASE_LIGHT_PIN, n10ct);
else {
const bool s = case_light_on ? !INVERT_CASE_LIGHT : INVERT_CASE_LIGHT;
WRITE(CASE_LIGHT_PIN, s ? HIGH : LOW);

View File

@ -81,7 +81,7 @@ void controllerfan_update() {
// allows digital or PWM fan output to be used (see M42 handling)
WRITE(CONTROLLER_FAN_PIN, speed);
ANALOG_WRITE(CONTROLLER_FAN_PIN, speed);
analogWrite(CONTROLLER_FAN_PIN, speed);
}
}

View File

@ -112,7 +112,7 @@ void LEDLights::set_color(const LEDColor &incol
// This variant uses 3-4 separate pins for the RGB(W) components.
// If the pins can do PWM then their intensity will be set.
#define UPDATE_RGBW(C,c) do{ if (PWM_PIN(RGB_LED_##C##_PIN)) ANALOG_WRITE(RGB_LED_##C##_PIN, incol.r); else WRITE(RGB_LED_##C##_PIN, incol.c ? HIGH : LOW); }while(0)
#define UPDATE_RGBW(C,c) do{ if (PWM_PIN(RGB_LED_##C##_PIN)) analogWrite(RGB_LED_##C##_PIN, incol.r); else WRITE(RGB_LED_##C##_PIN, incol.c ? HIGH : LOW); }while(0)
UPDATE_RGBW(R,r);
UPDATE_RGBW(G,g);
UPDATE_RGBW(B,b);