This website works better with JavaScript.
Home
Explore
Help
Sign In
visus
/
teensy-core-4.1
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
tone() minimum frequency is 1 Hz
teensy4-core
PaulStoffregen
7 years ago
parent
1cf5d3bbef
commit
bb72c33d14
1 changed files
with
1 additions
and
0 deletions
Split View
Show Diff Stats
+1
-0
teensy3/Tone.cpp
+ 1
- 0
teensy3/Tone.cpp
View 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);
Write
Preview
Loading…
Cancel
Save