Merged in david_s5/nuttx/px4_firmware_nuttx-8.1+_siglewire (pull request #1070)

single wire Allow selection of pull{up|down|none}

* tioctl:Allow selection of pull{up|down|none}

* stm32:Single Wire add pull{up|down|none} tioctl

* stm32f0l0g0:Single Wire add pull{up|down|none} tioctl

* stm32f7:Single Wire add pull{up|down|none} tioctl

* stm32h7:Single Wire add pull{up|down|none} tioctl

* stm32l4:Single Wire add pull{up|down|none} tioctl

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
David Sidrane
2019-11-10 12:27:47 +00:00
committed by Gregory Nutt
parent 8c85ecf531
commit 19015f7e26
7 changed files with 24 additions and 8 deletions
+6 -2
View File
@@ -184,8 +184,12 @@
#define TIOCSSINGLEWIRE _TIOC(0x0030) /* Set single-wire mode */
#define TIOCGSINGLEWIRE _TIOC(0x0031) /* Get single-wire mode */
# define SER_SINGLEWIRE_ENABLED (1 << 0) /* Enable/disable single-wire support */
# define SER_SINGLEWIRE_PULLUP (1 << 1) /* Enable Pull-up on TX (Open-Drain otherwise) */
# define SER_SINGLEWIRE_ENABLED (1 << 0) /* Enable/disable single-wire support */
# define SER_SINGLEWIRE_PULL_SHIFT (1) /* RX/TX Line Pullup/down control */
# define SER_SINGLEWIRE_PULL_MASK (3 << SER_SINGLEWIRE_PULL_SHIFT)
# define SER_SINGLEWIRE_PULL_DISABLE (0 << SER_SINGLEWIRE_PULL_SHIFT) /* Float RX/TX Line */
# define SER_SINGLEWIRE_PULLUP (1 << SER_SINGLEWIRE_PULL_SHIFT) /* Enable Pull up the RX/TX Line */
# define SER_SINGLEWIRE_PULLDOWN (2 << SER_SINGLEWIRE_PULL_SHIFT) /* Enable Pull down the RX/TX Line */
/* Debugging */