mirror of
https://github.com/apache/nuttx.git
synced 2026-05-19 20:06:24 +08:00
stm32l4 serial:Add SINGLEWIRE PUSHPULL option
This commit is contained in:
committed by
Xiang Xiao
parent
48c81522f9
commit
579fbe2e52
@@ -1873,7 +1873,9 @@ static int stm32l4serial_ioctl(FAR struct file *filep, int cmd,
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user