mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-26 15:54:15 +01:00
LP-512 F3: implemented missing ioctls PIOS_IOCTL_USART_SET_IRQ_PRIO and PIOS_IOCTL_USART_GET_DSMBIND
This commit is contained in:
parent
faf0ae7c04
commit
5b5546a1cb
@ -476,6 +476,9 @@ static int32_t PIOS_USART_Ioctl(uint32_t usart_id, uint32_t ctl, void *param)
|
||||
uint32_t cr1_ue = usart_dev->cfg->regs->CR1 & USART_CR1_UE;
|
||||
|
||||
switch (ctl) {
|
||||
case PIOS_IOCTL_USART_SET_IRQ_PRIO:
|
||||
return PIOS_USART_SetIrqPrio(usart_dev, *(uint8_t *)param);
|
||||
|
||||
case PIOS_IOCTL_USART_SET_INVERTED:
|
||||
{
|
||||
enum PIOS_USART_Inverted inverted = *(enum PIOS_USART_Inverted *)param;
|
||||
@ -505,6 +508,7 @@ static int32_t PIOS_USART_Ioctl(uint32_t usart_id, uint32_t ctl, void *param)
|
||||
usart_dev->cfg->regs->CR1 &= ~((uint32_t)USART_CR1_UE);
|
||||
USART_HalfDuplexCmd(usart_dev->cfg->regs, *(bool *)param ? ENABLE : DISABLE);
|
||||
break;
|
||||
case PIOS_IOCTL_USART_GET_DSMBIND:
|
||||
case PIOS_IOCTL_USART_GET_RXGPIO:
|
||||
*(struct stm32_gpio *)param = usart_dev->cfg->rx;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user