mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
Merge branch 'master' into next
This commit is contained in:
commit
fe6c286b56
@ -180,9 +180,15 @@ int32_t PIOS_USART_Init(uint32_t * usart_id, const struct pios_usart_cfg * cfg)
|
|||||||
|
|
||||||
/* Configure USART Interrupts */
|
/* Configure USART Interrupts */
|
||||||
switch ((uint32_t)usart_dev->cfg->regs) {
|
switch ((uint32_t)usart_dev->cfg->regs) {
|
||||||
case (uint32_t)USART1: PIOS_USART_1_id = (uint32_t)usart_dev;
|
case (uint32_t)USART1:
|
||||||
case (uint32_t)USART2: PIOS_USART_2_id = (uint32_t)usart_dev;
|
PIOS_USART_1_id = (uint32_t)usart_dev;
|
||||||
case (uint32_t)USART3: PIOS_USART_3_id = (uint32_t)usart_dev;
|
break;
|
||||||
|
case (uint32_t)USART2:
|
||||||
|
PIOS_USART_2_id = (uint32_t)usart_dev;
|
||||||
|
break;
|
||||||
|
case (uint32_t)USART3:
|
||||||
|
PIOS_USART_3_id = (uint32_t)usart_dev;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
NVIC_Init(&usart_dev->cfg->irq.init);
|
NVIC_Init(&usart_dev->cfg->irq.init);
|
||||||
USART_ITConfig(usart_dev->cfg->regs, USART_IT_RXNE, ENABLE);
|
USART_ITConfig(usart_dev->cfg->regs, USART_IT_RXNE, ENABLE);
|
||||||
|
Loading…
Reference in New Issue
Block a user