2 \author Travis Goodspeed
3 \brief Port descriptions for the GoodFET platform.
19 //Use P3 instead of P5 for target I/O on chips without P5.
21 //#warning "No P5, using P3 instead. Will break 2618 and 1612 support."
40 //This is how things used to work, don't do it anymore.
42 //#define P5REN somedamnedextern
45 //No longer works for Hope badge.
46 #define SETSS P5OUT|=BIT0
47 #define CLRSS P5OUT&=~BIT0
48 #define DIRSS P5DIR|=BIT0;
50 //Used for the Nordic port, !RST pin on regular GoodFET.
51 #define SETCE P2OUT|=BIT6
52 #define CLRCE P2OUT&=~BIT6
53 #define DIRCE P2DIR|=BIT6
55 // network byte order converters
56 #define htons(x) ((((uint16_t)(x) & 0xFF00) >> 8) | \
57 (((uint16_t)(x) & 0x00FF) << 8))
58 #define htonl(x) ((((uint32_t)(x) & 0xFF000000) >> 24) | \
59 (((uint32_t)(x) & 0x00FF0000) >> 8) | \
60 (((uint32_t)(x) & 0x0000FF00) << 8) | \
61 (((uint32_t)(x) & 0x000000FF) << 24))