Simplified the cc2530dk STARTUP_CONF_VERBOSE spaghetti and made it project-configurable

This commit is contained in:
George Oikonomou 2012-04-20 13:56:51 +01:00
parent 6fb48174ba
commit 4a78021c62
2 changed files with 9 additions and 13 deletions

View file

@ -24,7 +24,9 @@
#endif
/* Verbose Startup? Turning this off saves plenty of bytes of CODE in HOME */
#ifndef STARTUP_CONF_VERBOSE
#define STARTUP_CONF_VERBOSE 0
#endif
/* More CODE space savings by turning off process names */
#define PROCESS_CONF_NO_PROCESS_NAMES 1

View file

@ -27,22 +27,16 @@
PROCESS_NAME(viztool_process);
#endif
/*---------------------------------------------------------------------------*/
#ifdef STARTUP_CONF_VERBOSE
#define STARTUP_VERBOSE STARTUP_CONF_VERBOSE
#else
#define STARTUP_VERBOSE 0
#endif
#if STARTUP_VERBOSE
#if STARTUP_CONF_VERBOSE
#define PUTSTRING(...) putstring(__VA_ARGS__)
#define PUTHEX(...) puthex(__VA_ARGS__)
#define PUTBIN(...) putbin(__VA_ARGS__)
#define PUTCHAR(...) putchar(__VA_ARGS__)
#else
#define PUTSTRING(...) do {} while(0)
#define PUTHEX(...) do {} while(0)
#define PUTBIN(...) do {} while(0)
#define PUTCHAR(...) do {} while(0)
#define PUTSTRING(...)
#define PUTHEX(...)
#define PUTBIN(...)
#define PUTCHAR(...)
#endif
/*---------------------------------------------------------------------------*/
#if CLOCK_CONF_STACK_FRIENDLY
@ -104,7 +98,7 @@ set_rime_addr(void)
}
/* Now the address is stored MSB first */
#if STARTUP_VERBOSE
#if STARTUP_CONF_VERBOSE
PUTSTRING("Rime configured with address ");
for(i = 0; i < RIMEADDR_SIZE - 1; i++) {
PUTHEX(rimeaddr_node_addr.u8[i]);
@ -185,7 +179,7 @@ main(void)
putstring("KB SRAM\n");
PUTSTRING("\nSDCC Build:\n");
#if STARTUP_VERBOSE
#if STARTUP_CONF_VERBOSE
#ifdef HAVE_SDCC_BANKING
PUTSTRING(" With Banking.\n");
#endif /* HAVE_SDCC_BANKING */