Wixel SDK
board.h
Go to the documentation of this file.
1 
9 #ifndef _WIXEL_H
10 #define _WIXEL_H
11 
12 #include <cc2511_map.h>
13 #include <cc2511_types.h>
14 
17 extern uint8 CODE serialNumber[4];
18 
22 
27 #define LED_GREEN(v) {((v) ? (P2DIR |= 0x10) : (P2DIR &= ~0x10));}
28 
31 #define LED_YELLOW(v) {((v) ? (P2DIR |= 0x04) : (P2DIR &= ~0x04));}
32 
35 #define LED_RED(v) {((v) ? (P2DIR |= 0x02) : (P2DIR &= ~0x02));}
36 
43 #define LED_GREEN_STATE ((P2DIR >> 4) & 1)
44 
46 #define LED_YELLOW_STATE ((P2DIR >> 2) & 1)
47 
49 #define LED_RED_STATE ((P2DIR >> 1) & 1)
50 
54 #define LED_GREEN_TOGGLE() {P2DIR ^= 0x10;}
55 
59 #define LED_YELLOW_TOGGLE() {P2DIR ^= 0x04;}
60 
64 #define LED_RED_TOGGLE() {P2DIR ^= 0x02;}
65 
80 void systemInit();
81 
89 void boardIoInit();
90 
96 void boardClockInit();
97 
103 void boardService();
104 
114 
116 void boardStartBootloader();
117 
124 
127 
133 void enableUsbPullup();
134 
140 void disableUsbPullup();
141 
142 #endif
void systemInit()
Definition: board.c:29
void boardStartBootloader()
Definition: board.c:111
BIT usbPowerPresent()
Definition: board.c:142
void boardIoInit()
Definition: board.c:71
void boardClockInit()
Definition: board.c:45
uint16 CODE serialNumberStringDescriptor[]
__bit BIT
Definition: cc2511_types.h:32
unsigned short uint16
Definition: cc2511_types.h:15
uint8 CODE serialNumber[4]
unsigned char uint8
Definition: cc2511_types.h:9
void enableUsbPullup()
Definition: board.c:158
void boardStartBootloaderIfNeeded()
Definition: board.c:130
BIT vinPowerPresent()
Definition: board.c:148
#define CODE
Definition: cc2511_types.h:39
void disableUsbPullup()
Definition: board.c:153
void boardService()
Definition: board.c:37