|
@@ -71,19 +71,19 @@ void boardInit(void) {
|
71
|
71
|
|
72
|
72
|
extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = {
|
73
|
73
|
/*
|
74
|
|
- gpio_dev *gpio_device; GPIO device
|
|
74
|
+ gpio_dev *gpio_device; GPIO device
|
75
|
75
|
timer_dev *timer_device; Pin's timer device, if any.
|
76
|
|
- const adc_dev *adc_device; ADC device, if any.
|
77
|
|
- uint8 gpio_bit; Pin's GPIO port bit.
|
78
|
|
- uint8 timer_channel; Timer channel, or 0 if none.
|
79
|
|
- uint8 adc_channel; Pin ADC channel, or ADCx if none.
|
|
76
|
+ const adc_dev *adc_device; ADC device, if any.
|
|
77
|
+ uint8 gpio_bit; Pin's GPIO port bit.
|
|
78
|
+ uint8 timer_channel; Timer channel, or 0 if none.
|
|
79
|
+ uint8 adc_channel; Pin ADC channel, or ADCx if none.
|
80
|
80
|
*/
|
81
|
81
|
|
82
|
82
|
{&gpioa, &timer2, &adc1, 0, 1, 0}, /* PA0 */
|
83
|
83
|
{&gpioa, &timer2, &adc1, 1, 2, 1}, /* PA1 */
|
84
|
84
|
{&gpioa, &timer2, &adc1, 2, 3, 2}, /* PA2 */
|
85
|
85
|
{&gpioa, &timer2, &adc1, 3, 4, 3}, /* PA3 */
|
86
|
|
- {&gpioa, NULL, &adc1, 4, 0, 4}, /* PA4 */
|
|
86
|
+ {&gpioa, NULL, &adc1, 4, 0, 4}, /* PA4 */
|
87
|
87
|
{&gpioa, NULL, &adc1, 5, 0, 5}, /* PA5 */
|
88
|
88
|
{&gpioa, &timer3, &adc1, 6, 1, 6}, /* PA6 */
|
89
|
89
|
{&gpioa, &timer3, &adc1, 7, 2, 7}, /* PA7 */
|
|
@@ -91,7 +91,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = {
|
91
|
91
|
{&gpioa, &timer1, NULL, 9, 2, ADCx}, /* PA9 */
|
92
|
92
|
{&gpioa, &timer1, NULL, 10, 3, ADCx}, /* PA10 */
|
93
|
93
|
{&gpioa, NULL, NULL, 11, 0, ADCx}, /* PA11 */
|
94
|
|
- {&gpioa, NULL, NULL, 12, 0, ADCx}, /* PA12 */
|
|
94
|
+ {&gpioa, NULL, NULL, 12, 0, ADCx}, /* PA12 */
|
95
|
95
|
{&gpioa, NULL, NULL, 13, 0, ADCx}, /* PA13 */
|
96
|
96
|
{&gpioa, NULL, NULL, 14, 0, ADCx}, /* PA14 */
|
97
|
97
|
{&gpioa, NULL, NULL, 15, 0, ADCx}, /* PA15 */
|
|
@@ -120,13 +120,13 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = {
|
120
|
120
|
{&gpioc, NULL, &adc1, 3, 0, 13}, /* PC3 */
|
121
|
121
|
{&gpioc, NULL, &adc1, 4, 0, 14}, /* PC4 */
|
122
|
122
|
{&gpioc, NULL, &adc1, 5, 0, 15}, /* PC5 */
|
123
|
|
- {&gpioc, &timer8, NULL, 6, 1, ADCx}, /* PC6 */
|
|
123
|
+ {&gpioc, &timer8, NULL, 6, 1, ADCx}, /* PC6 */
|
124
|
124
|
{&gpioc, &timer8, NULL, 7, 2, ADCx}, /* PC7 */
|
125
|
125
|
{&gpioc, &timer8, NULL, 8, 3, ADCx}, /* PC8 */
|
126
|
126
|
{&gpioc, &timer8, NULL, 9, 4, ADCx}, /* PC9 */
|
127
|
127
|
{&gpioc, NULL, NULL, 10, 0, ADCx}, /* PC10 UART4_TX/SDIO_D2 */
|
128
|
128
|
{&gpioc, NULL, NULL, 11, 0, ADCx}, /* PC11 UART4_RX/SDIO_D3 */
|
129
|
|
- {&gpioc, NULL, NULL, 12, 0, ADCx}, /* PC12 UART5_TX/SDIO_CK */
|
|
129
|
+ {&gpioc, NULL, NULL, 12, 0, ADCx}, /* PC12 UART5_TX/SDIO_CK */
|
130
|
130
|
{&gpioc, NULL, NULL, 13, 0, ADCx}, /* PC13 TAMPER-RTC */
|
131
|
131
|
{&gpioc, NULL, NULL, 14, 0, ADCx}, /* PC14 OSC32_IN */
|
132
|
132
|
{&gpioc, NULL, NULL, 15, 0, ADCx}, /* PC15 OSC32_OUT */
|
|
@@ -134,7 +134,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = {
|
134
|
134
|
{&gpiod, NULL, NULL, 0, 0, ADCx} , /* PD0 OSC_IN */
|
135
|
135
|
{&gpiod, NULL, NULL, 1, 0, ADCx} , /* PD1 OSC_OUT */
|
136
|
136
|
{&gpiod, NULL, NULL, 2, 0, ADCx} , /* PD2 TIM3_ETR/UART5_RX SDIO_CMD */
|
137
|
|
-
|
|
137
|
+
|
138
|
138
|
{&gpiod, NULL, NULL, 3, 0, ADCx} , /* PD3 FSMC_CLK */
|
139
|
139
|
{&gpiod, NULL, NULL, 4, 0, ADCx} , /* PD4 FSMC_NOE */
|
140
|
140
|
{&gpiod, NULL, NULL, 5, 0, ADCx} , /* PD5 FSMC_NWE */
|
|
@@ -145,10 +145,10 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = {
|
145
|
145
|
{&gpiod, NULL, NULL, 10, 0, ADCx} , /* PD10 FSMC_D15 */
|
146
|
146
|
{&gpiod, NULL, NULL, 11, 0, ADCx} , /* PD11 FSMC_A16 */
|
147
|
147
|
{&gpiod, NULL, NULL, 12, 0, ADCx} , /* PD12 FSMC_A17 */
|
148
|
|
- {&gpiod, NULL, NULL, 13, 0, ADCx} , /* PD13 FSMC_A18 */
|
|
148
|
+ {&gpiod, NULL, NULL, 13, 0, ADCx} , /* PD13 FSMC_A18 */
|
149
|
149
|
{&gpiod, NULL, NULL, 14, 0, ADCx} , /* PD14 FSMC_D0 */
|
150
|
150
|
{&gpiod, NULL, NULL, 15, 0, ADCx} , /* PD15 FSMC_D1 */
|
151
|
|
-
|
|
151
|
+
|
152
|
152
|
{&gpioe, NULL, NULL, 0, 0, ADCx} , /* PE0 */
|
153
|
153
|
{&gpioe, NULL, NULL, 1, 0, ADCx} , /* PE1 */
|
154
|
154
|
{&gpioe, NULL, NULL, 2, 0, ADCx} , /* PE2 */
|
|
@@ -162,9 +162,9 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = {
|
162
|
162
|
{&gpioe, NULL, NULL, 10, 0, ADCx} , /* PE10 */
|
163
|
163
|
{&gpioe, NULL, NULL, 11, 0, ADCx} , /* PE11 */
|
164
|
164
|
{&gpioe, NULL, NULL, 12, 0, ADCx} , /* PE12 */
|
165
|
|
- {&gpioe, NULL, NULL, 13, 0, ADCx} , /* PE13 */
|
|
165
|
+ {&gpioe, NULL, NULL, 13, 0, ADCx} , /* PE13 */
|
166
|
166
|
{&gpioe, NULL, NULL, 14, 0, ADCx} , /* PE14 */
|
167
|
|
- {&gpioe, NULL, NULL, 15, 0, ADCx} , /* PE15 */
|
|
167
|
+ {&gpioe, NULL, NULL, 15, 0, ADCx} , /* PE15 */
|
168
|
168
|
|
169
|
169
|
{&gpiof, NULL, NULL, 0, 0, ADCx} , /* PF0 */
|
170
|
170
|
{&gpiof, NULL, NULL, 1, 0, ADCx} , /* PF1 */
|
|
@@ -179,10 +179,10 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = {
|
179
|
179
|
{&gpiof, NULL, NULL, 10, 0, ADCx} , /* PF10 */
|
180
|
180
|
{&gpiof, NULL, NULL, 11, 0, ADCx} , /* PF11 */
|
181
|
181
|
{&gpiof, NULL, NULL, 12, 0, ADCx} , /* PF12 */
|
182
|
|
- {&gpiof, NULL, NULL, 13, 0, ADCx} , /* PF13 */
|
|
182
|
+ {&gpiof, NULL, NULL, 13, 0, ADCx} , /* PF13 */
|
183
|
183
|
{&gpiof, NULL, NULL, 14, 0, ADCx} , /* PF14 */
|
184
|
|
- {&gpiof, NULL, NULL, 15, 0, ADCx} , /* PF15 */
|
185
|
|
-
|
|
184
|
+ {&gpiof, NULL, NULL, 15, 0, ADCx} , /* PF15 */
|
|
185
|
+
|
186
|
186
|
{&gpiog, NULL, NULL, 0, 0, ADCx} , /* PG0 */
|
187
|
187
|
{&gpiog, NULL, NULL, 1, 0, ADCx} , /* PG1 */
|
188
|
188
|
{&gpiog, NULL, NULL, 2, 0, ADCx} , /* PG2 */
|
|
@@ -196,9 +196,9 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = {
|
196
|
196
|
{&gpiog, NULL, NULL, 10, 0, ADCx} , /* PG10 */
|
197
|
197
|
{&gpiog, NULL, NULL, 11, 0, ADCx} , /* PG11 */
|
198
|
198
|
{&gpiog, NULL, NULL, 12, 0, ADCx} , /* PG12 */
|
199
|
|
- {&gpiog, NULL, NULL, 13, 0, ADCx} , /* PG13 */
|
|
199
|
+ {&gpiog, NULL, NULL, 13, 0, ADCx} , /* PG13 */
|
200
|
200
|
{&gpiog, NULL, NULL, 14, 0, ADCx} , /* PG14 */
|
201
|
|
- {&gpiog, NULL, NULL, 15, 0, ADCx} /* PG15 */
|
|
201
|
+ {&gpiog, NULL, NULL, 15, 0, ADCx} /* PG15 */
|
202
|
202
|
};
|
203
|
203
|
|
204
|
204
|
/* Basically everything that is defined as having a timer us PWM */
|