Open jsseng opened 9 years ago
Where is delay_ms defined? How is delay_ms different than _delay_ms?
_delay_ms() is a built in macro that require a constant as an argument.
delay_ms() is something I haven't written yet, but it would just call _delay_ms() in a loop.
Oh, so that's how you could do that. I was wondering how to implement delay_ms.
The built in _delay_ms() function only takes a constant as an argument. When a variable is passed to sleep:
then instead generate:
This should call our own delay_ms() instead of the built in _delay_ms(). Do this only when a variable is the argument, otherwise call _delay_ms().