Distinguish between analog/digital auto fans (#13298)

This commit is contained in:
Scott Lahteine
2019-03-05 00:41:31 -06:00
committed by GitHub
parent 2513f6b550
commit 2212da453a
27 changed files with 371 additions and 61 deletions

View File

@@ -42,7 +42,7 @@ void tone(const pin_t _pin, const unsigned int frequency, const unsigned long du
void noTone(const pin_t _pin) {
HAL_timer_disable_interrupt(TONE_TIMER_NUM);
digitalWrite(_pin, LOW);
extDigitalWrite(_pin, LOW);
}
HAL_TONE_TIMER_ISR {
@@ -51,7 +51,7 @@ HAL_TONE_TIMER_ISR {
if (toggles) {
toggles--;
digitalWrite(tone_pin, (pin_state ^= 1));
extDigitalWrite(tone_pin, (pin_state ^= 1));
}
else noTone(tone_pin); // turn off interrupt
}