[tuxdroid-svn] r1134 - firmware/tuxaudio/trunk
Status: Beta
Brought to you by:
ks156
From: jaguarondi <c2m...@c2...> - 2008-05-08 09:49:55
|
Author: jaguarondi Date: 2008-05-08 11:49:53 +0200 (Thu, 08 May 2008) New Revision: 1134 Modified: firmware/tuxaudio/trunk/main.c Log: * Small cleanup. Modified: firmware/tuxaudio/trunk/main.c =================================================================== --- firmware/tuxaudio/trunk/main.c 2008-05-08 09:46:35 UTC (rev 1133) +++ firmware/tuxaudio/trunk/main.c 2008-05-08 09:49:53 UTC (rev 1134) @@ -38,12 +38,28 @@ #include "config.h" #include "PC_communication.h" -/* XXX AT26F004.h must be included here read_data function is used in - * send_info(). +/* + * Debug and test flags */ -#include "AT26F004.h" +#define DBG_STACK 0 +/* + * Stack Overflow detection + * + * Fill the ram with a value (0x5F) before the first initialization in order to + * detect any stack overflow just by looking to the memory at any breakpoint + */ +#if (DBG_STACK) +void init_ram(void) __attribute__ ((naked)) __attribute__ ((section(".init1"))); +void init_ram(void) +{ + uint8_t *ptr; + for (ptr = (uint8_t *) 0x0100; ptr < (uint8_t *) 0x0300; ptr++) + *ptr = 0x5F; +} +#endif + /* Set when sleep should be entered */ static uint8_t pre_sleep_delay = 0; @@ -94,29 +110,6 @@ leave_deep_sleep(); } -/* - * Debug and test flags - */ -#define DBG_STACK 0 - - -#if (DBG_STACK) -/* - * Stack Overflow detection - * - * Fill the ram with a value (0x5F) before the first initialization in order to - * detect any stack overflow just by looking to the memory at any breakpoint - */ -void init_ram(void) __attribute__ ((naked)) __attribute__ ((section(".init1"))); -void init_ram(void) -{ - uint8_t *ptr; - - for (ptr = (uint8_t *) 0x0100; ptr < (uint8_t *) 0x0300; ptr++) - *ptr = 0x5F; -} -#endif - /** * \brief Send sensors status * |