X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Fplatforms%2Fz1.h;h=cce9b5fdfb1cedbeba9480a7e93cbb2df6369afd;hp=8fb28572d9af3c73eabe822fbc3f251905f0071b;hb=f4a366d95f96109559f0903611d7103c50cde3f7;hpb=5a403079bcbe888638417dbe7aa77723b265f94e diff --git a/firmware/platforms/z1.h b/firmware/platforms/z1.h index 8fb2857..cce9b5f 100644 --- a/firmware/platforms/z1.h +++ b/firmware/platforms/z1.h @@ -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. */ @@ -41,12 +40,14 @@ #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;\ @@ -73,17 +74,10 @@ #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) | \