blub
This commit is contained in:
parent
26b594582f
commit
518820b1e1
4
main.c
4
main.c
@ -45,9 +45,9 @@ static uint32_t pitc_test(struct pitc_timer *timer)
|
||||
printf("%ld channels: ", count);
|
||||
uint32_t j;
|
||||
for (j = 0; j < count; j++)
|
||||
printf("%+4d ", rc.chan[j]);
|
||||
printf("%+5d ", rc.chan[j]);
|
||||
|
||||
printf("\n\r");
|
||||
printf("\r");
|
||||
return PITC_RESTART_TIMER;
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <stdint.h>
|
||||
#include "AT91SAM7S256.h"
|
||||
#include "board.h"
|
||||
//#include "static_alloc.h"
|
||||
#include "static_alloc.h"
|
||||
|
||||
#define ALIGN(x) (((x) +3) & ~3)
|
||||
|
||||
@ -29,16 +29,16 @@ extern void * __stack_top__;
|
||||
|
||||
static uint32_t static_alloc_pos;
|
||||
|
||||
void * static_alloc(uint32_t size)
|
||||
void * static_alloc(uint32_t size)
|
||||
{
|
||||
if (static_alloc_pos == 0)
|
||||
static_alloc_pos = ALIGN((uint32_t)&__bss_end__);
|
||||
|
||||
|
||||
uint32_t retval = static_alloc_pos;
|
||||
|
||||
size = ALIGN(size);
|
||||
static_alloc_pos += size;
|
||||
|
||||
|
||||
return (void *)retval;
|
||||
}
|
||||
|
||||
@ -55,6 +55,6 @@ uint32_t next_powerof2(uint32_t value)
|
||||
value--;
|
||||
for (i = 1; i < 32; i = i * 2)
|
||||
value |= value >> i;
|
||||
|
||||
|
||||
return value +1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user