fixed preprocessor directives in ccspi, readded application to default compilation...
authorrmspeers <rmspeers@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 25 Apr 2011 21:00:54 +0000 (21:00 +0000)
committerrmspeers <rmspeers@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 25 Apr 2011 21:00:54 +0000 (21:00 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1018 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

firmware/Makefile
firmware/apps/radios/ccspi.c

index cb27fde..e3c4ae2 100644 (file)
@@ -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= 
index c2eb70f..524052f 100644 (file)
@@ -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: