From 518820b1e1232bf3f68116740c39cdd72f35cf3f Mon Sep 17 00:00:00 2001 From: Olaf Rempel Date: Mon, 4 Feb 2008 19:00:32 +0100 Subject: [PATCH] blub --- main.c | 4 ++-- src/static_alloc.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/main.c b/main.c index a287fb1..29fc7ad 100644 --- a/main.c +++ b/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; } diff --git a/src/static_alloc.c b/src/static_alloc.c index 0251421..ef61fd4 100644 --- a/src/static_alloc.c +++ b/src/static_alloc.c @@ -19,7 +19,7 @@ #include #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; }