1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/projects/test_hwtimer_basic/main.c
2010-10-26 17:06:07 +02:00

30 lines
557 B
C

#include <stdio.h>
#include <hwtimer.h>
#include <kernel.h>
#include <board.h>
void callback(void* ptr) {
puts((char*)ptr);
}
extern uint32_t hwtimer_now();
int main(void)
{
puts("hwtimer test project.");
puts("Initializing hwtimer...");
hwtimer_init();
puts("Initializing hwtimer [OK].");
// while (TA0R < 20000);
hwtimer_set(20000LU, callback, (void*)"callback1");
hwtimer_set(50000LU, callback, (void*)"callback2");
hwtimer_set(30000LU, callback, (void*)"callback3");
puts("hwtimer set.");
}