Skip to content

Frequency literals

Compare
Choose a tag to compare
@luni64 luni64 released this 17 Oct 13:37
· 69 commits to master since this release
af3065e

Just a quick update to add frequency literals to the list of possible arguments for the begin() functions of periodic timers. (Please note the required underscore prefix to the literals)

timer.begin(isr, 100_kHz);       // instead of      10 (µs)
timer.begin(isr, 0.25_MHz);      // instead of       4 (µs)
timer.begin(isr, 5_kHz + 10_Hz); // instead of 100'200 (µs)