1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 06:12:43 +01:00

Merge pull request #763 from LudwigOrtmann/issue_717

move global char array out of thread
This commit is contained in:
Christian Mehlis 2014-02-22 18:18:53 +01:00
commit 668c29ca52

View File

@ -22,6 +22,11 @@
#include "hwtimer.h"
#define BASE_DELAY (1000UL * 1000UL)
#define DELTA_DELAY (1000UL * 1000UL)
#define MSGLEN 12 // == strlen("callback %2i")
char msg[MSGLEN * ARCH_MAXTIMERS]; // == [callback 1\0callback 2\0...]
void callback(void *ptr)
{
puts((char *) ptr);
@ -36,10 +41,6 @@ int main(void)
puts("Initializing hwtimer [OK].");
#define BASE_DELAY (1000UL * 1000UL)
#define DELTA_DELAY (1000UL * 1000UL)
#define MSGLEN 12 // == strlen("callback %2i")
char msg[MSGLEN * ARCH_MAXTIMERS]; // == [callback 1\0callback 2\0...]
unsigned long delay = BASE_DELAY + ((ARCH_MAXTIMERS - 1) * DELTA_DELAY);
/* make the first timer first to fire so timers do not run out linearly */