|
AVRTools
A Library for the AVR ATmega328 and ATmega2560 Microcontrollers
|
Include this file to use the functions that instantiate and access a system clock that counts elapsed milliseconds. More...
Go to the source code of this file.
Functions | |
| void | initSystemClock () |
| This function initializes a system clock that tracks elapsed milliseconds. | |
| void | delayMicroseconds (unsigned int us) |
| Delay a certain number of microseconds. | |
| void | delayMilliseconds (unsigned long ms) |
| Delay a certain number of milliseconds. | |
| void | delay (unsigned long ms) |
| Delay a certain number of milliseconds. | |
| unsigned long | micros () |
| Return the number of elasped microseconds since the system clock was turned on. | |
| unsigned long | millis () |
| Return the number of elasped milliseconds since the system clock was turned on. | |
Include this file to use the functions that instantiate and access a system clock that counts elapsed milliseconds.
To use these functions, include SystemClock.h in your source code and link against SystemClock.cpp.
|
inline |
Delay a certain number of milliseconds.
This inline function is a synonym for delayMilliseconds(); it is provided for compatibility with the standard Arduino library.
m the number of milliseconds to delay. | void delayMicroseconds | ( | unsigned int | us | ) |
Delay a certain number of microseconds.
us the number of microseconds to delay.| void delayMilliseconds | ( | unsigned long | ms | ) |
Delay a certain number of milliseconds.
m the number of milliseconds to delay. | void initSystemClock | ( | ) |
This function initializes a system clock that tracks elapsed milliseconds.
The system clock uses timer0, so you cannot use timer0 for other functions if you use the system clock functionality.
| unsigned long micros | ( | ) |
Return the number of elasped microseconds since the system clock was turned on.
The microsecond count will overflow back to zero in approximately 70 minutes.
| unsigned long millis | ( | ) |
Return the number of elasped milliseconds since the system clock was turned on.