Commit Graph

8 Commits

Author SHA1 Message Date
Markus Hitter 3dfb8a83bc delay.c: delay_us() and delay_ms() are now calibrated.
See comments in the code for the result.

This also fixes a bug where corner cases like delay(0) or
delay(13107) whould result in an extra long pause.
Note: 65535 / (F_CPU / 4000000) = 13107 on 20 MHz.

This costs 28 bytes binary size.
2015-04-28 13:05:21 +02:00
Markus Hitter a2ce509bed Eliminate _delay(), delay() and _delay_us().
Doesn't change much, even the binary size stays the same. Much
cleaner code though, now we have only delay_us() and delay_ms().
2013-03-24 16:19:24 +01:00
Markus Hitter 1114761bed Eliminate _delay_ms().
Lots of duplicate stuff in delay.c/.h ...
2013-03-24 16:19:23 +01:00
Jim McGee 1059f27592 Clean up delay functions and rename them to be consistent with
what was used before the inline delay approach was attempted.
2011-05-15 09:56:32 +10:00
Michael Moon 7a57b69cc1 fix delay compilation. Takes some of madscifi's ideas yet still provides fallback functions for eg; homing which uses variable delays 2011-05-10 13:55:08 +10:00
Jim McGee 86a34ad5a2 Eliminates overflow in the delayMicrosecondsInterruptible
function.

Inline delay functions and change base function to
use __builtin_avr_delay_cycles(). Generated delays
are at least as long as the requested delay and
compensate for the system clock (based on F_CPU).

Delay functions must be called with constant values.
A compile time error is issued if they are not.

Delay.c removed as it is no longer used.
2011-05-04 20:14:46 -07:00
Michael Moon 0dc7d77885 Massive Doxygen documentation addition
'make doc' then point your browser at doc/html/

Needs plenty of cleanup and polishing, but the main bulk is here

even documents your configuration! ;)
2011-03-22 01:34:36 +11:00
Michael Moon e3d0aa7b62 split delay functions into separate files 2010-10-11 10:12:35 +11:00