Sfoglia il codice sorgente

tone() minimum frequency is 1 Hz

teensy4-core
PaulStoffregen 7 anni fa
parent
commit
bb72c33d14
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. +1
    -0
      teensy3/Tone.cpp

+ 1
- 0
teensy3/Tone.cpp Vedi File

@@ -73,6 +73,7 @@ void tone(uint8_t pin, uint16_t frequency, uint32_t duration)
} else {
count = 0xFFFFFFFD;
}
if (frequency < 1) frequency = 1; // minimum is 1 Hz
usec = (float)500000.0 / (float)frequency;
config = portConfigRegister(pin);


Loading…
Annulla
Salva