Fixed USB host bugs.
[goodfet] / firmware / platforms / z1.h
index 8fb2857..cce9b5f 100644 (file)
@@ -1,10 +1,9 @@
-/*! \file telosb.h
+/*! \file z1.h
   \author Travis Goodspeed
-  \brief Port descriptions for the TelosB platform.
+  \brief Port descriptions for the Zolertia Z1 platform.
   
-  This file defines the Telos B hardware, so that the GoodFET firmware
-  may be loaded onto it.  Adjustments include the !CS line of the CC2420
-  radio, the choice of serial port, and the LEDs.
+  This file defines the Zolertia hardware, so that the GoodFET firmware
+  may be loaded onto it.  Adjustments are identical to the Telos B.
 
 */
 
 #define INITPLATFORM \
   P1DIR = 0xe0;\
   P1OUT = 0x00;\
+  P1REN = 0x0F;\
   P2DIR = 0x7b;\
   P2OUT = 0x10;\
   P3DIR = 0xf1;\
   P3OUT = 0x00;\
   P4DIR = 0xfd;\
-  P4OUT = 0xFd;\
+  P4OUT = ~0x02;\
+  P4REN = 0x02;\
   P5DIR = 0xff;\
   P5OUT = 0xff;\
   P6DIR = 0xff;\
 #define DIRCE P4DIR|=BIT6
 
 //CC2420 signals
-#define SFD   (P4IN&BIT1)
-#define FIFOP (P1IN&BIT0)
+#define SFD   (P4IN&BIT1) //Might be broken on the Z1.
+#define FIFOP (P1IN&BIT2) // Was 1.0, mistakenly.
 #define FIFO  (P1IN&BIT3)
 
-//GPIO Expansion Pins
-#define GIO0  (P2OUT&BIT0)
-#define GIO0HIGH P2OUT|=BIT0
-#define GIO0LOW P2OUT&=~BIT0
-#define GIO0OUT P2OUT
-#define GIO0DIR P2DIR
-#define GIO0PIN BIT0
 
 // network byte order converters
 #define htons(x) ((((uint16_t)(x) & 0xFF00) >> 8) | \