From: rmspeers Date: Mon, 25 Apr 2011 21:00:54 +0000 (+0000) Subject: fixed preprocessor directives in ccspi, readded application to default compilation... X-Git-Url: http://git.rot13.org/?p=goodfet;a=commitdiff_plain;h=8811b9e7eb0c09f5b7568abc5cbe8de90104c38d fixed preprocessor directives in ccspi, readded application to default compilation (fix of issue mitigated in 1012) git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1018 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- diff --git a/firmware/Makefile b/firmware/Makefile index cb27fde..e3c4ae2 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -103,7 +103,7 @@ CC=$(GCC) -Wall -Os -fno-strict-aliasing -g -mmcu=$(mcu) $(CCEXTRA) # config = monitor sbw chipcon nrf ccspi spi jtagarm7 jtag430 jtag430x2 avr # New default. -config ?= monitor chipcon spi jtag430 jtag430x2 avr openocd +config ?= monitor chipcon spi jtag430 jtag430x2 avr openocd ccspi # Build the needed list of app and lib object files from the config apps= diff --git a/firmware/apps/radios/ccspi.c b/firmware/apps/radios/ccspi.c index c2eb70f..524052f 100644 --- a/firmware/apps/radios/ccspi.c +++ b/firmware/apps/radios/ccspi.c @@ -188,6 +188,7 @@ void ccspi_handle_fn( uint8_t const app, break; case CCSPI_REFLEX: +#if defined(FIFOP) && defined(SFD) && defined(FIFO) && defined(PLED2DIR) && defined(PLED2PIN) && defined(PLED2OUT) txdata(app,verb,1); //Just sending some response back to client while(1) { //Wait until a packet is received @@ -227,8 +228,13 @@ void ccspi_handle_fn( uint8_t const app, } //TODO the firmware stops staying in this mode after a while, and stops jamming... need to find a fix. break; +#else + debugstr("Can't reflexively jam without SFD, FIFO, FIFOP, and P2LEDx definitions - try using telosb platform."); + txdata(app,NOK,0); +#endif case CCSPI_REFLEX_SEQNUM: +#if defined(FIFOP) && defined(SFD) && defined(FIFO) && defined(PLED2DIR) && defined(PLED2PIN) && defined(PLED2OUT) //char byte[4]; while(1) { //Has there been an overflow in the RX buffer? @@ -289,6 +295,10 @@ void ccspi_handle_fn( uint8_t const app, PLED2OUT |= PLED2PIN; } //TODO the firmware stops staying in this mode after a while, and stops jamming... need to find a fix. +#else + debugstr("Can't reflexively jam without SFD, FIFO, FIFOP, and P2LEDx definitions - try using telosb platform."); + txdata(app,NOK,0); +#endif break; case CCSPI_TX_FLUSH: