Now compiling with -Wall, error free.
[goodfet] / firmware / apps / spi / spi.c
index 5e76205..2ee2d2c 100644 (file)
@@ -31,7 +31,7 @@
 
 
 //! Set up the pins for SPI mode.
-unsigned char spisetup(){
+void spisetup(){
   P5DIR|=MOSI+SCK+SS;
   P5DIR&=~MISO;
   P5OUT|=SS;
@@ -78,8 +78,8 @@ void spihandle(unsigned char app,
     P5OUT&=~SS; //Drop !SS to begin transaction.
     for(i=0;i<len;i++)
       cmddata[i]=spitrans8(cmddata[i]);
-    txdata(app,verb,len);
     P5OUT|=SS;  //Raise !SS to end transaction.
+    txdata(app,verb,len);
     break;
   case SETUP:
     spisetup();