mirror of
https://github.com/apache/nuttx.git
synced 2026-10-11 08:10:21 +00:00
stm32 serial:Add SINGLEWIRE PUSHPULL option
This commit is contained in:
parent
5a76767cd7
commit
749dbce431
1 changed files with 3 additions and 1 deletions
|
|
@ -1980,7 +1980,9 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
|
|||
#else
|
||||
if ((arg & SER_SINGLEWIRE_ENABLED) != 0)
|
||||
{
|
||||
uint32_t gpio_val = GPIO_OPENDRAIN;
|
||||
uint32_t gpio_val = (arg & SER_SINGLEWIRE_PUSHPULL) ==
|
||||
SER_SINGLEWIRE_PUSHPULL ?
|
||||
GPIO_PUSHPULL : GPIO_OPENDRAIN;
|
||||
gpio_val |= ((arg & SER_SINGLEWIRE_PULL_MASK) ==
|
||||
SER_SINGLEWIRE_PULLUP) ? GPIO_PULLUP
|
||||
: GPIO_FLOAT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue