mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Tone limit 20KHz (#7179)
Set Tone maximum frequency to 20KHz (was 5KHz)
This commit is contained in:
parent
483bfde885
commit
c548958f6e
@ -35,8 +35,8 @@ static void _startTone(uint8_t _pin, uint32_t high, uint32_t low, unsigned long
|
||||
|
||||
pinMode(_pin, OUTPUT);
|
||||
|
||||
high = std::max(high, (uint32_t)100);
|
||||
low = std::max(low, (uint32_t)100);
|
||||
high = std::max(high, (uint32_t)25); // new 20KHz maximum tone frequency,
|
||||
low = std::max(low, (uint32_t)25); // (25us high + 25us low period = 20KHz)
|
||||
|
||||
if (startWaveform(_pin, high, low, (uint32_t) duration * 1000)) {
|
||||
_toneMap |= 1 << _pin;
|
||||
|
Loading…
x
Reference in New Issue
Block a user