34 #include "sys/clock.h"
38 #include <avr/interrupt.h>
40 static volatile clock_time_t count, scount;
41 static volatile unsigned long seconds;
64 TIMSK &= ~( _BV(TOIE0) | _BV(OCIE0) );
78 TCCR0 = _BV(CS00) | _BV(CS01) | _BV(WGM01);
114 }
while(tmp != count);
126 for (j = 50; j > 0; j--)
157 }
while(tmp != seconds);
void clock_init(void)
Initialize the clock library.
CCIF clock_time_t clock_time(void)
Get the current clock time.
void etimer_request_poll(void)
Make the event timer aware that the clock has changed.
void clock_set_seconds(unsigned long sec)
Set the value of the platform seconds.
CCIF unsigned long clock_seconds(void)
Get the current value of the platform seconds.
int etimer_pending(void)
Check if there are any non-expired event timers.
void clock_delay(unsigned int delay)
Obsolete delay function but we implement it here since some code still uses it.
void clock_wait(clock_time_t t)
Wait for a given number of ticks.
#define CLOCK_SECOND
A second, measured in system clock time.