ArduinoCore-avr icon indicating copy to clipboard operation
ArduinoCore-avr copied to clipboard

Quick Fix of overflow for larger toggle_count values

Open lookfwd opened this issue 5 months ago • 2 comments

Quick Fix of overflow for larger toggle_count values. Because of the 16-bit int value in many platforms including Uno, the calculation of toggle_count overflows easily. For example with a frequency of 39kHz and a duration of 9ms, you get toggle_count == 112 , which is 1.5ms.

lookfwd avatar Sep 03 '24 01:09 lookfwd