2 \author Travis Goodspeed
3 \brief Port descriptions for the GoodFET platform.
16 //Use P3 instead of P5 for target I/O on chips without P5.
18 //#warning "No P5, using P3 instead. Will break 2618 and 1612 support."
37 //This is how things used to work, don't do it anymore.
39 //#define P5REN somedamnedextern
42 //No longer works for Hope badge.
43 #define SETSS P5OUT|=BIT0
44 #define CLRSS P5OUT&=~BIT0
45 #define DIRSS P5DIR|=BIT0;
47 //BIT5 is Chip Enable. Need to document this
48 //#define RADIOACTIVE P5OUT|=BIT5
49 //#define RADIOPASSIVE P5OUT&=~BIT5
50 #define SETCE P5OUT|=BIT5
51 #define CLRCE P5OUT&=~BIT5
52 #define DIRCE P5DIR|=BIT5
54 // network byte order converters
55 #define htons(x) ((((uint16_t)(x) & 0xFF00) >> 8) | \
56 (((uint16_t)(x) & 0x00FF) << 8))
57 #define htonl(x) ((((uint32_t)(x) & 0xFF000000) >> 24) | \
58 (((uint32_t)(x) & 0x00FF0000) >> 8) | \
59 (((uint32_t)(x) & 0x0000FF00) << 8) | \
60 (((uint32_t)(x) & 0x000000FF) << 24))