37 #include <pios_config.h>
42 #if defined(PIOS_INCLUDE_ANNUNC)
50 .GPIO_Pin = GPIO_Pin_13,
51 .GPIO_Speed = GPIO_Speed_50MHz,
52 .GPIO_Mode = GPIO_Mode_OUT,
53 .GPIO_OType = GPIO_OType_PP,
54 .GPIO_PuPd = GPIO_PuPd_DOWN
64 .GPIO_Pin = GPIO_Pin_8,
65 .GPIO_Speed = GPIO_Speed_50MHz,
66 .GPIO_Mode = GPIO_Mode_OUT,
67 .GPIO_OType = GPIO_OType_PP,
68 .GPIO_PuPd = GPIO_PuPd_DOWN
74 #if defined(PIOS_INCLUDE_RE1_FPGA)
83 .num_annunciators =
NELEMENTS(pios_annuncs),
86 const struct pios_annunc_cfg * PIOS_BOARD_HW_DEFS_GetLedCfg (uint32_t
board_revision)
88 return &pios_annunc_cfg;
93 #if defined(PIOS_INCLUDE_FLASH)
98 .arena_size = 0x00010000,
99 .slot_size = 0x00000100,
102 #if defined(PIOS_INCLUDE_FLASH_JEDEC)
107 .expect_memorytype = 0x20,
108 .expect_capacity = 0x18,
109 .sector_erase = 0xd8,
113 #if defined(PIOS_INCLUDE_FLASH_INTERNAL)
122 #if defined(PIOS_INCLUDE_FLASH_INTERNAL)
142 uintptr_t pios_internal_flash_id;
145 .chip_id = &pios_internal_flash_id,
147 .sector_blocks = stm32f4_sectors,
148 .num_blocks =
NELEMENTS(stm32f4_sectors),
152 #if defined(PIOS_INCLUDE_FLASH_JEDEC)
167 uintptr_t pios_external_flash_id;
170 .chip_id = &pios_external_flash_id,
172 .sector_blocks = s25fl127_sectors,
173 .num_blocks =
NELEMENTS(s25fl127_sectors),
178 #if defined(PIOS_INCLUDE_FLASH_INTERNAL)
181 .chip_desc = &pios_flash_chip_internal,
192 .chip_desc = &pios_flash_chip_internal,
204 .chip_desc = &pios_flash_chip_external,
213 .chip_desc = &pios_flash_chip_external,
222 .chip_desc = &pios_flash_chip_external,
235 *num_partitions =
NELEMENTS(pios_flash_partition_table);
243 #if defined(PIOS_INCLUDE_SPI)
252 .remap = GPIO_AF_SPI1,
254 .SPI_Mode = SPI_Mode_Master,
255 .SPI_Direction = SPI_Direction_2Lines_FullDuplex,
256 .SPI_DataSize = SPI_DataSize_8b,
257 .SPI_NSS = SPI_NSS_Soft,
258 .SPI_FirstBit = SPI_FirstBit_MSB,
259 .SPI_CRCPolynomial = 7,
260 .SPI_CPOL = SPI_CPOL_High,
261 .SPI_CPHA = SPI_CPHA_2Edge,
262 .SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_16,
267 .GPIO_Pin = GPIO_Pin_5,
268 .GPIO_Speed = GPIO_Speed_100MHz,
269 .GPIO_Mode = GPIO_Mode_AF,
270 .GPIO_OType = GPIO_OType_PP,
271 .GPIO_PuPd = GPIO_PuPd_UP
277 .GPIO_Pin = GPIO_Pin_6,
278 .GPIO_Speed = GPIO_Speed_50MHz,
279 .GPIO_Mode = GPIO_Mode_AF,
280 .GPIO_OType = GPIO_OType_PP,
281 .GPIO_PuPd = GPIO_PuPd_UP
287 .GPIO_Pin = GPIO_Pin_7,
288 .GPIO_Speed = GPIO_Speed_50MHz,
289 .GPIO_Mode = GPIO_Mode_AF,
290 .GPIO_OType = GPIO_OType_PP,
291 .GPIO_PuPd = GPIO_PuPd_UP
298 .GPIO_Pin = GPIO_Pin_14,
299 .GPIO_Speed = GPIO_Speed_2MHz,
300 .GPIO_Mode = GPIO_Mode_OUT,
301 .GPIO_OType = GPIO_OType_PP,
302 .GPIO_PuPd = GPIO_PuPd_UP
312 .remap = GPIO_AF_SPI3,
314 .SPI_Mode = SPI_Mode_Master,
315 .SPI_Direction = SPI_Direction_2Lines_FullDuplex,
316 .SPI_DataSize = SPI_DataSize_8b,
317 .SPI_NSS = SPI_NSS_Soft,
318 .SPI_FirstBit = SPI_FirstBit_MSB,
319 .SPI_CRCPolynomial = 7,
320 .SPI_CPOL = SPI_CPOL_High,
321 .SPI_CPHA = SPI_CPHA_2Edge,
322 .SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_8,
327 .GPIO_Pin = GPIO_Pin_3,
328 .GPIO_Speed = GPIO_Speed_100MHz,
329 .GPIO_Mode = GPIO_Mode_AF,
330 .GPIO_OType = GPIO_OType_PP,
331 .GPIO_PuPd = GPIO_PuPd_NOPULL
333 .pin_source = GPIO_PinSource3,
338 .GPIO_Pin = GPIO_Pin_11,
339 .GPIO_Speed = GPIO_Speed_50MHz,
340 .GPIO_Mode = GPIO_Mode_AF,
341 .GPIO_OType = GPIO_OType_PP,
342 .GPIO_PuPd = GPIO_PuPd_NOPULL
344 .pin_source = GPIO_PinSource11,
349 .GPIO_Pin = GPIO_Pin_12,
350 .GPIO_Speed = GPIO_Speed_50MHz,
351 .GPIO_Mode = GPIO_Mode_AF,
352 .GPIO_OType = GPIO_OType_PP,
353 .GPIO_PuPd = GPIO_PuPd_NOPULL
355 .pin_source = GPIO_PinSource12,
362 .GPIO_Pin = GPIO_Pin_15,
363 .GPIO_Speed = GPIO_Speed_50MHz,
364 .GPIO_Mode = GPIO_Mode_OUT,
365 .GPIO_OType = GPIO_OType_PP,
366 .GPIO_PuPd = GPIO_PuPd_UP
368 .pin_source = GPIO_PinSource15,
373 .GPIO_Pin = GPIO_Pin_15,
374 .GPIO_Speed = GPIO_Speed_2MHz,
375 .GPIO_Mode = GPIO_Mode_OUT,
376 .GPIO_OType = GPIO_OType_PP,
377 .GPIO_PuPd = GPIO_PuPd_UP
379 .pin_source = GPIO_PinSource15,
389 #if defined(PIOS_INCLUDE_I2C)
390 #include <pios_i2c_priv.h>
395 void PIOS_I2C_internal_ev_irq_handler(
void);
396 void PIOS_I2C_internal_er_irq_handler(
void);
402 .remap = GPIO_AF_I2C1,
404 .I2C_Mode = I2C_Mode_I2C,
405 .I2C_OwnAddress1 = 0,
406 .I2C_Ack = I2C_Ack_Enable,
407 .I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit,
408 .I2C_DutyCycle = I2C_DutyCycle_2,
409 .I2C_ClockSpeed = 400000,
411 .transfer_timeout_ms = 50,
415 .GPIO_Pin = GPIO_Pin_8,
416 .GPIO_Mode = GPIO_Mode_AF,
417 .GPIO_Speed = GPIO_Speed_50MHz,
418 .GPIO_OType = GPIO_OType_OD,
419 .GPIO_PuPd = GPIO_PuPd_NOPULL,
421 .pin_source = GPIO_PinSource8,
426 .GPIO_Pin = GPIO_Pin_9,
427 .GPIO_Mode = GPIO_Mode_AF,
428 .GPIO_Speed = GPIO_Speed_50MHz,
429 .GPIO_OType = GPIO_OType_OD,
430 .GPIO_PuPd = GPIO_PuPd_NOPULL,
432 .pin_source = GPIO_PinSource9,
437 .NVIC_IRQChannel = I2C1_EV_IRQn,
439 .NVIC_IRQChannelSubPriority = 0,
440 .NVIC_IRQChannelCmd = ENABLE,
446 .NVIC_IRQChannel = I2C1_ER_IRQn,
448 .NVIC_IRQChannelSubPriority = 0,
449 .NVIC_IRQChannelCmd = ENABLE,
455 void PIOS_I2C_external_ev_irq_handler(
void)
461 void PIOS_I2C_external_er_irq_handler(
void)
468 #if defined(PIOS_INCLUDE_COM)
472 #if defined(PIOS_INCLUDE_RCVR)
476 #if defined(PIOS_INCLUDE_USB)
482 .NVIC_IRQChannel = OTG_FS_IRQn,
484 .NVIC_IRQChannelSubPriority = 0,
485 .NVIC_IRQChannelCmd = ENABLE,
491 .GPIO_Pin = GPIO_Pin_9,
492 .GPIO_Speed = GPIO_Speed_25MHz,
493 .GPIO_Mode = GPIO_Mode_IN,
494 .GPIO_OType = GPIO_OType_OD,
495 .GPIO_PuPd = GPIO_PuPd_NOPULL,
507 #if defined(PIOS_INCLUDE_COM_MSG)
513 #if defined(PIOS_INCLUDE_USB_HID) && !defined(PIOS_INCLUDE_USB_CDC)
523 #if defined(PIOS_INCLUDE_USB_HID) && defined(PIOS_INCLUDE_USB_CDC)
537 const struct pios_usb_hid_cfg pios_usb_hid_cfg = {
544 #if defined(PIOS_INCLUDE_ADC)
548 void PIOS_ADC_DMA_irq_handler(
void);
554 .flags = (DMA_FLAG_TCIF4 | DMA_FLAG_TEIF4 | DMA_FLAG_HTIF4),
556 .NVIC_IRQChannel = DMA2_Stream4_IRQn,
558 .NVIC_IRQChannelSubPriority = 0,
559 .NVIC_IRQChannelCmd = ENABLE,
563 .channel = DMA2_Stream4,
565 .DMA_Channel = DMA_Channel_0,
566 .DMA_PeripheralBaseAddr = (uint32_t)&ADC1->DR
570 .half_flag = DMA_IT_HTIF4,
571 .full_flag = DMA_IT_TCIF4,
573 { GPIOC, GPIO_Pin_1, ADC_Channel_11 }, \
574 { GPIOC, GPIO_Pin_0, ADC_Channel_10 }, \
575 { GPIOC, GPIO_Pin_3, ADC_Channel_13 } \
580 void PIOS_ADC_DMA_irq_handler(
void)
589 #if defined(PIOS_INCLUDE_RTC)
593 #include <pios_rtc_priv.h>
595 void PIOS_RTC_IRQ_Handler (
void);
599 .
clksrc = RCC_RTCCLKSource_HSE_Div16,
605 .NVIC_IRQChannel = RTC_WKUP_IRQn,
607 .NVIC_IRQChannelSubPriority = 0,
608 .NVIC_IRQChannelCmd = ENABLE,
613 void PIOS_RTC_IRQ_Handler (
void)
620 #if defined(PIOS_INCLUDE_USART)
626 .remap = GPIO_AF_USART1,
629 .NVIC_IRQChannel = USART1_IRQn,
631 .NVIC_IRQChannelSubPriority = 0,
632 .NVIC_IRQChannelCmd = ENABLE,
638 .GPIO_Pin = GPIO_Pin_7,
639 .GPIO_Speed = GPIO_Speed_25MHz,
640 .GPIO_Mode = GPIO_Mode_AF,
641 .GPIO_OType = GPIO_OType_PP,
642 .GPIO_PuPd = GPIO_PuPd_UP
644 .pin_source = GPIO_PinSource7,
649 .GPIO_Pin = GPIO_Pin_6,
650 .GPIO_Speed = GPIO_Speed_25MHz,
651 .GPIO_Mode = GPIO_Mode_AF,
652 .GPIO_OType = GPIO_OType_PP,
653 .GPIO_PuPd = GPIO_PuPd_UP
655 .pin_source = GPIO_PinSource6,
661 .remap = GPIO_AF_USART3,
664 .NVIC_IRQChannel = USART3_IRQn,
666 .NVIC_IRQChannelSubPriority = 0,
667 .NVIC_IRQChannelCmd = ENABLE,
673 .GPIO_Pin = GPIO_Pin_5,
674 .GPIO_Speed = GPIO_Speed_2MHz,
675 .GPIO_Mode = GPIO_Mode_AF,
676 .GPIO_OType = GPIO_OType_PP,
677 .GPIO_PuPd = GPIO_PuPd_UP
679 .pin_source = GPIO_PinSource5,
685 .remap = GPIO_AF_UART4,
688 .NVIC_IRQChannel = UART4_IRQn,
690 .NVIC_IRQChannelSubPriority = 0,
691 .NVIC_IRQChannelCmd = ENABLE,
697 .GPIO_Pin = GPIO_Pin_1,
698 .GPIO_Speed = GPIO_Speed_25MHz,
699 .GPIO_Mode = GPIO_Mode_AF,
700 .GPIO_OType = GPIO_OType_PP,
701 .GPIO_PuPd = GPIO_PuPd_UP
703 .pin_source = GPIO_PinSource1,
708 .GPIO_Pin = GPIO_Pin_0,
709 .GPIO_Speed = GPIO_Speed_25MHz,
710 .GPIO_Mode = GPIO_Mode_AF,
711 .GPIO_OType = GPIO_OType_PP,
712 .GPIO_PuPd = GPIO_PuPd_UP
714 .pin_source = GPIO_PinSource0,
720 .remap = GPIO_AF_USART6,
723 .NVIC_IRQChannel = USART6_IRQn,
725 .NVIC_IRQChannelSubPriority = 0,
726 .NVIC_IRQChannelCmd = ENABLE,
732 .GPIO_Pin = GPIO_Pin_7,
733 .GPIO_Speed = GPIO_Speed_25MHz,
734 .GPIO_Mode = GPIO_Mode_AF,
735 .GPIO_OType = GPIO_OType_PP,
736 .GPIO_PuPd = GPIO_PuPd_UP
738 .pin_source = GPIO_PinSource7,
743 .GPIO_Pin = GPIO_Pin_6,
744 .GPIO_Speed = GPIO_Speed_25MHz,
745 .GPIO_Mode = GPIO_Mode_AF,
746 .GPIO_OType = GPIO_OType_PP,
747 .GPIO_PuPd = GPIO_PuPd_UP
749 .pin_source = GPIO_PinSource6,
755 #if defined(PIOS_INCLUDE_PPM)
764 .TIM_Prescaler = (PIOS_PERIPHERAL_APB1_COUNTER_CLOCK / 1000000) - 1,
765 .TIM_ClockDivision = TIM_CKD_DIV1,
766 .TIM_CounterMode = TIM_CounterMode_Up,
767 .TIM_Period = 0xFFFF,
768 .TIM_RepetitionCounter = 0x0000,
776 .NVIC_IRQChannel = TIM8_BRK_TIM12_IRQn,
778 .NVIC_IRQChannelSubPriority = 0,
779 .NVIC_IRQChannelCmd = ENABLE,
787 .timer_chan = TIM_Channel_1,
788 .remap = GPIO_AF_TIM12,
792 .GPIO_Pin = GPIO_Pin_14,
793 .GPIO_Speed = GPIO_Speed_2MHz,
794 .GPIO_Mode = GPIO_Mode_AF,
795 .GPIO_OType = GPIO_OType_PP,
796 .GPIO_PuPd = GPIO_PuPd_UP
798 .pin_source = GPIO_PinSource14,
806 .TIM_ICPolarity = TIM_ICPolarity_Rising,
807 .TIM_ICSelection = TIM_ICSelection_DirectTI,
808 .TIM_ICPrescaler = TIM_ICPSC_DIV1,
810 .TIM_Channel = TIM_Channel_3,
812 .channels = &pios_tim_ppm_channel[0],
817 #if defined(PIOS_INCLUDE_DSM)
823 static const struct pios_dsm_cfg pios_rxport_dsm_cfg = {
827 .GPIO_Pin = GPIO_Pin_14,
828 .GPIO_Speed = GPIO_Speed_2MHz,
829 .GPIO_Mode = GPIO_Mode_OUT,
830 .GPIO_OType = GPIO_OType_PP,
831 .GPIO_PuPd = GPIO_PuPd_NOPULL
837 #if defined(PIOS_INCLUDE_SERVO) && defined(PIOS_INCLUDE_TIM)
841 .TIM_Prescaler = (PIOS_PERIPHERAL_APB1_COUNTER_CLOCK / 1000000) - 1,
842 .TIM_ClockDivision = TIM_CKD_DIV1,
843 .TIM_CounterMode = TIM_CounterMode_Up,
845 .TIM_RepetitionCounter = 0x0000,
853 .NVIC_IRQChannel = TIM5_IRQn,
855 .NVIC_IRQChannelSubPriority = 0,
856 .NVIC_IRQChannelCmd = ENABLE,
866 .NVIC_IRQChannel = TIM8_UP_TIM13_IRQn,
868 .NVIC_IRQChannelSubPriority = 0,
869 .NVIC_IRQChannelCmd = ENABLE,
876 .TIM_Prescaler = (PIOS_PERIPHERAL_APB2_COUNTER_CLOCK / 1000000) - 1,
877 .TIM_ClockDivision = TIM_CKD_DIV1,
878 .TIM_CounterMode = TIM_CounterMode_Up,
880 .TIM_RepetitionCounter = 0x0000,
888 .NVIC_IRQChannel = TIM1_UP_TIM10_IRQn,
890 .NVIC_IRQChannelSubPriority = 0,
891 .NVIC_IRQChannelCmd = ENABLE,
911 .timer_chan = TIM_Channel_1,
912 .remap = GPIO_AF_TIM5,
916 .GPIO_Pin = GPIO_Pin_0,
917 .GPIO_Speed = GPIO_Speed_2MHz,
918 .GPIO_Mode = GPIO_Mode_AF,
919 .GPIO_OType = GPIO_OType_PP,
920 .GPIO_PuPd = GPIO_PuPd_UP
922 .pin_source = GPIO_PinSource0,
927 .timer_chan = TIM_Channel_2,
928 .remap = GPIO_AF_TIM5,
932 .GPIO_Pin = GPIO_Pin_1,
933 .GPIO_Speed = GPIO_Speed_2MHz,
934 .GPIO_Mode = GPIO_Mode_AF,
935 .GPIO_OType = GPIO_OType_PP,
936 .GPIO_PuPd = GPIO_PuPd_UP
938 .pin_source = GPIO_PinSource1,
943 .timer_chan = TIM_Channel_3,
944 .remap = GPIO_AF_TIM5,
948 .GPIO_Pin = GPIO_Pin_2,
949 .GPIO_Speed = GPIO_Speed_2MHz,
950 .GPIO_Mode = GPIO_Mode_AF,
951 .GPIO_OType = GPIO_OType_PP,
952 .GPIO_PuPd = GPIO_PuPd_UP
954 .pin_source = GPIO_PinSource2,
959 .timer_chan = TIM_Channel_4,
960 .remap = GPIO_AF_TIM5,
964 .GPIO_Pin = GPIO_Pin_3,
965 .GPIO_Speed = GPIO_Speed_2MHz,
966 .GPIO_Mode = GPIO_Mode_AF,
967 .GPIO_OType = GPIO_OType_PP,
968 .GPIO_PuPd = GPIO_PuPd_UP
970 .pin_source = GPIO_PinSource3,
975 .timer_chan = TIM_Channel_3,
976 .remap = GPIO_AF_TIM1,
980 .GPIO_Pin = GPIO_Pin_10,
981 .GPIO_Speed = GPIO_Speed_2MHz,
982 .GPIO_Mode = GPIO_Mode_AF,
983 .GPIO_OType = GPIO_OType_PP,
984 .GPIO_PuPd = GPIO_PuPd_UP
986 .pin_source = GPIO_PinSource10,
991 .timer_chan = TIM_Channel_1,
992 .remap = GPIO_AF_TIM2,
996 .GPIO_Pin = GPIO_Pin_15,
997 .GPIO_Speed = GPIO_Speed_2MHz,
998 .GPIO_Mode = GPIO_Mode_AF,
999 .GPIO_OType = GPIO_OType_PP,
1000 .GPIO_PuPd = GPIO_PuPd_UP
1002 .pin_source = GPIO_PinSource15,
1007 .timer_chan = TIM_Channel_1,
1008 .remap = GPIO_AF_TIM8,
1012 .GPIO_Pin = GPIO_Pin_6,
1013 .GPIO_Speed = GPIO_Speed_2MHz,
1014 .GPIO_Mode = GPIO_Mode_AF,
1015 .GPIO_OType = GPIO_OType_PP,
1016 .GPIO_PuPd = GPIO_PuPd_UP
1018 .pin_source = GPIO_PinSource6,
1023 .timer_chan = TIM_Channel_2,
1024 .remap = GPIO_AF_TIM8,
1028 .GPIO_Pin = GPIO_Pin_7,
1029 .GPIO_Speed = GPIO_Speed_2MHz,
1030 .GPIO_Mode = GPIO_Mode_AF,
1031 .GPIO_OType = GPIO_OType_PP,
1032 .GPIO_PuPd = GPIO_PuPd_UP
1034 .pin_source = GPIO_PinSource7,
1039 #if defined(PIOS_INCLUDE_DMASHOT)
1046 .stream = DMA1_Stream6,
1047 .channel = DMA_Channel_6,
1048 .tcif = DMA_FLAG_TCIF6
1052 .stream = DMA2_Stream5,
1053 .channel = DMA_Channel_6,
1054 .tcif = DMA_FLAG_TCIF5
1058 .stream = DMA1_Stream7,
1059 .channel = DMA_Channel_3,
1060 .tcif = DMA_FLAG_TCIF7
1064 .stream = DMA2_Stream1,
1065 .channel = DMA_Channel_7,
1066 .tcif = DMA_FLAG_TCIF1
1072 .num_timers =
NELEMENTS(dmashot_tim_cfg)
1084 .TIM_OCMode = TIM_OCMode_PWM1,
1085 .TIM_OutputState = TIM_OutputState_Enable,
1086 .TIM_OutputNState = TIM_OutputNState_Disable,
1088 .TIM_OCPolarity = TIM_OCPolarity_High,
1089 .TIM_OCNPolarity = TIM_OCPolarity_High,
1090 .TIM_OCIdleState = TIM_OCIdleState_Reset,
1091 .TIM_OCNIdleState = TIM_OCNIdleState_Reset,
1093 .channels = &pios_tim_servoport_all_pins[2],
1094 .num_channels =
NELEMENTS(pios_tim_servoport_all_pins) - 4,
1099 .TIM_OCMode = TIM_OCMode_PWM1,
1100 .TIM_OutputState = TIM_OutputState_Enable,
1101 .TIM_OutputNState = TIM_OutputNState_Disable,
1103 .TIM_OCPolarity = TIM_OCPolarity_High,
1104 .TIM_OCNPolarity = TIM_OCPolarity_High,
1105 .TIM_OCIdleState = TIM_OCIdleState_Reset,
1106 .TIM_OCNIdleState = TIM_OCNIdleState_Reset,
1109 .num_channels =
NELEMENTS(pios_tim_servoport_all_pins) - 2,
1114 .TIM_OCMode = TIM_OCMode_PWM1,
1115 .TIM_OutputState = TIM_OutputState_Enable,
1116 .TIM_OutputNState = TIM_OutputNState_Disable,
1118 .TIM_OCPolarity = TIM_OCPolarity_High,
1119 .TIM_OCNPolarity = TIM_OCPolarity_High,
1120 .TIM_OCIdleState = TIM_OCIdleState_Reset,
1121 .TIM_OCNIdleState = TIM_OCNIdleState_Reset,
1124 .num_channels =
NELEMENTS(pios_tim_servoport_all_pins),
1128 #if defined(PIOS_INCLUDE_VIDEO_QUADSPI)
1138 .GPIO_Pin = GPIO_Pin_5,
1139 .GPIO_Speed = GPIO_Speed_100MHz,
1140 .GPIO_Mode = GPIO_Mode_IN,
1141 .GPIO_OType = GPIO_OType_OD,
1142 .GPIO_PuPd = GPIO_PuPd_NOPULL,
1147 .NVIC_IRQChannel = EXTI9_5_IRQn,
1149 .NVIC_IRQChannelSubPriority = 0,
1150 .NVIC_IRQChannelCmd = ENABLE,
1155 .EXTI_Line = EXTI_Line5,
1156 .EXTI_Mode = EXTI_Mode_Interrupt,
1157 .EXTI_Trigger = EXTI_Trigger_Falling,
1158 .EXTI_LineCmd = ENABLE,
1163 static const struct pios_exti_cfg pios_exti_hsync_cfg __exti_config = {
1169 .GPIO_Pin = GPIO_Pin_2,
1170 .GPIO_Speed = GPIO_Speed_100MHz,
1171 .GPIO_Mode = GPIO_Mode_IN,
1172 .GPIO_OType = GPIO_OType_OD,
1173 .GPIO_PuPd = GPIO_PuPd_NOPULL,
1178 .NVIC_IRQChannel = EXTI2_IRQn,
1180 .NVIC_IRQChannelSubPriority = 0,
1181 .NVIC_IRQChannelCmd = ENABLE,
1186 .EXTI_Line = EXTI_Line2,
1187 .EXTI_Mode = EXTI_Mode_Interrupt,
1188 .EXTI_Trigger = EXTI_Trigger_Falling,
1189 .EXTI_LineCmd = ENABLE,
1196 .QSPI_SShift = QSPI_SShift_NoShift,
1197 .QSPI_Prescaler = 12,
1198 .QSPI_CKMode = QSPI_CKMode_Mode0,
1199 .QSPI_CSHTime = QSPI_CSHTime_1Cycle,
1201 .QSPI_FSelect = QSPI_FSelect_1,
1202 .QSPI_DFlash = QSPI_DFlash_Disable,
1207 .flags = (DMA_IT_TCIF7),
1209 .NVIC_IRQChannel = DMA2_Stream7_IRQn,
1211 .NVIC_IRQChannelSubPriority = 0,
1212 .NVIC_IRQChannelCmd = ENABLE,
1217 .channel = DMA2_Stream7,
1219 .DMA_Channel = DMA_Channel_3,
1220 .DMA_PeripheralBaseAddr = (uint32_t)&(QUADSPI->DR),
1221 .DMA_DIR = DMA_DIR_MemoryToPeripheral,
1222 .DMA_BufferSize = 400,
1223 .DMA_PeripheralInc = DMA_PeripheralInc_Disable,
1224 .DMA_MemoryInc = DMA_MemoryInc_Enable,
1225 .DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte,
1226 .DMA_MemoryDataSize = DMA_MemoryDataSize_Word,
1227 .DMA_Mode = DMA_Mode_Normal,
1228 .DMA_Priority = DMA_Priority_VeryHigh,
1229 .DMA_FIFOMode = DMA_FIFOMode_Enable,
1230 .DMA_FIFOThreshold = DMA_FIFOThreshold_Full,
1231 .DMA_MemoryBurst = DMA_MemoryBurst_INC4,
1232 .DMA_PeripheralBurst = DMA_PeripheralBurst_Single,
1239 .GPIO_Pin = GPIO_Pin_2,
1240 .GPIO_Speed = GPIO_Speed_100MHz,
1241 .GPIO_Mode = GPIO_Mode_AF,
1242 .GPIO_OType = GPIO_OType_PP,
1243 .GPIO_PuPd = GPIO_PuPd_NOPULL
1249 .GPIO_Pin = GPIO_Pin_9,
1250 .GPIO_Speed = GPIO_Speed_100MHz,
1251 .GPIO_Mode = GPIO_Mode_AF,
1252 .GPIO_OType = GPIO_OType_PP,
1253 .GPIO_PuPd = GPIO_PuPd_NOPULL
1259 .GPIO_Pin = GPIO_Pin_10,
1260 .GPIO_Speed = GPIO_Speed_100MHz,
1261 .GPIO_Mode = GPIO_Mode_AF,
1262 .GPIO_OType = GPIO_OType_PP,
1263 .GPIO_PuPd = GPIO_PuPd_NOPULL
1267 .vsync = &pios_exti_vsync_cfg,
1268 .hsync = &pios_exti_hsync_cfg,
1276 #if defined(PIOS_INCLUDE_RE1_FPGA)
1283 .GPIO_Pin = GPIO_Pin_8,
1284 .GPIO_Speed = GPIO_Speed_100MHz,
1285 .GPIO_Mode = GPIO_Mode_AF,
1286 .GPIO_OType = GPIO_OType_PP,
1287 .GPIO_PuPd = GPIO_PuPd_UP
1293 .GPIO_Pin = GPIO_Pin_10,
1294 .GPIO_Speed = GPIO_Speed_2MHz,
1295 .GPIO_Mode = GPIO_Mode_OUT,
1296 .GPIO_OType = GPIO_OType_PP,
1297 .GPIO_PuPd = GPIO_PuPd_DOWN
1303 .GPIO_Pin = GPIO_Pin_0,
1304 .GPIO_Speed = GPIO_Speed_2MHz,
1305 .GPIO_Mode = GPIO_Mode_IN,
1306 .GPIO_OType = GPIO_OType_PP,
1307 .GPIO_PuPd = GPIO_PuPd_UP
1313 .GPIO_Pin = GPIO_Pin_1,
1314 .GPIO_Speed = GPIO_Speed_2MHz,
1315 .GPIO_Mode = GPIO_Mode_OUT,
1316 .GPIO_OType = GPIO_OType_PP,
1317 .GPIO_PuPd = GPIO_PuPd_UP
1324 #if defined(PIOS_INCLUDE_BMI160)
1327 static const struct pios_exti_cfg pios_exti_bmi160_cfg __exti_config = {
1329 .line = EXTI_Line13,
1333 .GPIO_Pin = GPIO_Pin_13,
1334 .GPIO_Speed = GPIO_Speed_2MHz,
1335 .GPIO_Mode = GPIO_Mode_IN,
1336 .GPIO_OType = GPIO_OType_OD,
1337 .GPIO_PuPd = GPIO_PuPd_NOPULL,
1342 .NVIC_IRQChannel = EXTI15_10_IRQn,
1344 .NVIC_IRQChannelSubPriority = 0,
1345 .NVIC_IRQChannelCmd = ENABLE,
1350 .EXTI_Line = EXTI_Line13,
1351 .EXTI_Mode = EXTI_Mode_Interrupt,
1352 .EXTI_Trigger = EXTI_Trigger_Rising,
1353 .EXTI_LineCmd = ENABLE,
1364 .temperature_interleaving = 50
void PIOS_RE1FPGA_SetBwLevels(uint8_t black, uint8_t white)
uint8_t expect_manufacturer
#define DMA2_Stream4_IRQHandler
const struct pios_dmashot_timer_cfg * timer_cfg
Main PiOS header to include all the compiled in PiOS options.
static const TIM_TimeBaseInitTypeDef tim_apb2_time_base
const struct pios_flash_driver pios_jedec_flash_driver
OSD gen module, handles OSD draw. Parts from CL-OSD and SUPEROSD projects.
COM MSG private definitions.
APIs for PIOS_USBHOOK layer.
static const struct pios_tim_channel pios_tim_servoport_all_pins[]
const struct pios_servo_cfg pios_servo_8_cfg
Brushed Sparky skips last two output ports.
#define PIOS_IRQ_PRIO_HIGHEST
#define JEDEC_MANUFACTURER_SPANSION
#define PIOS_SERVOS_INITIAL_POSITION
static const struct pios_tim_clock_cfg tim_8_cfg
Defines the API to set up the HID + CDC USB descriptor config.
int32_t PIOS_RE1FPGA_Buzzer(bool enable)
void PIOS_INTERNAL_ADC_DMA_Handler()
#define RTC_WKUP_IRQHandler
#define PIOS_IRQ_PRIO_MID
USART private definitions.
void PIOS_RE1FPGA_SetXOffset(int8_t x_offset)
Spektrum/JR DSMx satellite receiver private structures.
void PIOS_RE1FPGA_SetXScale(uint8_t x_scale)
#define FLASH_SECTOR_64KB
Driver for talking to most JEDEC flash chips.
#define PIOS_SERVO_UPDATE_HZ
static const struct pios_tim_clock_cfg tim_5_cfg
static const TIM_TimeBaseInitTypeDef tim_apb1_time_base
Configuration struct holding all timer configurations.
Configuration struct to assign a DMA channel and stream to a timer, and optionally specify a master t...
struct pios_i2c_adapter * pios_i2c_t
const struct pios_annunc * annunciators
void PIOS_I2C_EV_IRQ_Handler(pios_i2c_t i2c_id)
ADC_TypeDef * adc_dev_master
bool PIOS_BMI160_IRQHandler(void)
#define I2C1_ER_IRQHandler
static const struct pios_tim_clock_cfg tim_1_cfg
#define PIOS_INCLUDE_FLASH_JEDEC
TIM_OCInitTypeDef tim_oc_init
USB COM HID private definitions.
#define I2C1_EV_IRQHandler
Servo private structures.
#define FLASH_SECTOR_16KB
void PIOS_I2C_ER_IRQ_Handler(pios_i2c_t i2c_id)
TIM_ICInitTypeDef tim_ic_init
Defines the API to set up the HID-only USB descriptor config.
static const struct pios_tim_clock_cfg tim_12_cfg
void PIOS_RTC_irq_handler(void)
const struct pios_flash_driver * driver
const struct pios_flash_partition pios_flash_partition_table[]
const struct pios_exti_cfg * exti_cfg
void PIOS_RE1FPGA_Set3DConfig(enum pios_video_3d_mode mode, uint8_t x_shift_right)
USB COM CDC private definitions.
enum pios_flash_partition_labels label
static const TIM_TimeBaseInitTypeDef tim_12_time_base
#define PIOS_Assert(test)
struct stm32_gpio mco_pin
#define PIOS_ANNUNCIATOR_BUZZER
#define FLASH_SECTOR_128KB
const struct pios_flash_driver pios_internal_flash_driver
USART private definitions.
#define PIOS_LED_HEARTBEAT
Defines the API to the board-specific USB data setup code.