diff options
author | Paulo Borges <paulo.borges@openbossa.org> | 2013-12-25 23:27:33 -0300 |
---|---|---|
committer | Paulo Borges <paulo.borges@openbossa.org> | 2013-12-25 23:54:11 -0300 |
commit | b1d602512339e1ece45e89a58da358b23e65c63d (patch) | |
tree | 759aced2edd7ebee16ed90feb52336cfd0324242 | |
parent | cedf6a7a9311224bb614758d0985b9cbb8b54f20 (diff) |
examples: Update timing example with new timer APIs
-rw-r--r-- | examples/timing/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/timing/main.c b/examples/timing/main.c index 5bc18c7..044c80f 100644 --- a/examples/timing/main.c +++ b/examples/timing/main.c @@ -35,6 +35,7 @@ uint16_t counter = 0; uint16_t timer_data = 0; + int16_t timer1; int16_t timer2; @@ -56,8 +57,11 @@ int main(void) log_init(); timer_init(); - timer1 = timer_start(TIMER_REPEATED, TIMER1_MS, timeout1, NULL); - timer2 = timer_start(TIMER_REPEATED, TIMER2_MS, timeout2, &timer_data); + timer1 = timer_create(TIMER_REPEATED, timeout1); + timer2 = timer_create(TIMER_REPEATED, timeout2); + + timer_start(timer1, TIMER1_MS, NULL); + timer_start(timer2, TIMER2_MS, &timer_data); while (1); |