Defines | |
#define | SIXTEENTH_SECOND 1 |
A sixteenth of a second. | |
#define | EIGTH_SECOND 2 |
An eighth of a second. | |
#define | QUARTER_SECOND 4 |
A quarter of a second. | |
#define | HALF_SECOND 8 |
Half of a second. | |
#define | SECOND 16 |
One second. | |
#define | TWO_SECOND 32 |
Two seconds. | |
#define | FOUR_SECOND 64 |
Four seconds. | |
Functions | |
void | delay_ms (int ms) |
Delay execution for the specified time. | |
void | rtc_init (int prescale_opt, void(*rtc_func)(void)) |
Enable the realtime clock. | |
int | rtc_get (void) |
Get the value of the realtime clock. | |
void | rtc_reset (void) |
Reset the counter of the realtime clock. |
Functions dealing with time.
|
Delay execution for the specified time. Delays for the specified number of milliseconds. The accuracy of this function is unknown.
|
|
Get the value of the realtime clock. Returns the time elapsed in seconds since the last call to rtc_init or rtc_reset.
|
|
Enable the realtime clock. Initializes the real time clock. Prescales are defined in time.h. For example, SECOND will give 1 second. The specified function is called every clock tick. For the real time clock to activate, interrupts must be enabled. (through sei() )
|
|
Reset the counter of the realtime clock. Resets the real time clock counter to 0.
|