X-Git-Url: http://git.rot13.org//?a=blobdiff_plain;f=firmware%2Fplatforms%2Ftelosb.h;h=235faeeabb10f23e5dce9556d948f4ac18c00d31;hb=854dba571fe62948dfb23a396be3299225fcbb05;hp=59495ebc818e9ac03b2b941cb8b44f74ed93003c;hpb=1afd03f424ab5da0a4c172d7c48814db3660a2f0;p=goodfet diff --git a/firmware/platforms/telosb.h b/firmware/platforms/telosb.h index 59495eb..235faee 100644 --- a/firmware/platforms/telosb.h +++ b/firmware/platforms/telosb.h @@ -12,17 +12,42 @@ #include #endif - -//LED on P1.0 +//LED on P5.4 #define PLEDOUT P5OUT #define PLEDDIR P5DIR #define PLEDPIN BIT4 +#define SPIOUT P3OUT +#define SPIDIR P3DIR +#define SPIIN P3IN +#define SPIREN P3REN + +#define P5OUT P3OUT +#define P5DIR P3DIR +#define P5IN P3IN +#define P5REN P3REN + + +/* For the radio to be used: + 4.6 (!RST) must be low + 4.5 (VREF_EN) must be high + 4.2 (!CS) must be low for the transaction. +*/ + +#define INITPLATFORM \ + P4DIR|=BIT6+BIT5+BIT2+BIT7+BIT4; \ + P4OUT=BIT5; + //Radio CS is P4.2 #define SETSS P4OUT|=BIT2 #define CLRSS P4OUT&=~BIT2 -#define DIRSS P4DIR|=BIT2; +#define DIRSS P4DIR|=BIT2 + +//Flash CS is P4.4 +//#define SETSS P4OUT|=BIT4 +//#define CLRSS P4OUT&=~BIT4 +//#define DIRSS P4DIR|=BIT4 //CC2420 Chip Reset. Need to document this.