File tree 2 files changed +26
-1
lines changed
2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -360,6 +360,31 @@ static const struct pios_usart_cfg pios_main_usart_cfg = {
360
360
.pin_source = GPIO_PinSource10 ,
361
361
},
362
362
};
363
+
364
+ static const struct pios_usart_cfg pios_rcvr_usart_cfg = {
365
+ .regs = USART1 ,
366
+ .remap = GPIO_AF_7 ,
367
+ .irq = {
368
+ .init = {
369
+ .NVIC_IRQChannel = USART1_IRQn ,
370
+ .NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_HIGHEST ,
371
+ .NVIC_IRQChannelSubPriority = 0 ,
372
+ .NVIC_IRQChannelCmd = ENABLE ,
373
+ },
374
+ },
375
+ .rx = {
376
+ .gpio = GPIOC ,
377
+ .init = {
378
+ .GPIO_Pin = GPIO_Pin_5 ,
379
+ .GPIO_Speed = GPIO_Speed_2MHz ,
380
+ .GPIO_Mode = GPIO_Mode_AF ,
381
+ .GPIO_OType = GPIO_OType_PP ,
382
+ .GPIO_PuPd = GPIO_PuPd_UP
383
+ },
384
+ .pin_source = GPIO_PinSource5 ,
385
+ },
386
+ };
387
+
363
388
#endif /* PIOS_INCLUDE_USART */
364
389
365
390
#if defined(PIOS_INCLUDE_COM )
Original file line number Diff line number Diff line change @@ -296,7 +296,7 @@ void PIOS_Board_Init(void)
296
296
uint8_t hw_rcvrport ;
297
297
HwLuxRcvrPortGet (& hw_rcvrport );
298
298
PIOS_HAL_ConfigurePort (hw_rcvrport , // port_type
299
- NULL , // usart_port_cfg
299
+ & pios_rcvr_usart_cfg , // usart_port_cfg
300
300
& pios_usart_com_driver , // com_driver
301
301
NULL , // i2c_id
302
302
NULL , // i2c_cfg
You can’t perform that action at this time.
0 commit comments