Teile des r0ket-nrf-Treibers.
[hackover2013-badge-firmware.git] / r0ketports.h
1 #ifndef INCLUDED_R0KET_PORTS_H
2 #define INCLUDED_R0KET_PORTS_H
3
4 #ifdef R0KET
5
6 // LED
7 #define RB_LED0 0,11
8 #define RB_LED0_IO IOCON_PIO0_11
9 #define RB_LED1 1,7
10 #define RB_LED1_IO IOCON_PIO1_7
11 #define RB_LED2 1,6
12 #define RB_LED2_IO IOCON_PIO1_6
13 #define RB_LED3 1,11
14 #define RB_LED3_IO IOCON_PIO1_11
15
16 // Infrared
17 //#define RB_IROUT 1,5
18
19 //#define RB_IRIN 1,8
20 //#define RB_IRIN_IO IOCON_PIO1_8
21
22
23 // Buttons
24 // TODO: XXX
25 // use alternate buttons for the board
26
27 #define RB_BTN0 0,1
28 #define RB_BTN0_IO IOCON_PIO0_1
29
30 #define RB_BTN1 2,9
31 #define RB_BTN1_IO IOCON_PIO2_9
32
33 #define RB_BTN2 2,6
34 #define RB_BTN2_IO IOCON_PIO2_6
35
36 #define RB_BTN3 3,3
37 #define RB_BTN3_IO IOCON_PIO3_3
38
39 #define RB_BTN4 2,7
40 #define RB_BTN4_IO IOCON_PIO2_7
41
42 #define RB_LCD_BL 1,9
43 #define RB_LCD_CS 2,1
44 #define RB_LCD_RST 2,2
45
46 #define RB_SPI_CS_DF 2,0
47
48 // I2C
49 #define RB_I2C_SCL 0,4
50
51 #define RB_I2C_SCA 0,5
52
53
54 // SPI
55 #define RB_SPI_MISO 0,8
56
57 #define RB_SPI_MOSI 0,9
58
59 #define RB_SPI_SCK 2,11
60
61 #define RB_SPI_SS0 2,5
62
63 #define RB_SPI_SS1 2,4
64
65 #define RB_SPI_SS2 2,8
66
67 #define RB_SPI_SS3 3,2
68
69 #define RB_SPI_SS4 3,1
70
71 #define RB_SPI_SS5 2,10
72
73
74 // Power
75 #define RB_PWR_VOLT 1,0
76
77 #define RB_PWR_GOOD 1,8
78
79 #define RB_PWR_CHRG 2,3
80 #define RB_PWR_CHRG_IO IOCON_PIO2_3
81
82 #define RB_PWR_LCDBL 0,0
83 #define RB_PWR_LCDBL_IO IOCON_nRESET_PIO0_0
84 #define RB_PWR_LCDBL_IO_FUNC_MASK IOCON_nRESET_PIO0_0_FUNC_MASK
85 #define RB_PWR_LCDBL_IO_FUNC_GPIO IOCON_nRESET_PIO0_0_FUNC_GPIO
86
87 // Hackerbus
88 #define RB_HB0 1,3
89 #define RB_HB0_IO IOCON_SWDIO_PIO1_3
90
91 #define RB_HB1 0,10
92 #define RB_HB1_IO IOCON_JTAG_TCK_PIO0_10
93
94 #define RB_HB2 1,1
95 #define RB_HB2_IO IOCON_PIO1_1
96
97 #define RB_HB3 0,2
98 #define RB_HB3_IO IOCON_PIO0_2
99
100 #define RB_HB4 1,4
101 #define RB_HB4_IO IOCON_PIO1_4
102
103 #define RB_HB5 1,2
104 #define RB_HB5_IO IOCON_PIO1_2
105
106 #define RB_NRF_CE 1,5
107 #define RB_NRF_CE_IO IOCON_PIO1_5
108 #define RB_SPI_NRF_CS 1,10
109 #define RB_SPI_NRF_CS_IO IOCON_PIO1_10
110
111 // Misc
112 #define RB_BUSINT 3,0
113 #define RB_BUSINT_IO IOCON_PIO3_0
114
115 #define RB_USB_VBUS 0,3
116
117 #define RB_EEPROM_ADDR 0xA0
118
119 #define USB_CONNECT 0,6
120
121
122 #define BTN_NONE 0
123 #define BTN_UP (1<<0)
124 #define BTN_DOWN (1<<1)
125 #define BTN_LEFT (1<<2)
126 #define BTN_RIGHT (1<<3)
127 #define BTN_ENTER (1<<4)
128
129 #endif
130
131 #endif
132
This page took 0.04465 seconds and 5 git commands to generate.