35 #include <pios_config.h>
38 #if defined(PIOS_INCLUDE_ANNUNC)
46 .GPIO_Pin = GPIO_Pin_12,
47 .GPIO_Speed = GPIO_Speed_50MHz,
48 .GPIO_Mode = GPIO_Mode_OUT,
49 .GPIO_OType = GPIO_OType_PP,
50 .GPIO_PuPd = GPIO_PuPd_UP
58 .num_annunciators =
NELEMENTS(pios_annuncs),
61 static const struct pios_annunc pios_annuncs_v2[] = {
66 .GPIO_Pin = GPIO_Pin_5,
67 .GPIO_Speed = GPIO_Speed_50MHz,
68 .GPIO_Mode = GPIO_Mode_OUT,
69 .GPIO_OType = GPIO_OType_PP,
70 .GPIO_PuPd = GPIO_PuPd_UP
78 .GPIO_Pin = GPIO_Pin_4,
79 .GPIO_Speed = GPIO_Speed_50MHz,
80 .GPIO_Mode = GPIO_Mode_OUT,
81 .GPIO_OType = GPIO_OType_PP,
82 .GPIO_PuPd = GPIO_PuPd_UP
88 static const struct pios_annunc_cfg pios_annunc_v2_cfg = {
90 .num_annunciators =
NELEMENTS(pios_annuncs_v2),
93 static const struct pios_annunc pios_annuncs_omnibus[] = {
98 .GPIO_Pin = GPIO_Pin_5,
99 .GPIO_Speed = GPIO_Speed_50MHz,
100 .GPIO_Mode = GPIO_Mode_OUT,
101 .GPIO_OType = GPIO_OType_PP,
102 .GPIO_PuPd = GPIO_PuPd_UP
110 .GPIO_Pin = GPIO_Pin_4,
111 .GPIO_Speed = GPIO_Speed_50MHz,
112 .GPIO_Mode = GPIO_Mode_OUT,
113 .GPIO_OType = GPIO_OType_PP,
114 .GPIO_PuPd = GPIO_PuPd_UP
121 static const struct pios_annunc_cfg pios_annunc_omnibus_cfg = {
123 .num_annunciators =
NELEMENTS(pios_annuncs_omnibus),
126 const struct pios_annunc_cfg * PIOS_BOARD_HW_DEFS_GetLedCfg (uint32_t
board_revision)
128 switch(board_revision) {
130 return &pios_annunc_cfg;
133 return &pios_annunc_v2_cfg;
143 #if defined(PIOS_INCLUDE_SPI)
152 .remap = GPIO_AF_SPI1,
154 .SPI_Mode = SPI_Mode_Master,
155 .SPI_Direction = SPI_Direction_2Lines_FullDuplex,
156 .SPI_DataSize = SPI_DataSize_8b,
157 .SPI_NSS = SPI_NSS_Soft,
158 .SPI_FirstBit = SPI_FirstBit_MSB,
159 .SPI_CRCPolynomial = 7,
160 .SPI_CPOL = SPI_CPOL_High,
161 .SPI_CPHA = SPI_CPHA_2Edge,
162 .SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_16,
167 .GPIO_Pin = GPIO_Pin_5,
168 .GPIO_Speed = GPIO_Speed_100MHz,
169 .GPIO_Mode = GPIO_Mode_AF,
170 .GPIO_OType = GPIO_OType_PP,
171 .GPIO_PuPd = GPIO_PuPd_UP
177 .GPIO_Pin = GPIO_Pin_6,
178 .GPIO_Speed = GPIO_Speed_50MHz,
179 .GPIO_Mode = GPIO_Mode_AF,
180 .GPIO_OType = GPIO_OType_PP,
181 .GPIO_PuPd = GPIO_PuPd_UP
187 .GPIO_Pin = GPIO_Pin_7,
188 .GPIO_Speed = GPIO_Speed_50MHz,
189 .GPIO_Mode = GPIO_Mode_AF,
190 .GPIO_OType = GPIO_OType_PP,
191 .GPIO_PuPd = GPIO_PuPd_UP
198 .GPIO_Pin = GPIO_Pin_4,
199 .GPIO_Speed = GPIO_Speed_50MHz,
200 .GPIO_Mode = GPIO_Mode_OUT,
201 .GPIO_OType = GPIO_OType_PP,
202 .GPIO_PuPd = GPIO_PuPd_UP
211 static const struct pios_spi_cfg pios_spi_telem_flash_cfg = {
213 .remap = GPIO_AF_SPI3,
215 .SPI_Mode = SPI_Mode_Master,
216 .SPI_Direction = SPI_Direction_2Lines_FullDuplex,
217 .SPI_DataSize = SPI_DataSize_8b,
218 .SPI_NSS = SPI_NSS_Soft,
219 .SPI_FirstBit = SPI_FirstBit_MSB,
220 .SPI_CRCPolynomial = 7,
221 .SPI_CPOL = SPI_CPOL_Low,
222 .SPI_CPHA = SPI_CPHA_1Edge,
223 .SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_8,
228 .GPIO_Pin = GPIO_Pin_10,
229 .GPIO_Speed = GPIO_Speed_100MHz,
230 .GPIO_Mode = GPIO_Mode_AF,
231 .GPIO_OType = GPIO_OType_PP,
232 .GPIO_PuPd = GPIO_PuPd_NOPULL
238 .GPIO_Pin = GPIO_Pin_11,
239 .GPIO_Speed = GPIO_Speed_50MHz,
240 .GPIO_Mode = GPIO_Mode_AF,
241 .GPIO_OType = GPIO_OType_PP,
242 .GPIO_PuPd = GPIO_PuPd_NOPULL
248 .GPIO_Pin = GPIO_Pin_12,
249 .GPIO_Speed = GPIO_Speed_50MHz,
250 .GPIO_Mode = GPIO_Mode_AF,
251 .GPIO_OType = GPIO_OType_PP,
252 .GPIO_PuPd = GPIO_PuPd_NOPULL
260 .GPIO_Pin = GPIO_Pin_15,
261 .GPIO_Speed = GPIO_Speed_50MHz,
262 .GPIO_Mode = GPIO_Mode_OUT,
263 .GPIO_OType = GPIO_OType_PP,
264 .GPIO_PuPd = GPIO_PuPd_UP
269 .GPIO_Pin = GPIO_Pin_3,
270 .GPIO_Speed = GPIO_Speed_50MHz,
271 .GPIO_Mode = GPIO_Mode_OUT,
272 .GPIO_OType = GPIO_OType_PP,
273 .GPIO_PuPd = GPIO_PuPd_UP
278 #ifdef PIOS_INCLUDE_BMP280_SPI
288 #if defined(PIOS_INCLUDE_OPENLRS)
292 pios_openlrs_t openlrs_handle;
294 static bool openlrs_int(
void) {
295 return PIOS_OpenLRS_EXT_Int(openlrs_handle);
299 .vector = openlrs_int,
304 .GPIO_Pin = GPIO_Pin_2,
305 .GPIO_Speed = GPIO_Speed_100MHz,
306 .GPIO_Mode = GPIO_Mode_IN,
307 .GPIO_OType = GPIO_OType_OD,
308 .GPIO_PuPd = GPIO_PuPd_NOPULL,
313 .NVIC_IRQChannel = EXTI2_IRQn,
315 .NVIC_IRQChannelSubPriority = 0,
316 .NVIC_IRQChannelCmd = ENABLE,
321 .EXTI_Line = EXTI_Line2,
322 .EXTI_Mode = EXTI_Mode_Interrupt,
323 .EXTI_Trigger = EXTI_Trigger_Falling,
324 .EXTI_LineCmd = ENABLE,
329 const struct pios_openlrs_cfg pios_openlrs_rm1_cfg = {
330 .spi_cfg = &pios_spi_telem_flash_cfg,
331 .exti_cfg = &pios_exti_openlrs_cfg,
332 .gpio_direction = GPIO0_RX_GPIO1_TX,
335 const struct pios_openlrs_cfg pios_openlrs_rm2_cfg = {
336 .spi_cfg = &pios_spi_telem_flash_cfg,
337 .exti_cfg = &pios_exti_openlrs_cfg,
338 .gpio_direction = GPIO0_TX_GPIO1_RX,
341 const struct pios_openlrs_cfg * PIOS_BOARD_HW_DEFS_GetOpenLRSCfg (uint32_t board_revision)
343 switch(board_revision) {
345 return &pios_openlrs_rm1_cfg;
348 return &pios_openlrs_rm2_cfg;
360 #if defined(PIOS_INCLUDE_FLASH)
370 .arena_size = 0x00020000,
371 .slot_size = 0x00000100,
374 #if defined(PIOS_INCLUDE_FLASH_JEDEC)
381 .expect_memorytype = 0x20,
382 .expect_capacity = 0x15,
383 .sector_erase = 0xD8,
392 .expect_capacity = 0x18,
393 .sector_erase = 0xD8,
399 .expect_capacity = 0x17,
400 .sector_erase = 0xD8,
405 #if defined(PIOS_INCLUDE_FLASH_INTERNAL)
414 #if defined(PIOS_INCLUDE_FLASH_INTERNAL)
434 uintptr_t pios_internal_flash_id;
437 .chip_id = &pios_internal_flash_id,
439 .sector_blocks = stm32f4_sectors,
440 .num_blocks =
NELEMENTS(stm32f4_sectors),
444 #if defined(PIOS_INCLUDE_FLASH_JEDEC)
453 uintptr_t pios_external_flash_id;
456 .chip_id = &pios_external_flash_id,
458 .sector_blocks = m25p16_sectors,
464 #if defined(PIOS_INCLUDE_FLASH_INTERNAL)
467 .chip_desc = &pios_flash_chip_internal,
475 .chip_desc = &pios_flash_chip_internal,
484 .chip_desc = &pios_flash_chip_internal,
492 .chip_desc = &pios_flash_chip_internal,
500 .chip_desc = &pios_flash_chip_internal,
510 #if defined(PIOS_INCLUDE_FLASH_JEDEC)
512 #if defined(PIOS_INCLUDE_FLASH_INTERNAL)
515 .chip_desc = &pios_flash_chip_internal,
526 .chip_desc = &pios_flash_chip_internal,
535 .chip_desc = &pios_flash_chip_internal,
548 .chip_desc = &pios_flash_chip_external,
557 .chip_desc = &pios_flash_chip_external,
566 .chip_desc = &pios_flash_chip_external,
575 const struct pios_flash_partition * PIOS_BOARD_HW_DEFS_GetPartitionTable (uint32_t board_revision, uint32_t * num_partitions)
579 #ifdef PIOS_INCLUDE_FLASH_JEDEC
580 if (pios_external_flash_id) {
581 *num_partitions =
NELEMENTS(pios_flash_partition_table);
587 &pios_flash_chip_external,
595 *num_partitions =
NELEMENTS(pios_flash_partition_table_nojedec);
597 return pios_flash_partition_table_nojedec;
601 #ifdef PIOS_INCLUDE_USART
609 .remap = GPIO_AF_USART1,
612 .NVIC_IRQChannel = USART1_IRQn,
614 .NVIC_IRQChannelSubPriority = 0,
615 .NVIC_IRQChannelCmd = ENABLE,
621 .GPIO_Pin = GPIO_Pin_10,
622 .GPIO_Speed = GPIO_Speed_2MHz,
623 .GPIO_Mode = GPIO_Mode_AF,
624 .GPIO_OType = GPIO_OType_PP,
625 .GPIO_PuPd = GPIO_PuPd_UP
627 .pin_source = GPIO_PinSource10,
632 .GPIO_Pin = GPIO_Pin_9,
633 .GPIO_Speed = GPIO_Speed_2MHz,
634 .GPIO_Mode = GPIO_Mode_AF,
635 .GPIO_OType = GPIO_OType_PP,
636 .GPIO_PuPd = GPIO_PuPd_UP
638 .pin_source = GPIO_PinSource9,
650 .GPIO_Pin = GPIO_Pin_0,
651 .GPIO_Speed = GPIO_Speed_2MHz,
652 .GPIO_Mode = GPIO_Mode_OUT,
653 .GPIO_OType = GPIO_OType_PP,
654 .GPIO_PuPd = GPIO_PuPd_UP
657 .gpio_inv_enable = Bit_SET,
658 .gpio_inv_disable = Bit_RESET,
659 .gpio_clk_func = RCC_AHB1PeriphClockCmd,
660 .gpio_clk_periph = RCC_AHB1Periph_GPIOC,
668 .remap = GPIO_AF_USART3,
671 .NVIC_IRQChannel = USART3_IRQn,
673 .NVIC_IRQChannelSubPriority = 0,
674 .NVIC_IRQChannelCmd = ENABLE,
680 .GPIO_Pin = GPIO_Pin_11,
681 .GPIO_Speed = GPIO_Speed_2MHz,
682 .GPIO_Mode = GPIO_Mode_AF,
683 .GPIO_OType = GPIO_OType_PP,
684 .GPIO_PuPd = GPIO_PuPd_UP
686 .pin_source = GPIO_PinSource11,
691 .GPIO_Pin = GPIO_Pin_10,
692 .GPIO_Speed = GPIO_Speed_2MHz,
693 .GPIO_Mode = GPIO_Mode_AF,
694 .GPIO_OType = GPIO_OType_PP,
695 .GPIO_PuPd = GPIO_PuPd_UP
697 .pin_source = GPIO_PinSource10,
706 .remap = GPIO_AF_USART6,
709 .NVIC_IRQChannel = USART6_IRQn,
711 .NVIC_IRQChannelSubPriority = 0,
712 .NVIC_IRQChannelCmd = ENABLE,
718 .GPIO_Pin = GPIO_Pin_7,
719 .GPIO_Speed = GPIO_Speed_2MHz,
720 .GPIO_Mode = GPIO_Mode_AF,
721 .GPIO_OType = GPIO_OType_PP,
722 .GPIO_PuPd = GPIO_PuPd_UP
724 .pin_source = GPIO_PinSource7,
729 .GPIO_Pin = GPIO_Pin_6,
730 .GPIO_Speed = GPIO_Speed_2MHz,
731 .GPIO_Mode = GPIO_Mode_AF,
732 .GPIO_OType = GPIO_OType_PP,
733 .GPIO_PuPd = GPIO_PuPd_UP
735 .pin_source = GPIO_PinSource6,
739 #if defined(PIOS_INCLUDE_DSM)
753 .GPIO_Pin = GPIO_Pin_10,
754 .GPIO_Speed = GPIO_Speed_2MHz,
755 .GPIO_Mode = GPIO_Mode_IN,
756 .GPIO_OType = GPIO_OType_PP,
757 .GPIO_PuPd = GPIO_PuPd_NOPULL
766 .GPIO_Pin = GPIO_Pin_11,
767 .GPIO_Speed = GPIO_Speed_2MHz,
768 .GPIO_Mode = GPIO_Mode_OUT,
769 .GPIO_OType = GPIO_OType_PP,
770 .GPIO_PuPd = GPIO_PuPd_NOPULL
775 static const struct pios_dsm_cfg pios_rxportusart_dsm_aux_cfg = {
779 .GPIO_Pin = GPIO_Pin_7,
780 .GPIO_Speed = GPIO_Speed_2MHz,
781 .GPIO_Mode = GPIO_Mode_OUT,
782 .GPIO_OType = GPIO_OType_PP,
783 .GPIO_PuPd = GPIO_PuPd_NOPULL
794 #if defined(PIOS_INCLUDE_COM)
800 #if defined(PIOS_INCLUDE_I2C)
802 #include <pios_i2c_priv.h>
807 void PIOS_I2C_mag_pressure_adapter_ev_irq_handler(
void);
808 void PIOS_I2C_mag_pressureadapter_er_irq_handler(
void);
810 __attribute__ ((alias("PIOS_I2C_mag_pressure_adapter_ev_irq_handler")));
812 __attribute__ ((alias("PIOS_I2C_mag_pressure_adapter_er_irq_handler")));
816 .remap = GPIO_AF_I2C1,
818 .I2C_Mode = I2C_Mode_I2C,
819 .I2C_OwnAddress1 = 0,
820 .I2C_Ack = I2C_Ack_Enable,
821 .I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit,
822 .I2C_DutyCycle = I2C_DutyCycle_2,
823 .I2C_ClockSpeed = 400000,
825 .transfer_timeout_ms = 50,
829 .GPIO_Pin = GPIO_Pin_8,
830 .GPIO_Mode = GPIO_Mode_AF,
831 .GPIO_Speed = GPIO_Speed_50MHz,
832 .GPIO_OType = GPIO_OType_OD,
833 .GPIO_PuPd = GPIO_PuPd_UP,
839 .GPIO_Pin = GPIO_Pin_9,
840 .GPIO_Mode = GPIO_Mode_AF,
841 .GPIO_Speed = GPIO_Speed_50MHz,
842 .GPIO_OType = GPIO_OType_OD,
843 .GPIO_PuPd = GPIO_PuPd_UP,
849 .NVIC_IRQChannel = I2C1_EV_IRQn,
851 .NVIC_IRQChannelSubPriority = 0,
852 .NVIC_IRQChannelCmd = ENABLE,
858 .NVIC_IRQChannel = I2C1_ER_IRQn,
860 .NVIC_IRQChannelSubPriority = 0,
861 .NVIC_IRQChannelCmd = ENABLE,
867 void PIOS_I2C_mag_pressure_adapter_ev_irq_handler(
void)
873 void PIOS_I2C_mag_pressure_adapter_er_irq_handler(
void)
880 void PIOS_I2C_flexiport_adapter_ev_irq_handler(
void);
881 void PIOS_I2C_flexiport_adapter_er_irq_handler(
void);
887 .remap = GPIO_AF_I2C2,
889 .I2C_Mode = I2C_Mode_I2C,
890 .I2C_OwnAddress1 = 0,
891 .I2C_Ack = I2C_Ack_Enable,
892 .I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit,
893 .I2C_DutyCycle = I2C_DutyCycle_2,
894 .I2C_ClockSpeed = 400000,
896 .transfer_timeout_ms = 50,
900 .GPIO_Pin = GPIO_Pin_10,
901 .GPIO_Mode = GPIO_Mode_AF,
902 .GPIO_Speed = GPIO_Speed_50MHz,
903 .GPIO_OType = GPIO_OType_OD,
904 .GPIO_PuPd = GPIO_PuPd_UP,
910 .GPIO_Pin = GPIO_Pin_11,
911 .GPIO_Mode = GPIO_Mode_AF,
912 .GPIO_Speed = GPIO_Speed_50MHz,
913 .GPIO_OType = GPIO_OType_OD,
914 .GPIO_PuPd = GPIO_PuPd_UP,
920 .NVIC_IRQChannel = I2C2_EV_IRQn,
922 .NVIC_IRQChannelSubPriority = 0,
923 .NVIC_IRQChannelCmd = ENABLE,
929 .NVIC_IRQChannel = I2C2_ER_IRQn,
931 .NVIC_IRQChannelSubPriority = 0,
932 .NVIC_IRQChannelCmd = ENABLE,
938 void PIOS_I2C_flexiport_adapter_ev_irq_handler(
void)
944 void PIOS_I2C_flexiport_adapter_er_irq_handler(
void)
951 void PIOS_I2C_pressure_adapter_ev_irq_handler(
void);
952 void PIOS_I2C_pressure_adapter_er_irq_handler(
void);
956 #if defined(PIOS_INCLUDE_RTC)
960 #include <pios_rtc_priv.h>
962 void PIOS_RTC_IRQ_Handler (
void);
965 .
clksrc = RCC_RTCCLKSource_HSE_Div8,
969 .NVIC_IRQChannel = RTC_WKUP_IRQn,
971 .NVIC_IRQChannelSubPriority = 0,
972 .NVIC_IRQChannelCmd = ENABLE,
977 void PIOS_RTC_IRQ_Handler (
void)
987 .TIM_Prescaler = (PIOS_PERIPHERAL_APB1_COUNTER_CLOCK / 1000000) - 1,
988 .TIM_ClockDivision = TIM_CKD_DIV1,
989 .TIM_CounterMode = TIM_CounterMode_Up,
991 .TIM_RepetitionCounter = 0x0000,
994 .TIM_Prescaler = (PIOS_PERIPHERAL_APB2_COUNTER_CLOCK / 1000000) - 1,
995 .TIM_ClockDivision = TIM_CKD_DIV1,
996 .TIM_CounterMode = TIM_CounterMode_Up,
998 .TIM_RepetitionCounter = 0x0000,
1006 .NVIC_IRQChannel = TIM3_IRQn,
1008 .NVIC_IRQChannelSubPriority = 0,
1009 .NVIC_IRQChannelCmd = ENABLE,
1019 .NVIC_IRQChannel = TIM5_IRQn,
1021 .NVIC_IRQChannelSubPriority = 0,
1022 .NVIC_IRQChannelCmd = ENABLE,
1032 .NVIC_IRQChannel = TIM1_BRK_TIM9_IRQn,
1034 .NVIC_IRQChannelSubPriority = 0,
1035 .NVIC_IRQChannelCmd = ENABLE,
1045 .NVIC_IRQChannel = TIM1_UP_TIM10_IRQn,
1047 .NVIC_IRQChannelSubPriority = 0,
1048 .NVIC_IRQChannelCmd = ENABLE,
1058 .NVIC_IRQChannel = TIM1_TRG_COM_TIM11_IRQn,
1060 .NVIC_IRQChannelSubPriority = 0,
1061 .NVIC_IRQChannelCmd = ENABLE,
1069 .TIM_Prescaler = (PIOS_PERIPHERAL_APB1_COUNTER_CLOCK / 1000000) - 1,
1070 .TIM_ClockDivision = TIM_CKD_DIV1,
1071 .TIM_CounterMode = TIM_CounterMode_Up,
1072 .TIM_Period = 0xFFFF,
1073 .TIM_RepetitionCounter = 0x0000,
1080 .TIM_Prescaler = (PIOS_PERIPHERAL_APB2_COUNTER_CLOCK / 1000000) - 1,
1081 .TIM_ClockDivision = TIM_CKD_DIV1,
1082 .TIM_CounterMode = TIM_CounterMode_Up,
1083 .TIM_Period = 0xFFFF,
1084 .TIM_RepetitionCounter = 0x0000,
1092 .NVIC_IRQChannel = TIM1_CC_IRQn,
1094 .NVIC_IRQChannelSubPriority = 0,
1095 .NVIC_IRQChannelCmd = ENABLE,
1105 .NVIC_IRQChannel = TIM4_IRQn,
1107 .NVIC_IRQChannelSubPriority = 0,
1108 .NVIC_IRQChannelCmd = ENABLE,
1117 .NVIC_IRQChannel = TIM8_CC_IRQn,
1119 .NVIC_IRQChannelSubPriority = 0,
1120 .NVIC_IRQChannelCmd = ENABLE,
1130 .NVIC_IRQChannel = TIM8_BRK_TIM12_IRQn,
1132 .NVIC_IRQChannelSubPriority = 0,
1133 .NVIC_IRQChannelCmd = ENABLE,
1155 .timer_chan = TIM_Channel_3,
1159 .GPIO_Pin = GPIO_Pin_0,
1160 .GPIO_Speed = GPIO_Speed_2MHz,
1161 .GPIO_Mode = GPIO_Mode_AF,
1162 .GPIO_OType = GPIO_OType_PP,
1163 .GPIO_PuPd = GPIO_PuPd_UP
1165 .pin_source = GPIO_PinSource0,
1167 .remap = GPIO_AF_TIM3,
1171 .timer_chan = TIM_Channel_4,
1175 .GPIO_Pin = GPIO_Pin_1,
1176 .GPIO_Speed = GPIO_Speed_2MHz,
1177 .GPIO_Mode = GPIO_Mode_AF,
1178 .GPIO_OType = GPIO_OType_PP,
1179 .GPIO_PuPd = GPIO_PuPd_UP
1181 .pin_source = GPIO_PinSource1,
1183 .remap = GPIO_AF_TIM3,
1187 .timer_chan = TIM_Channel_2,
1191 .GPIO_Pin = GPIO_Pin_3,
1192 .GPIO_Speed = GPIO_Speed_2MHz,
1193 .GPIO_Mode = GPIO_Mode_AF,
1194 .GPIO_OType = GPIO_OType_PP,
1195 .GPIO_PuPd = GPIO_PuPd_UP
1197 .pin_source = GPIO_PinSource3,
1199 .remap = GPIO_AF_TIM9,
1203 .timer_chan = TIM_Channel_3,
1207 .GPIO_Pin = GPIO_Pin_2,
1208 .GPIO_Speed = GPIO_Speed_2MHz,
1209 .GPIO_Mode = GPIO_Mode_AF,
1210 .GPIO_OType = GPIO_OType_PP,
1211 .GPIO_PuPd = GPIO_PuPd_UP
1213 .pin_source = GPIO_PinSource2,
1215 .remap = GPIO_AF_TIM2,
1219 .timer_chan = TIM_Channel_2,
1223 .GPIO_Pin = GPIO_Pin_1,
1224 .GPIO_Speed = GPIO_Speed_2MHz,
1225 .GPIO_Mode = GPIO_Mode_AF,
1226 .GPIO_OType = GPIO_OType_PP,
1227 .GPIO_PuPd = GPIO_PuPd_UP
1229 .pin_source = GPIO_PinSource1,
1231 .remap = GPIO_AF_TIM5,
1235 .timer_chan = TIM_Channel_1,
1239 .GPIO_Pin = GPIO_Pin_0,
1240 .GPIO_Speed = GPIO_Speed_2MHz,
1241 .GPIO_Mode = GPIO_Mode_AF,
1242 .GPIO_OType = GPIO_OType_PP,
1243 .GPIO_PuPd = GPIO_PuPd_UP
1245 .pin_source = GPIO_PinSource0,
1247 .remap = GPIO_AF_TIM5,
1270 .timer_chan = TIM_Channel_3,
1274 .GPIO_Pin = GPIO_Pin_0,
1275 .GPIO_Speed = GPIO_Speed_2MHz,
1276 .GPIO_Mode = GPIO_Mode_AF,
1277 .GPIO_OType = GPIO_OType_PP,
1278 .GPIO_PuPd = GPIO_PuPd_UP
1280 .pin_source = GPIO_PinSource0,
1282 .remap = GPIO_AF_TIM3,
1286 .timer_chan = TIM_Channel_4,
1290 .GPIO_Pin = GPIO_Pin_1,
1291 .GPIO_Speed = GPIO_Speed_2MHz,
1292 .GPIO_Mode = GPIO_Mode_AF,
1293 .GPIO_OType = GPIO_OType_PP,
1294 .GPIO_PuPd = GPIO_PuPd_UP
1296 .pin_source = GPIO_PinSource1,
1298 .remap = GPIO_AF_TIM3,
1302 .timer_chan = TIM_Channel_2,
1306 .GPIO_Pin = GPIO_Pin_3,
1307 .GPIO_Speed = GPIO_Speed_2MHz,
1308 .GPIO_Mode = GPIO_Mode_AF,
1309 .GPIO_OType = GPIO_OType_PP,
1310 .GPIO_PuPd = GPIO_PuPd_UP
1312 .pin_source = GPIO_PinSource3,
1314 .remap = GPIO_AF_TIM9,
1318 .timer_chan = TIM_Channel_3,
1322 .GPIO_Pin = GPIO_Pin_2,
1323 .GPIO_Speed = GPIO_Speed_2MHz,
1324 .GPIO_Mode = GPIO_Mode_AF,
1325 .GPIO_OType = GPIO_OType_PP,
1326 .GPIO_PuPd = GPIO_PuPd_UP
1328 .pin_source = GPIO_PinSource2,
1330 .remap = GPIO_AF_TIM2,
1334 .timer_chan = TIM_Channel_2,
1338 .GPIO_Pin = GPIO_Pin_1,
1339 .GPIO_Speed = GPIO_Speed_2MHz,
1340 .GPIO_Mode = GPIO_Mode_AF,
1341 .GPIO_OType = GPIO_OType_PP,
1342 .GPIO_PuPd = GPIO_PuPd_UP
1344 .pin_source = GPIO_PinSource1,
1346 .remap = GPIO_AF_TIM5,
1350 .timer_chan = TIM_Channel_1,
1354 .GPIO_Pin = GPIO_Pin_0,
1355 .GPIO_Speed = GPIO_Speed_2MHz,
1356 .GPIO_Mode = GPIO_Mode_AF,
1357 .GPIO_OType = GPIO_OType_PP,
1358 .GPIO_PuPd = GPIO_PuPd_UP
1360 .pin_source = GPIO_PinSource0,
1362 .remap = GPIO_AF_TIM5,
1366 .timer_chan = TIM_Channel_2,
1367 .remap = GPIO_AF_TIM12,
1371 .GPIO_Pin = GPIO_Pin_15,
1372 .GPIO_Speed = GPIO_Speed_2MHz,
1373 .GPIO_Mode = GPIO_Mode_AF,
1374 .GPIO_OType = GPIO_OType_PP,
1375 .GPIO_PuPd = GPIO_PuPd_UP
1377 .pin_source = GPIO_PinSource15,
1382 .timer_chan = TIM_Channel_1,
1383 .remap = GPIO_AF_TIM8,
1387 .GPIO_Pin = GPIO_Pin_6,
1388 .GPIO_Speed = GPIO_Speed_2MHz,
1389 .GPIO_Mode = GPIO_Mode_AF,
1390 .GPIO_OType = GPIO_OType_PP,
1391 .GPIO_PuPd = GPIO_PuPd_UP
1393 .pin_source = GPIO_PinSource6,
1398 .timer_chan = TIM_Channel_2,
1399 .remap = GPIO_AF_TIM8,
1403 .GPIO_Pin = GPIO_Pin_7,
1404 .GPIO_Speed = GPIO_Speed_2MHz,
1405 .GPIO_Mode = GPIO_Mode_AF,
1406 .GPIO_OType = GPIO_OType_PP,
1407 .GPIO_PuPd = GPIO_PuPd_UP
1409 .pin_source = GPIO_PinSource7,
1414 .timer_chan = TIM_Channel_3,
1415 .remap = GPIO_AF_TIM8,
1419 .GPIO_Pin = GPIO_Pin_8,
1420 .GPIO_Speed = GPIO_Speed_2MHz,
1421 .GPIO_Mode = GPIO_Mode_AF,
1422 .GPIO_OType = GPIO_OType_PP,
1423 .GPIO_PuPd = GPIO_PuPd_UP
1425 .pin_source = GPIO_PinSource8,
1430 .timer_chan = TIM_Channel_4,
1431 .remap = GPIO_AF_TIM8,
1435 .GPIO_Pin = GPIO_Pin_9,
1436 .GPIO_Speed = GPIO_Speed_2MHz,
1437 .GPIO_Mode = GPIO_Mode_AF,
1438 .GPIO_OType = GPIO_OType_PP,
1439 .GPIO_PuPd = GPIO_PuPd_UP
1441 .pin_source = GPIO_PinSource9,
1446 .timer_chan = TIM_Channel_1,
1447 .remap = GPIO_AF_TIM12,
1451 .GPIO_Pin = GPIO_Pin_14,
1452 .GPIO_Speed = GPIO_Speed_2MHz,
1453 .GPIO_Mode = GPIO_Mode_AF,
1454 .GPIO_OType = GPIO_OType_PP,
1455 .GPIO_PuPd = GPIO_PuPd_UP
1457 .pin_source = GPIO_PinSource14,
1462 #if defined(PIOS_INCLUDE_SERVO) && defined(PIOS_INCLUDE_TIM)
1469 .TIM_OCMode = TIM_OCMode_PWM1,
1470 .TIM_OutputState = TIM_OutputState_Enable,
1471 .TIM_OutputNState = TIM_OutputNState_Disable,
1473 .TIM_OCPolarity = TIM_OCPolarity_High,
1474 .TIM_OCNPolarity = TIM_OCPolarity_High,
1475 .TIM_OCIdleState = TIM_OCIdleState_Reset,
1476 .TIM_OCNIdleState = TIM_OCNIdleState_Reset,
1479 .num_channels =
NELEMENTS(pios_tim_servoport_all_pins),
1482 const struct pios_servo_cfg pios_servo_rcvr_ppm_cfg = {
1484 .TIM_OCMode = TIM_OCMode_PWM1,
1485 .TIM_OutputState = TIM_OutputState_Enable,
1486 .TIM_OutputNState = TIM_OutputNState_Disable,
1488 .TIM_OCPolarity = TIM_OCPolarity_High,
1489 .TIM_OCNPolarity = TIM_OCPolarity_High,
1490 .TIM_OCIdleState = TIM_OCIdleState_Reset,
1491 .TIM_OCNIdleState = TIM_OCNIdleState_Reset,
1494 .num_channels =
NELEMENTS(pios_tim_servoport_rcvrport_pins) - 1,
1497 const struct pios_servo_cfg pios_servo_rcvr_all_cfg = {
1499 .TIM_OCMode = TIM_OCMode_PWM1,
1500 .TIM_OutputState = TIM_OutputState_Enable,
1501 .TIM_OutputNState = TIM_OutputNState_Disable,
1503 .TIM_OCPolarity = TIM_OCPolarity_High,
1504 .TIM_OCNPolarity = TIM_OCPolarity_High,
1505 .TIM_OCIdleState = TIM_OCIdleState_Reset,
1506 .TIM_OCNIdleState = TIM_OCNIdleState_Reset,
1509 .num_channels =
NELEMENTS(pios_tim_servoport_rcvrport_pins),
1524 #if defined(PIOS_INCLUDE_PWM) || defined(PIOS_INCLUDE_PPM)
1529 .timer_chan = TIM_Channel_1,
1533 .GPIO_Pin = GPIO_Pin_14,
1534 .GPIO_Speed = GPIO_Speed_2MHz,
1535 .GPIO_Mode = GPIO_Mode_AF,
1536 .GPIO_OType = GPIO_OType_PP,
1537 .GPIO_PuPd = GPIO_PuPd_UP
1539 .pin_source = GPIO_PinSource14,
1541 .remap = GPIO_AF_TIM12,
1545 .timer_chan = TIM_Channel_2,
1549 .GPIO_Pin = GPIO_Pin_15,
1550 .GPIO_Speed = GPIO_Speed_2MHz,
1551 .GPIO_Mode = GPIO_Mode_AF,
1552 .GPIO_OType = GPIO_OType_PP,
1553 .GPIO_PuPd = GPIO_PuPd_UP
1555 .pin_source = GPIO_PinSource15,
1557 .remap = GPIO_AF_TIM12,
1561 .timer_chan = TIM_Channel_1,
1565 .GPIO_Pin = GPIO_Pin_6,
1566 .GPIO_Speed = GPIO_Speed_2MHz,
1567 .GPIO_Mode = GPIO_Mode_AF,
1568 .GPIO_OType = GPIO_OType_PP,
1569 .GPIO_PuPd = GPIO_PuPd_UP
1571 .pin_source = GPIO_PinSource6,
1573 .remap = GPIO_AF_TIM8,
1577 .timer_chan = TIM_Channel_2,
1581 .GPIO_Pin = GPIO_Pin_7,
1582 .GPIO_Speed = GPIO_Speed_2MHz,
1583 .GPIO_Mode = GPIO_Mode_AF,
1584 .GPIO_OType = GPIO_OType_PP,
1585 .GPIO_PuPd = GPIO_PuPd_UP
1587 .pin_source = GPIO_PinSource7,
1589 .remap = GPIO_AF_TIM8,
1593 .timer_chan = TIM_Channel_3,
1597 .GPIO_Pin = GPIO_Pin_8,
1598 .GPIO_Speed = GPIO_Speed_2MHz,
1599 .GPIO_Mode = GPIO_Mode_AF,
1600 .GPIO_OType = GPIO_OType_PP,
1601 .GPIO_PuPd = GPIO_PuPd_UP
1603 .pin_source = GPIO_PinSource8,
1605 .remap = GPIO_AF_TIM8,
1609 .timer_chan = TIM_Channel_4,
1613 .GPIO_Pin = GPIO_Pin_9,
1614 .GPIO_Speed = GPIO_Speed_2MHz,
1615 .GPIO_Mode = GPIO_Mode_AF,
1616 .GPIO_OType = GPIO_OType_PP,
1617 .GPIO_PuPd = GPIO_PuPd_UP
1619 .pin_source = GPIO_PinSource9,
1621 .remap = GPIO_AF_TIM8,
1627 .TIM_ICPolarity = TIM_ICPolarity_Rising,
1628 .TIM_ICSelection = TIM_ICSelection_DirectTI,
1629 .TIM_ICPrescaler = TIM_ICPSC_DIV1,
1630 .TIM_ICFilter = 0x0,
1633 .num_channels =
NELEMENTS(pios_tim_rcvrport_all_channels),
1636 const struct pios_pwm_cfg pios_pwm_with_ppm_cfg = {
1638 .TIM_ICPolarity = TIM_ICPolarity_Rising,
1639 .TIM_ICSelection = TIM_ICSelection_DirectTI,
1640 .TIM_ICPrescaler = TIM_ICPSC_DIV1,
1641 .TIM_ICFilter = 0x0,
1644 .channels = &pios_tim_rcvrport_all_channels[1],
1645 .num_channels =
NELEMENTS(pios_tim_rcvrport_all_channels) - 1,
1653 #if defined(PIOS_INCLUDE_PPM)
1657 .TIM_ICPolarity = TIM_ICPolarity_Rising,
1658 .TIM_ICSelection = TIM_ICSelection_DirectTI,
1659 .TIM_ICPrescaler = TIM_ICPSC_DIV1,
1660 .TIM_ICFilter = 0x0,
1661 .TIM_Channel = TIM_Channel_2,
1664 .channels = &pios_tim_rcvrport_all_channels[0],
1670 #if defined(PIOS_INCLUDE_RCVR)
1674 #if defined(PIOS_INCLUDE_USB)
1677 static const struct pios_usb_cfg pios_usb_main_rm1_cfg = {
1680 .NVIC_IRQChannel = OTG_FS_IRQn,
1682 .NVIC_IRQChannelSubPriority = 3,
1683 .NVIC_IRQChannelCmd = ENABLE,
1689 .GPIO_Pin = GPIO_Pin_13,
1690 .GPIO_Speed = GPIO_Speed_25MHz,
1691 .GPIO_Mode = GPIO_Mode_IN,
1692 .GPIO_OType = GPIO_OType_OD,
1697 static const struct pios_usb_cfg pios_usb_main_rm2_cfg = {
1700 .NVIC_IRQChannel = OTG_FS_IRQn,
1702 .NVIC_IRQChannelSubPriority = 3,
1703 .NVIC_IRQChannelCmd = ENABLE,
1709 .GPIO_Pin = GPIO_Pin_5,
1710 .GPIO_Speed = GPIO_Speed_25MHz,
1711 .GPIO_Mode = GPIO_Mode_IN,
1712 .GPIO_OType = GPIO_OType_OD,
1717 static const struct pios_usb_cfg pios_usb_main_novsense_cfg = {
1720 .NVIC_IRQChannel = OTG_FS_IRQn,
1722 .NVIC_IRQChannelSubPriority = 3,
1723 .NVIC_IRQChannelCmd = ENABLE,
1728 const struct pios_usb_cfg * PIOS_BOARD_HW_DEFS_GetUsbCfg (uint32_t board_revision)
1733 if (!pios_external_flash_id) {
1734 return &pios_usb_main_novsense_cfg;
1737 switch(board_revision) {
1739 return &pios_usb_main_rm1_cfg;
1742 return &pios_usb_main_rm2_cfg;
1757 #if defined(PIOS_INCLUDE_COM_MSG)
1763 #if defined(PIOS_INCLUDE_USB_HID) && !defined(PIOS_INCLUDE_USB_CDC)
1773 #if defined(PIOS_INCLUDE_USB_HID) && defined(PIOS_INCLUDE_USB_CDC)
1787 const struct pios_usb_hid_cfg pios_usb_hid_cfg = {
1794 #if defined(PIOS_INCLUDE_ADC)
1798 static void PIOS_ADC_DMA_irq_handler(
void);
1804 .flags = (DMA_FLAG_TCIF0 | DMA_FLAG_TEIF0 | DMA_FLAG_HTIF0),
1806 .NVIC_IRQChannel = DMA2_Stream0_IRQn,
1808 .NVIC_IRQChannelSubPriority = 0,
1809 .NVIC_IRQChannelCmd = ENABLE,
1813 .channel = DMA2_Stream0,
1815 .DMA_Channel = DMA_Channel_0,
1816 .DMA_PeripheralBaseAddr = (uint32_t) & ADC1->DR
1820 .half_flag = DMA_IT_HTIF0,
1821 .full_flag = DMA_IT_TCIF0,
1823 {GPIOC, GPIO_Pin_1, ADC_Channel_11}, \
1824 {GPIOC, GPIO_Pin_2, ADC_Channel_12}, \
1825 {NULL, 0, ADC_Channel_Vrefint}, \
1826 {NULL, 0, ADC_Channel_TempSensor}, \
1834 .GPIO_Pin = GPIO_Pin_8,
1835 .GPIO_Speed = GPIO_Speed_2MHz,
1836 .GPIO_Mode = GPIO_Mode_IN,
1837 .GPIO_OType = GPIO_OType_OD,
1838 .GPIO_PuPd = GPIO_PuPd_NOPULL
1840 .pin_source = GPIO_PinSource8,
1843 static void PIOS_ADC_DMA_irq_handler(
void)
1856 #if defined(PIOS_INCLUDE_WS2811)
1868 .TIM_Prescaler = (PIOS_PERIPHERAL_APB2_COUNTER_CLOCK / 12000000) - 1,
1869 .TIM_ClockDivision = TIM_CKD_DIV1,
1870 .TIM_CounterMode = TIM_CounterMode_Up,
1874 .NVIC_IRQChannel = DMA2_Stream6_IRQn,
1876 .NVIC_IRQChannelSubPriority = 0,
1877 .NVIC_IRQChannelCmd = ENABLE,
1879 .bit_clear_dma_tcif = DMA_IT_TCIF6,
1883 .gpio_pin = GPIO_Pin_12,
1884 .bit_set_dma_stream = DMA2_Stream4,
1885 .bit_set_dma_channel = DMA_Channel_6,
1886 .bit_clear_dma_stream = DMA2_Stream6,
1887 .bit_clear_dma_channel = DMA_Channel_0,
1893 .TIM_Prescaler = (PIOS_PERIPHERAL_APB2_COUNTER_CLOCK / 12000000) - 1,
1894 .TIM_ClockDivision = TIM_CKD_DIV1,
1895 .TIM_CounterMode = TIM_CounterMode_Up,
1899 .NVIC_IRQChannel = DMA2_Stream6_IRQn,
1901 .NVIC_IRQChannelSubPriority = 0,
1902 .NVIC_IRQChannelCmd = ENABLE,
1904 .bit_clear_dma_tcif = DMA_IT_TCIF6,
1908 .gpio_pin = GPIO_Pin_2,
1909 .bit_set_dma_stream = DMA2_Stream4,
1910 .bit_set_dma_channel = DMA_Channel_6,
1911 .bit_clear_dma_stream = DMA2_Stream6,
1912 .bit_clear_dma_channel = DMA_Channel_0,
1918 .TIM_Prescaler = (PIOS_PERIPHERAL_APB2_COUNTER_CLOCK / 12000000) - 1,
1919 .TIM_ClockDivision = TIM_CKD_DIV1,
1920 .TIM_CounterMode = TIM_CounterMode_Up,
1924 .NVIC_IRQChannel = DMA2_Stream6_IRQn,
1926 .NVIC_IRQChannelSubPriority = 0,
1927 .NVIC_IRQChannelCmd = ENABLE,
1929 .bit_clear_dma_tcif = DMA_IT_TCIF6,
1933 .gpio_pin = GPIO_Pin_0,
1934 .bit_set_dma_stream = DMA2_Stream4,
1935 .bit_set_dma_channel = DMA_Channel_6,
1936 .bit_clear_dma_stream = DMA2_Stream6,
1937 .bit_clear_dma_channel = DMA_Channel_0,
1943 .TIM_Prescaler = (PIOS_PERIPHERAL_APB2_COUNTER_CLOCK / 12000000) - 1,
1944 .TIM_ClockDivision = TIM_CKD_DIV1,
1945 .TIM_CounterMode = TIM_CounterMode_Up,
1949 .NVIC_IRQChannel = DMA2_Stream6_IRQn,
1951 .NVIC_IRQChannelSubPriority = 0,
1952 .NVIC_IRQChannelCmd = ENABLE,
1954 .bit_clear_dma_tcif = DMA_IT_TCIF6,
1958 .gpio_pin = GPIO_Pin_6,
1959 .bit_set_dma_stream = DMA2_Stream4,
1960 .bit_set_dma_channel = DMA_Channel_6,
1961 .bit_clear_dma_stream = DMA2_Stream6,
1962 .bit_clear_dma_channel = DMA_Channel_0,
1969 #if defined(PIOS_INCLUDE_MPU)
1971 static const struct pios_exti_cfg pios_exti_mpu_cfg __exti_config = {
1977 .GPIO_Pin = GPIO_Pin_4,
1978 .GPIO_Speed = GPIO_Speed_100MHz,
1979 .GPIO_Mode = GPIO_Mode_IN,
1980 .GPIO_OType = GPIO_OType_OD,
1981 .GPIO_PuPd = GPIO_PuPd_NOPULL,
1986 .NVIC_IRQChannel = EXTI4_IRQn,
1988 .NVIC_IRQChannelSubPriority = 0,
1989 .NVIC_IRQChannelCmd = ENABLE,
1994 .EXTI_Line = EXTI_Line4,
1995 .EXTI_Mode = EXTI_Mode_Interrupt,
1996 .EXTI_Trigger = EXTI_Trigger_Rising,
1997 .EXTI_LineCmd = ENABLE,
2004 .default_samplerate = 1000,
2009 #if defined(PIOS_INCLUDE_HMC5883)
2011 static const struct pios_exti_cfg pios_exti_hmc5883_cfg __exti_config = {
2017 .GPIO_Pin = GPIO_Pin_7,
2018 .GPIO_Speed = GPIO_Speed_100MHz,
2019 .GPIO_Mode = GPIO_Mode_IN,
2020 .GPIO_OType = GPIO_OType_OD,
2021 .GPIO_PuPd = GPIO_PuPd_NOPULL,
2026 .NVIC_IRQChannel = EXTI9_5_IRQn,
2028 .NVIC_IRQChannelSubPriority = 0,
2029 .NVIC_IRQChannelCmd = ENABLE,
2034 .EXTI_Line = EXTI_Line7,
2035 .EXTI_Mode = EXTI_Mode_Interrupt,
2036 .EXTI_Trigger = EXTI_Trigger_Rising,
2037 .EXTI_LineCmd = ENABLE,
2043 .
exti_cfg = &pios_exti_hmc5883_cfg,
2055 #if defined(PIOS_INCLUDE_MS5611)
2059 .temperature_interleaving = 1,
uint8_t expect_manufacturer
const struct pios_exti_cfg * exti_cfg
#define PIOS_HMC5883_ODR_75
static const struct pios_tim_clock_cfg tim_3_cfg
const struct pios_flash_driver pios_jedec_flash_driver
#define I2C2_EV_IRQHandler
COM MSG private definitions.
APIs for PIOS_USBHOOK layer.
TIM_ICInitTypeDef tim_ic_init
#define PIOS_DEBUG_Assert(test)
static const struct pios_tim_clock_cfg tim_11_cfg
#define PIOS_HMC5883_MODE_CONTINUOUS
static const struct pios_usart_cfg pios_usart_main_cfg
bool PIOS_HMC5883_IRQHandler()
#define PIOS_IRQ_PRIO_HIGHEST
Configuration structure for the BMP280 driver.
#define PIOS_SERVOS_INITIAL_POSITION
Defines the API to set up the HID + CDC USB descriptor config.
void PIOS_INTERNAL_ADC_DMA_Handler()
#define RTC_WKUP_IRQHandler
static const struct pios_tim_clock_cfg tim_5_cfg
static const struct pios_tim_clock_cfg tim_4_cfg
#define PIOS_IRQ_PRIO_MID
Configuration structure for the MS5611 driver.
USART private definitions.
#define DMA2_Stream0_IRQHandler
static const struct pios_tim_clock_cfg tim_12_cfg
Spektrum/JR DSMx satellite receiver private structures.
enum pios_ms5611_osr oversampling
#define JEDEC_MEMORYTYPE_ANY
#define I2C2_ER_IRQHandler
static const TIM_TimeBaseInitTypeDef tim_9_10_11_time_base
#define FLASH_SECTOR_64KB
const struct pios_exti_cfg * exti_cfg
Driver for talking to most JEDEC flash chips.
#define PIOS_SERVO_UPDATE_HZ
static const struct pios_tim_channel pios_tim_rcvrport_all_channels[]
static const TIM_TimeBaseInitTypeDef tim_3_5_time_base
struct pios_i2c_adapter * pios_i2c_t
const struct pios_annunc * annunciators
void PIOS_I2C_EV_IRQ_Handler(pios_i2c_t i2c_id)
static const TIM_TimeBaseInitTypeDef tim_apb2_time_base
#define PIOS_HMC5883_GAIN_1_9
ADC_TypeDef * adc_dev_master
#define I2C1_ER_IRQHandler
TIM_OCInitTypeDef tim_oc_init
USB COM HID private definitions.
#define I2C1_EV_IRQHandler
Servo private structures.
#define FLASH_SECTOR_16KB
static const struct pios_usart_cfg pios_usart_flexi_cfg
void PIOS_FLASH_fixup_partitions_for_capacity(struct pios_flash_partition *partition_table, uint8_t partition_table_len, const struct pios_flash_chip *descriptor, struct pios_flash_sector_range *sectors, uint32_t num_bytes)
static const struct pios_tim_clock_cfg tim_9_cfg
void PIOS_I2C_ER_IRQ_Handler(pios_i2c_t i2c_id)
TIM_ICInitTypeDef tim_ic_init
#define DMA2_Stream6_IRQHandler
Defines the API to set up the HID-only USB descriptor config.
static const struct pios_tim_channel pios_tim_servoport_rcvrport_pins[]
NVIC_InitTypeDef interrupt
#define PIOS_HMC5883_MEASCONF_NORMAL
void PIOS_RTC_irq_handler(void)
Futaba S.Bus Private structures.
void PIOS_WS2811_dma_interrupt_handler(ws2811_dev_t dev)
Handles a DMA completion interrupt on bit_clear_dma_stream.
bool PIOS_MPU_IRQHandler(void)
The IMU interrupt handler. Fetches new data from the IMU.
const struct pios_flash_driver * driver
static const struct pios_tim_channel pios_tim_servoport_all_pins[]
static const struct pios_tim_clock_cfg tim_10_cfg
const struct pios_flash_partition pios_flash_partition_table[]
static const struct pios_tim_clock_cfg tim_1_cfg
#define PIOS_IRQ_PRIO_HIGH
USB COM CDC private definitions.
enum pios_flash_partition_labels label
#define PIOS_IRQ_PRIO_LOW
#define PIOS_Assert(test)
static const struct pios_tim_clock_cfg tim_8_cfg
uint32_t PIOS_Flash_Jedec_GetCapacity(uintptr_t chip_id)
#define BMP280_HIGH_RESOLUTION
#define JEDEC_MANUFACTURER_ANY
#define PIOS_ANNUNCIATOR_BUZZER
#define FLASH_SECTOR_128KB
static const TIM_TimeBaseInitTypeDef tim_apb1_time_base
Implements an OpenLRS driver for the RFM22B.
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.