nuttx/arch
alexcekay d32fdfa20b arch/arm/stm32: Support optional TX/RX UART GPIOs.
The STM32 serial drivers already treat 0 as not present for optional
GPIO fields (CTS, RTS), guarding each call site with a != 0 check.

TX and RX GPIO fields lacked this guard, so boards that
define GPIO_UARTx_TX or GPIO_UARTx_RX as 0 (pin not routed) caused
stm32_configgpio(0) to be called, which silently configures PA0 as a
floating input, corrupting any other peripheral using that pin.

Having an optional TX/RX UART is useful for several cases:
* RX-only connections: e.g. radio control input on flight-controllers where no TX is wired.
* Single-wire (half-duplex) connections: e.g. ESC telemetry connections.
* Output-only NSH which prints output but does not allow entering inputs.

Without a sentinel value for these cases one must assign the unused GPIO to
a NC pin, which is misleading when reading board configuration files.

Add != 0 guards for tx_gpio and rx_gpio across all STM32 serial driver
families.

Using 0 as the sentinel is safe for TX/RX because any valid UART config requires
GPIO_ALT bits set in the config word, so 0 can never represent a real
TX or RX pin configuration.

Signed-off-by: alexcekay <alexander@auterion.com>
2026-05-27 14:32:19 -04:00
..
arm arch/arm/stm32: Support optional TX/RX UART GPIOs. 2026-05-27 14:32:19 -04:00
arm64 boards/raspberrypi-4b: Add SMP configuration 2026-05-22 06:45:10 +08:00
avr !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
ceva arch/ceva: Replace board_app_initialize 2026-05-02 18:36:46 +08:00
dummy
hc style: fix checkpatch issues after debug.h move 2026-04-07 07:50:06 -03:00
mips !nuttx: drop redundant casts on tv_sec/tv_nsec and fix printf formats 2026-05-19 16:21:28 +08:00
misoc include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
or1k include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
renesas !nuttx: drop redundant casts on tv_sec/tv_nsec and fix printf formats 2026-05-19 16:21:28 +08:00
risc-v arch/risc-v/espressif: Add LP Mailbox support for esp32p4 2026-05-26 10:03:43 +08:00
sim arch/sim: Stop publishing stale X11 display during teardown. 2026-05-27 13:16:29 +02:00
sparc !nuttx: drop redundant casts on tv_sec/tv_nsec and fix printf formats 2026-05-19 16:21:28 +08:00
tricore arch/tricore: Add hardware debug breakpoint and watchpoint support. 2026-05-22 15:38:36 +08:00
x86 arch/x86: Add palette 256 color to qemu-i486 VGA driver 2026-05-02 09:51:59 -04:00
x86_64 !nuttx: drop redundant casts on tv_sec/tv_nsec and fix printf formats 2026-05-19 16:21:28 +08:00
xtensa xtensa/esp32: Fix RWDT register offsets. 2026-05-27 09:36:43 +08:00
z16 include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
z80 style: fix checkpatch issues after debug.h move 2026-04-07 07:50:06 -03:00
CMakeLists.txt arch/z80: migrate to SPDX identifier 2024-12-02 17:23:25 +08:00
Kconfig arch/tricore: add TriCore up_backtrace() support 2026-05-20 09:20:33 +08:00