Fixes and improvements for PWM pins (#13383)

This commit is contained in:
Scott Lahteine
2019-03-13 06:51:15 -05:00
committed by GitHub
parent 87162658c4
commit f89b375fb9
26 changed files with 196 additions and 193 deletions

View File

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