Merge pull request #3323 from OlegHahm/test_hwtimer_wo_sleep
Test hwtimer wo sleep
This commit is contained in:
commit
4a5f5579f6
@ -23,12 +23,13 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "hwtimer.h"
|
||||
#include "thread.h"
|
||||
|
||||
#define BASE_DELAY (1000UL * 1000UL)
|
||||
#define BASE_DELAY (1000UL * 1000UL)
|
||||
#define END_DELAY (BASE_DELAY + ((HWTIMER_MAXTIMERS - 1) * DELTA_DELAY))
|
||||
#define DELTA_DELAY (10UL * 1000UL)
|
||||
#define MSGLEN 12 // == strlen("callback %2i")
|
||||
char msg[MSGLEN * HWTIMER_MAXTIMERS]; // == [callback 1\0callback 2\0...]
|
||||
#define MSGLEN (12) /* == strlen("callback %2i") */
|
||||
|
||||
char msg[MSGLEN * HWTIMER_MAXTIMERS]; /* == [callback 1\0callback 2\0...] */
|
||||
|
||||
void callback(void *ptr)
|
||||
{
|
||||
@ -70,9 +71,8 @@ int main(void)
|
||||
puts("All timers set.");
|
||||
puts("");
|
||||
|
||||
hwtimer_wait(HWTIMER_TICKS(BASE_DELAY));
|
||||
hwtimer_wait(HWTIMER_TICKS(END_DELAY));
|
||||
|
||||
puts("hwtimer set.");
|
||||
thread_sleep();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user