Initialisierung bisschen aufgerÀumt.
[hackover2013-badge-firmware.git] / r0ketports.h
1 #ifndef INCLUDED_R0KET_PORTS_H
2 #define INCLUDED_R0KET_PORTS_H
3
4 // LED
5 #define RB_LED0 0,11
6 #define RB_LED0_IO IOCON_PIO0_11
7 #define RB_LED1 1,7
8 #define RB_LED1_IO IOCON_PIO1_7
9 #define RB_LED2 1,6
10 #define RB_LED2_IO IOCON_PIO1_6
11 #define RB_LED3 1,11
12 #define RB_LED3_IO IOCON_PIO1_11
13
14 // Infrared
15 //#define RB_IROUT 1,5
16
17 //#define RB_IRIN 1,8
18 //#define RB_IRIN_IO IOCON_PIO1_8
19
20
21 // Buttons
22 #define RB_BTN0 0,1
23 #define RB_BTN0_IO IOCON_PIO0_1
24
25 #define RB_BTN1 2,9
26 #define RB_BTN1_IO IOCON_PIO2_9
27
28 #define RB_BTN2 2,6
29 #define RB_BTN2_IO IOCON_PIO2_6
30
31 #define RB_BTN3 3,3
32 #define RB_BTN3_IO IOCON_PIO3_3
33
34 #define RB_BTN4 2,7
35 #define RB_BTN4_IO IOCON_PIO2_7
36
37
38 // LCD
39 #define RB_LCD_BL 1,9
40
41 #define RB_LCD_CS 2,1
42
43 #define RB_LCD_RST 2,2
44
45
46 // I2C
47 #define RB_I2C_SCL 0,4
48
49 #define RB_I2C_SCA 0,5
50
51
52 // SPI
53 #define RB_SPI_MISO 0,8
54
55 #define RB_SPI_MOSI 0,9
56
57 #define RB_SPI_SCK 2,11
58
59 #define RB_SPI_CS_DF 2,0
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_PIO1_3
90
91 #define RB_HB1 0,10
92 #define RB_HB1_IO IOCON_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 // Funk
107 #define RB_NRF_CE 1,5
108 #define RB_NRF_CE_IO IOCON_PIO1_5
109 #define RB_SPI_NRF_CS 1,10
110 #define RB_SPI_NRF_CS_IO IOCON_PIO1_10
111
112 // Misc
113 #define RB_BUSINT 3,0
114 #define RB_BUSINT_IO IOCON_PIO3_0
115
116 #define RB_USB_VBUS 0,3
117
118 #define RB_EEPROM_ADDR 0xA0
119
120 #define USB_CONNECT 0,6
121
122
123 #define BTN_NONE 0
124 #define BTN_UP (1<<0)
125 #define BTN_DOWN (1<<1)
126 #define BTN_LEFT (1<<2)
127 #define BTN_RIGHT (1<<3)
128 #define BTN_ENTER (1<<4)
129
130 #endif
This page took 0.04591 seconds and 5 git commands to generate.