1 /*! \file tilaunchpad.h
3 \brief Port descriptions for the TI-launchpad platform.
4 // Port setup on TI Launchpad
9 // P2.4 P4.7 P5.1 P5.2 SBWDIO 47k pull-up
12 // P3.4 TXD0 to TUSB3410
13 // P3.5 RXD0 to TUSB3410
16 // P4.6 Reset to TUSB3410
17 // P4.7 P2.4 P5.1 P5.2 SBWDIO 47k pull-up
18 // P5.1 P4.7 P2.4 P5.2 SBWDIO 47k pull-up
19 // P5.2 P4.7 P2.4 P5.1 SBWDIO 47k pull-up labelled RST
20 // P5.3 SBWTCK 47k pull-down labelled TEST
21 // P5.5 SMCLK 12 Mhz send to TUSG3410
23 The Launchpad has only four pins easily available
24 but this is fine for f.ex chipcon
28 P3.6 txd1 used for led in chipcon application
30 P2.4 could probably be made available without too much destruction
46 #define TI_LAUNCHPAD 1
52 // Here is how I try to remember rs232 signaling
53 // think of halfduplex rs485, and this makes total sense.
54 #define DTR BIT4 // -> Minicom has opened the device in handshake on mode
55 #define DSR BIT5 // <- TI Launchpad signals back that it is turned ON
56 #define RTS BIT3 // -> Minicom request control of rs485 bus
57 #define CTS BIT6 // <- we reply yes we got the rs485 bus - just carry on on
67 // network byte order converters
68 #define htons(x) ((((uint16_t)(x) & 0xFF00) >> 8) | \
69 (((uint16_t)(x) & 0x00FF) << 8))
70 #define htonl(x) ((((uint32_t)(x) & 0xFF000000) >> 24) | \
71 (((uint32_t)(x) & 0x00FF0000) >> 8) | \
72 (((uint32_t)(x) & 0x0000FF00) << 8) | \
73 (((uint32_t)(x) & 0x000000FF) << 24))
79 void delay_us(unsigned int us);
80 void delay_ms(unsigned int ms);
81 void delay_sec(unsigned int s);
82 void led_init(char pin);
86 void led_blink(int n); // long - n shorts