Paparazzi UAS  v5.15_devel-88-gb3ad7fe
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
tawaki.h
Go to the documentation of this file.
1 #ifndef CONFIG_TAWAKI_1_00_H
2 #define CONFIG_TAWAKI_1_00_H
3 
4 #define BOARD_TAWAKI
5 
10 
15 /*
16  * AHB_CLK
17  */
18 #define AHB_CLK STM32_HCLK
19 
20 
21 /*
22  * LEDs
23  */
24 /* red, on PD15, 1 on LED_ON, 0 on LED_OFF */
25 #ifndef USE_LED_1
26 #define USE_LED_1 1
27 #endif
28 #define LED_1_GPIO GPIOD
29 #define LED_1_GPIO_PIN GPIO15
30 #define LED_1_GPIO_ON gpio_set
31 #define LED_1_GPIO_OFF gpio_clear
32 
33 /* orange, on PA10, 1 on LED_ON, 0 on LED_OFF */
34 #ifndef USE_LED_2
35 #define USE_LED_2 1
36 #endif
37 #define LED_2_GPIO GPIOA
38 #define LED_2_GPIO_PIN GPIO10
39 #define LED_2_GPIO_ON gpio_set
40 #define LED_2_GPIO_OFF gpio_clear
41 
42 /* green, on PC7, 1 on LED_ON, 0 on LED_OFF */
43 #ifndef USE_LED_3
44 #define USE_LED_3 1
45 #endif
46 #define LED_3_GPIO GPIOC
47 #define LED_3_GPIO_PIN GPIO7
48 #define LED_3_GPIO_ON gpio_set
49 #define LED_3_GPIO_OFF gpio_clear
50 
51 /* yellow, on PD10, 1 on LED_ON, 0 on LED_OFF */
52 #ifndef USE_LED_4
53 #define USE_LED_4 1
54 #endif
55 #define LED_4_GPIO GPIOD
56 #define LED_4_GPIO_PIN GPIO10
57 #define LED_4_GPIO_ON gpio_set
58 #define LED_4_GPIO_OFF gpio_clear
59 
60 /*
61  * ADCs
62  */
63 // AUXa1
64 #if USE_ADC_1
65 #define AD1_1_CHANNEL ADC_CHANNEL_IN0
66 #define ADC_1 AD1_1
67 #define ADC_1_GPIO_PORT GPIOA
68 #define ADC_1_GPIO_PIN GPIO0
69 #endif
70 
71 // AUXa2
72 #if USE_ADC_2
73 #define AD1_2_CHANNEL ADC_CHANNEL_IN1
74 #define ADC_2 AD1_2
75 #define ADC_2_GPIO_PORT GPIOA
76 #define ADC_2_GPIO_PIN GPIO1
77 #endif
78 
79 // AUXa3
80 #if USE_ADC_3
81 #define AD1_3_CHANNEL ADC_CHANNEL_IN2
82 #define ADC_3 AD1_3
83 #define ADC_3_GPIO_PORT GPIOA
84 #define ADC_3_GPIO_PIN GPIO2
85 #endif
86 
87 // AUXa4
88 #if USE_ADC_4
89 #define AD1_4_CHANNEL ADC_CHANNEL_IN6
90 #define ADC_4 AD1_4
91 #define ADC_4_GPIO_PORT GPIOA
92 #define ADC_4_GPIO_PIN GPIO6
93 #endif
94 
95 // AUXb1
96 #if USE_ADC_5
97 #define AD1_5_CHANNEL ADC_CHANNEL_IN3
98 #define ADC_5 AD1_5
99 #define ADC_5_GPIO_PORT GPIOA
100 #define ADC_5_GPIO_PIN GPIO3
101 #endif
102 
103 // AUXb2
104 #if USE_ADC_6
105 #define AD1_6_CHANNEL ADC_CHANNEL_IN7
106 #define ADC_6 AD1_6
107 #define ADC_6_GPIO_PORT GPIOA
108 #define ADC_6_GPIO_PIN GPIO7
109 #endif
110 
111 // AUXb3
112 #if USE_ADC_7
113 #define AD1_7_CHANNEL ADC_CHANNEL_IN8
114 #define ADC_7 AD1_7
115 #define ADC_7_GPIO_PORT GPIOB
116 #define ADC_7_GPIO_PIN GPIO0
117 #endif
118 
119 // AUXb4
120 #if USE_ADC_8
121 #define AD1_8_CHANNEL ADC_CHANNEL_IN9
122 #define ADC_8 AD1_8
123 #define ADC_8_GPIO_PORT GPIOB
124 #define ADC_8_GPIO_PIN GPIO1
125 #endif
126 
127 // Internal ADC for battery enabled by default
128 #ifndef USE_ADC_9
129 #define USE_ADC_9 1
130 #endif
131 #if USE_ADC_9
132 #define AD1_9_CHANNEL ADC_CHANNEL_IN10
133 #define ADC_9 AD1_9
134 #define ADC_9_GPIO_PORT GPIOC
135 #define ADC_9_GPIO_PIN GPIO0
136 #endif
137 
138 /* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
139 #ifndef ADC_CHANNEL_VSUPPLY
140 #define ADC_CHANNEL_VSUPPLY ADC_9
141 #endif
142 
143 /*
144  * R1 = 2.2k
145  * R2 = 12k
146  * adc * (3.3 / 2^12) * ((R1 + R2) / R1)
147  */
148 #define VBAT_R1 2200.0f
149 #define VBAT_R2 12000.0f
150 #define DefaultVoltageOfAdc(adc) ((3.3f/4096.0f)*((VBAT_R1+VBAT_R2)/VBAT_R1)*adc)
151 
152 /*
153  * PWM defines
154  */
155 
156 // SRVa connectors, activated in PWM mode by default
157 
158 #ifndef USE_PWM1
159 #define USE_PWM1 1
160 #endif
161 #if USE_PWM1
162 #define PWM_SERVO_1 1
163 #define PWM_SERVO_1_GPIO GPIOE
164 #define PWM_SERVO_1_PIN GPIO9
165 #define PWM_SERVO_1_AF GPIO_AF1
166 #define PWM_SERVO_1_DRIVER PWMD1
167 #define PWM_SERVO_1_CHANNEL 0
168 #define PWM_SERVO_1_ACTIVE PWM_OUTPUT_ACTIVE_HIGH
169 #else
170 #define PWM_SERVO_1_ACTIVE PWM_OUTPUT_DISABLED
171 #endif
172 
173 #ifndef USE_PWM2
174 #define USE_PWM2 1
175 #endif
176 #if USE_PWM2
177 #define PWM_SERVO_2 2
178 #define PWM_SERVO_2_GPIO GPIOE
179 #define PWM_SERVO_2_PIN GPIO11
180 #define PWM_SERVO_2_AF GPIO_AF1
181 #define PWM_SERVO_2_DRIVER PWMD1
182 #define PWM_SERVO_2_CHANNEL 1
183 #define PWM_SERVO_2_ACTIVE PWM_OUTPUT_ACTIVE_HIGH
184 #else
185 #define PWM_SERVO_2_ACTIVE PWM_OUTPUT_DISABLED
186 #endif
187 
188 #ifndef USE_PWM3
189 #define USE_PWM3 1
190 #endif
191 #if USE_PWM3
192 #define PWM_SERVO_3 3
193 #define PWM_SERVO_3_GPIO GPIOE
194 #define PWM_SERVO_3_PIN GPIO13
195 #define PWM_SERVO_3_AF GPIO_AF1
196 #define PWM_SERVO_3_DRIVER PWMD1
197 #define PWM_SERVO_3_CHANNEL 2
198 #define PWM_SERVO_3_ACTIVE PWM_OUTPUT_ACTIVE_HIGH
199 #else
200 #define PWM_SERVO_3_ACTIVE PWM_OUTPUT_DISABLED
201 #endif
202 
203 #ifndef USE_PWM4
204 #define USE_PWM4 1
205 #endif
206 #if USE_PWM4
207 #define PWM_SERVO_4 4
208 #define PWM_SERVO_4_GPIO GPIOE
209 #define PWM_SERVO_4_PIN GPIO14
210 #define PWM_SERVO_4_AF GPIO_AF1
211 #define PWM_SERVO_4_DRIVER PWMD1
212 #define PWM_SERVO_4_CHANNEL 3
213 #define PWM_SERVO_4_ACTIVE PWM_OUTPUT_ACTIVE_HIGH
214 #else
215 #define PWM_SERVO_4_ACTIVE PWM_OUTPUT_DISABLED
216 #endif
217 
218 // SRVb connector, PWM mode disabled by default (DShot is enabled by default)
219 
220 #ifndef USE_PWM5
221 #define USE_PWM5 0
222 #endif
223 #if USE_PWM5
224 #define PWM_SERVO_5 5
225 #define PWM_SERVO_5_GPIO GPIOB
226 #define PWM_SERVO_5_PIN GPIO6
227 #define PWM_SERVO_5_AF GPIO_AF2
228 #define PWM_SERVO_5_DRIVER PWMD4
229 #define PWM_SERVO_5_CHANNEL 0
230 #define PWM_SERVO_5_ACTIVE PWM_OUTPUT_ACTIVE_HIGH
231 #else
232 #define PWM_SERVO_5_ACTIVE PWM_OUTPUT_DISABLED
233 #endif
234 
235 #ifndef USE_PWM6
236 #define USE_PWM6 0
237 #endif
238 #if USE_PWM6
239 #define PWM_SERVO_6 6
240 #define PWM_SERVO_6_GPIO GPIOB
241 #define PWM_SERVO_6_PIN GPIO7
242 #define PWM_SERVO_6_AF GPIO_AF2
243 #define PWM_SERVO_6_DRIVER PWMD4
244 #define PWM_SERVO_6_CHANNEL 1
245 #define PWM_SERVO_6_ACTIVE PWM_OUTPUT_ACTIVE_HIGH
246 #else
247 #define PWM_SERVO_6_ACTIVE PWM_OUTPUT_DISABLED
248 #endif
249 
250 #ifndef USE_PWM7
251 #define USE_PWM7 0
252 #endif
253 #if USE_PWM7
254 #define PWM_SERVO_7 7
255 #define PWM_SERVO_7_GPIO GPIOB
256 #define PWM_SERVO_7_PIN GPIO8
257 #define PWM_SERVO_7_AF GPIO_AF2
258 #define PWM_SERVO_7_DRIVER PWMD4
259 #define PWM_SERVO_7_CHANNEL 2
260 #define PWM_SERVO_7_ACTIVE PWM_OUTPUT_ACTIVE_HIGH
261 #else
262 #define PWM_SERVO_7_ACTIVE PWM_OUTPUT_DISABLED
263 #endif
264 
265 #ifndef USE_PWM8
266 #define USE_PWM8 0
267 #endif
268 #if USE_PWM8
269 #define PWM_SERVO_8 8
270 #define PWM_SERVO_8_GPIO GPIOB
271 #define PWM_SERVO_8_PIN GPIO9
272 #define PWM_SERVO_8_AF GPIO_AF2
273 #define PWM_SERVO_8_DRIVER PWMD4
274 #define PWM_SERVO_8_CHANNEL 3
275 #define PWM_SERVO_8_ACTIVE PWM_OUTPUT_ACTIVE_HIGH
276 #else
277 #define PWM_SERVO_8_ACTIVE PWM_OUTPUT_DISABLED
278 #endif
279 
280 // TODO PWM on AUX pins
281 
282 // servo index starting at 1, so NB = 8+1
283 #define ACTUATORS_PWM_NB 9
284 
285 
286 #ifdef STM32_PWM_USE_TIM1
287 #define PWM_CONF_TIM1 STM32_PWM_USE_TIM1
288 #else
289 #define PWM_CONF_TIM1 1
290 #endif
291 #define PWM_CONF1_DEF { \
292  PWM_FREQUENCY, \
293  PWM_FREQUENCY/TIM1_SERVO_HZ, \
294  NULL, \
295  { \
296  { PWM_SERVO_1_ACTIVE, NULL }, \
297  { PWM_SERVO_2_ACTIVE, NULL }, \
298  { PWM_SERVO_3_ACTIVE, NULL }, \
299  { PWM_SERVO_4_ACTIVE, NULL }, \
300  }, \
301  0, \
302  0 \
303 }
304 
305 #ifdef STM32_PWM_USE_TIM4
306 #define PWM_CONF_TIM4 STM32_PWM_USE_TIM4
307 #else
308 #define PWM_CONF_TIM4 1
309 #endif
310 #define PWM_CONF4_DEF { \
311  PWM_FREQUENCY, \
312  PWM_FREQUENCY/TIM4_SERVO_HZ, \
313  NULL, \
314  { \
315  { PWM_SERVO_5_ACTIVE, NULL }, \
316  { PWM_SERVO_6_ACTIVE, NULL }, \
317  { PWM_SERVO_7_ACTIVE, NULL }, \
318  { PWM_SERVO_8_ACTIVE, NULL }, \
319  }, \
320  0, \
321  0 \
322 }
323 
327 #ifndef DSHOT_TELEMETRY_DEV
328 #define DSHOT_TELEMETRY_DEV NULL
329 #endif
330 
331 #ifndef USE_DSHOT_TIM4
332 #define USE_DSHOT_TIM4 1 // use SRVb for DShot by default
333 #endif
334 
335 #if USE_DSHOT_TIM4 // Servo B1, B2, B3, B4 on TIM4
336 
337 // Servo B1, B2, B3, B4 on TM4 are primary DSHOT connector
338 #define DSHOT_SERVO_1 1
339 #define DSHOT_SERVO_1_GPIO GPIOB
340 #define DSHOT_SERVO_1_PIN GPIO6
341 #define DSHOT_SERVO_1_AF GPIO_AF2
342 #define DSHOT_SERVO_1_DRIVER DSHOTD4
343 #define DSHOT_SERVO_1_CHANNEL 0
344 
345 #define DSHOT_SERVO_2 2
346 #define DSHOT_SERVO_2_GPIO GPIOB
347 #define DSHOT_SERVO_2_PIN GPIO7
348 #define DSHOT_SERVO_2_AF GPIO_AF2
349 #define DSHOT_SERVO_2_DRIVER DSHOTD4
350 #define DSHOT_SERVO_2_CHANNEL 1
351 
352 #define DSHOT_SERVO_3 3
353 #define DSHOT_SERVO_3_GPIO GPIOB
354 #define DSHOT_SERVO_3_PIN GPIO8
355 #define DSHOT_SERVO_3_AF GPIO_AF2
356 #define DSHOT_SERVO_3_DRIVER DSHOTD4
357 #define DSHOT_SERVO_3_CHANNEL 2
358 
359 #define DSHOT_SERVO_4 4
360 #define DSHOT_SERVO_4_GPIO GPIOB
361 #define DSHOT_SERVO_4_PIN GPIO9
362 #define DSHOT_SERVO_4_AF GPIO_AF2
363 #define DSHOT_SERVO_4_DRIVER DSHOTD4
364 #define DSHOT_SERVO_4_CHANNEL 3
365 
366 #define DSHOT_CONF_TIM4 1
367 #define DSHOT_CONF4_DEF { \
368  .dma_stream = STM32_PWM4_UP_DMA_STREAM, \
369  .dma_channel = STM32_PWM4_UP_DMA_CHANNEL, \
370  .pwmp = &PWMD4, \
371  .tlm_sd = DSHOT_TELEMETRY_DEV \
372 }
373 
374 #endif
375 
376 #if USE_DSHOT_TIM1 // Servo A1, A2, A3, A4 on TIM1 only activated if needed
377 
378 #define DSHOT_SERVO_5 5
379 #define DSHOT_SERVO_5_GPIO GPIOE
380 #define DSHOT_SERVO_5_PIN GPIO9
381 #define DSHOT_SERVO_5_AF GPIO_AF1
382 #define DSHOT_SERVO_5_DRIVER DSHOTD1
383 #define DSHOT_SERVO_5_CHANNEL 0
384 
385 #define DSHOT_SERVO_6 6
386 #define DSHOT_SERVO_6_GPIO GPIOE
387 #define DSHOT_SERVO_6_PIN GPIO11
388 #define DSHOT_SERVO_6_AF GPIO_AF1
389 #define DSHOT_SERVO_6_DRIVER DSHOTD1
390 #define DSHOT_SERVO_6_CHANNEL 1
391 
392 #define DSHOT_SERVO_7 7
393 #define DSHOT_SERVO_7_GPIO GPIOE
394 #define DSHOT_SERVO_7_PIN GPIO13
395 #define DSHOT_SERVO_7_AF GPIO_AF1
396 #define DSHOT_SERVO_7_DRIVER DSHOTD1
397 #define DSHOT_SERVO_7_CHANNEL 2
398 
399 #define DSHOT_SERVO_8 8
400 #define DSHOT_SERVO_8_GPIO GPIOE
401 #define DSHOT_SERVO_8_PIN GPIO14
402 #define DSHOT_SERVO_8_AF GPIO_AF1
403 #define DSHOT_SERVO_8_DRIVER DSHOTD1
404 #define DSHOT_SERVO_8_CHANNEL 3
405 
406 #define DSHOT_CONF_TIM1 1
407 #define DSHOT_CONF1_DEF { \
408  .dma_stream = STM32_PWM1_UP_DMA_STREAM, \
409  .dma_channel = STM32_PWM1_UP_DMA_CHANNEL, \
410  .pwmp = &PWMD1, \
411  .tlm_sd = DSHOT_TELEMETRY_DEV \
412 }
413 
414 #endif
415 
419 #define UART2_GPIO_PORT_TX GPIOD
420 #define UART2_GPIO_TX GPIO5
421 #define UART2_GPIO_PORT_RX GPIOD
422 #define UART2_GPIO_RX GPIO6
423 #define UART2_GPIO_AF 7
424 #ifndef UART2_HW_FLOW_CONTROL
425 #define UART2_HW_FLOW_CONTROL FALSE
426 #endif
427 
433 #define UART3_GPIO_PORT_TX GPIOD
434 #define UART3_GPIO_TX GPIO8
435 #define UART3_GPIO_PORT_RX GPIOD
436 #define UART3_GPIO_RX GPIO9
437 #define UART3_GPIO_AF 7
438 
439 #define UART7_GPIO_PORT_TX GPIOA
440 #define UART7_GPIO_TX GPIO15
441 #define UART7_GPIO_PORT_RX GPIOB
442 #define UART7_GPIO_RX GPIO3
443 #define UART7_GPIO_AF 12
444 
449 #define UART4_GPIO_PORT_TX GPIOA
450 #define UART4_GPIO_TX GPIO0
451 #define UART4_GPIO_PORT_RX GPIOA
452 #define UART4_GPIO_RX GPIO1
453 #define UART4_GPIO_AF 8
454 
467 // In case, do dynamic config of UARTs
468 #define USE_UART8_RX TRUE
469 #ifndef USE_UART8_TX // may be used in half duplex mode
470 #define USE_UART8_TX FALSE
471 #endif
472 #define UART8_GPIO_PORT_RX GPIOE
473 #define UART8_GPIO_RX GPIO0
474 #define UART8_GPIO_AF 8
475 
476 // FIXME when RC2 is used for FrSky telemetry
477 #define USE_UART6_RX TRUE
478 #define USE_UART6_TX FALSE
479 #define UART6_GPIO_PORT_RX GPIOC
480 #define UART6_GPIO_RX GPIO6
481 #define UART6_GPIO_AF 8
482 
483 /* The line that is pulled low at power up to initiate the bind process
484  * PB1: AUXb4
485  */
486 #define SPEKTRUM_BIND_PIN GPIO1
487 #define SPEKTRUM_BIND_PIN_PORT GPIOB
488 
489 // no wait with chibios as the RTC oscillator takes longer to stabilize
490 #define SPEKTRUM_BIND_WAIT 30000
491 
497 #define RC_PPM_TICKS_PER_USEC 6
498 #define PPM_TIMER_FREQUENCY 6000000
499 #define PPM_CHANNEL ICU_CHANNEL_1
500 #define PPM_TIMER ICUD8
501 
502 /*
503  * PWM input
504  */
505 // PWM_INPUT 1 on PA0 (AUXa1)
506 #define PWM_INPUT1_ICU ICUD2
507 #define PWM_INPUT1_CHANNEL ICU_CHANNEL_1
508 #define PWM_INPUT1_GPIO_PORT GPIOA
509 #define PWM_INPUT1_GPIO_PIN GPIO0
510 #define PWM_INPUT1_GPIO_AF GPIO_AF1
511 
512 // PWM_INPUT 2 on PA1 (AUXa2)
513 #define PWM_INPUT2_ICU ICUD5
514 #define PWM_INPUT2_CHANNEL ICU_CHANNEL_2
515 #define PWM_INPUT2_GPIO_PORT GPIOA
516 #define PWM_INPUT2_GPIO_PIN GPIO1
517 #define PWM_INPUT2_GPIO_AF GPIO_AF2
518 
522 // Digital noise filter: 0 disabled, [0x1 - 0xF] enable up to n t_I2CCLK
523 #define STM32_CR1_DNF(n) ((n & 0x0f) << 8)
524 // Timing register
525 #define I2C_FAST_400KHZ_DNF0_100NS_PCLK54MHZ_TIMINGR (STM32_TIMINGR_PRESC(0U) | \
526  STM32_TIMINGR_SCLDEL(10U) | STM32_TIMINGR_SDADEL(0U) | \
527  STM32_TIMINGR_SCLH(34U) | STM32_TIMINGR_SCLL(86U))
528 #define I2C_STD_100KHZ_DNF0_100NS_PCLK54MHZ_TIMINGR (STM32_TIMINGR_PRESC(1U) | \
529  STM32_TIMINGR_SCLDEL(9U) | STM32_TIMINGR_SDADEL(0U) | \
530  STM32_TIMINGR_SCLH(105U) | STM32_TIMINGR_SCLL(153U))
531 
532 
533 // Internal I2C (baro, magneto)
534 
535 #ifndef I2C4_CLOCK_SPEED
536 #define I2C4_CLOCK_SPEED 400000
537 #endif
538 
539 #if I2C4_CLOCK_SPEED == 400000
540 #define I2C4_CFG_DEF { \
541  .timingr = I2C_FAST_400KHZ_DNF0_100NS_PCLK54MHZ_TIMINGR, \
542  .cr1 = STM32_CR1_DNF(0), \
543  .cr2 = 0 \
544 }
545 #elif I2C4_CLOCK_SPEED == 100000
546 #define I2C4_CFG_DEF { \
547  .timingr = I2C_STD_100KHZ_DNF0_100NS_PCLK54MHZ_TIMINGR, \
548  .cr1 = STM32_CR1_DNF(0), \
549  .cr2 = 0 \
550 }
551 #else
552 #error "Unknown I2C4 clock speed"
553 #endif
554 
555 // External I2C
556 
557 #ifndef I2C2_CLOCK_SPEED
558 #define I2C2_CLOCK_SPEED 400000
559 #endif
560 
561 #if I2C2_CLOCK_SPEED == 400000
562 #define I2C2_CFG_DEF { \
563  .timingr = I2C_FAST_400KHZ_DNF0_100NS_PCLK54MHZ_TIMINGR, \
564  .cr1 = STM32_CR1_DNF(0), \
565  .cr2 = 0 \
566 }
567 #elif I2C2_CLOCK_SPEED == 100000
568 #define I2C2_CFG_DEF { \
569  .timingr = I2C_STD_100KHZ_DNF0_100NS_PCLK54MHZ_TIMINGR, \
570  .cr1 = STM32_CR1_DNF(0), \
571  .cr2 = 0 \
572 }
573 #else
574 #error "Unknown I2C2 clock speed"
575 #endif
576 
581 // Internal SPI (IMU)
582 #define SPI4_GPIO_AF GPIO_AF5
583 #define SPI4_GPIO_PORT_MISO GPIOE
584 #define SPI4_GPIO_MISO GPIO5
585 #define SPI4_GPIO_PORT_MOSI GPIOE
586 #define SPI4_GPIO_MOSI GPIO6
587 #define SPI4_GPIO_PORT_SCK GPIOE
588 #define SPI4_GPIO_SCK GPIO2
589 
590 // External SPI
591 #define SPI2_GPIO_AF GPIO_AF5
592 #define SPI2_GPIO_PORT_MISO GPIOB
593 #define SPI2_GPIO_MISO GPIO14
594 #define SPI2_GPIO_PORT_MOSI GPIOB
595 #define SPI2_GPIO_MOSI GPIO15
596 #define SPI2_GPIO_PORT_SCK GPIOD
597 #define SPI2_GPIO_SCK GPIO3
598 
599 // SLAVE0 on SPI connector (NSS possible)
600 #define SPI_SELECT_SLAVE0_PORT GPIOB
601 #define SPI_SELECT_SLAVE0_PIN GPIO12
602 // SLAVE1 on AUXb1
603 #define SPI_SELECT_SLAVE1_PORT GPIOA
604 #define SPI_SELECT_SLAVE1_PIN GPIO3
605 // SLAVE2 on AUXb2
606 #define SPI_SELECT_SLAVE2_PORT GPIOA
607 #define SPI_SELECT_SLAVE2_PIN GPIO7
608 // SLAVE3 on AUXb3
609 #define SPI_SELECT_SLAVE3_PORT GPIOB
610 #define SPI_SELECT_SLAVE3_PIN GPIO0
611 // SLAVE4 on AUXb4
612 #define SPI_SELECT_SLAVE4_PORT GPIOB
613 #define SPI_SELECT_SLAVE4_PIN GPIO1
614 // SLAVE5 on PE4 (internal IMU)
615 #define SPI_SELECT_SLAVE5_PORT GPIOE
616 #define SPI_SELECT_SLAVE5_PIN GPIO4
617 
624 #ifndef USE_BARO_BOARD
625 #define USE_BARO_BOARD 0
626 #endif
627 
631 #define SDIO_D0_PORT GPIOC
632 #define SDIO_D0_PIN GPIO8
633 #define SDIO_D1_PORT GPIOC
634 #define SDIO_D1_PIN GPIO9
635 #define SDIO_D2_PORT GPIOC
636 #define SDIO_D2_PIN GPIO10
637 #define SDIO_D3_PORT GPIOC
638 #define SDIO_D3_PIN GPIO11
639 #define SDIO_CK_PORT GPIOC
640 #define SDIO_CK_PIN GPIO12
641 #define SDIO_CMD_PORT GPIOD
642 #define SDIO_CMD_PIN GPIO2
643 #define SDIO_AF 12
644 // bat monitoring for file closing
645 #define SDLOG_BAT_ADC ADCD1
646 #define SDLOG_BAT_CHAN ADC_CHANNEL_IN10
647 // usb led status
648 #define SDLOG_USB_LED 4
649 #define SDLOG_USB_VBUS_PORT GPIOA
650 #define SDLOG_USB_VBUS_PIN GPIO9
651 
652 
653 /*
654  * Actuators for fixedwing
655  */
656  /* Default actuators driver */
657 #define DEFAULT_ACTUATORS "subsystems/actuators/actuators_pwm.h"
658 #define ActuatorDefaultSet(_x,_y) ActuatorPwmSet(_x,_y)
659 #define ActuatorsDefaultInit() ActuatorsPwmInit()
660 #define ActuatorsDefaultCommit() ActuatorsPwmCommit()
661 
662 #endif /* CONFIG_TAWAKI_1_00_H */
663