nuttx/drivers/serial
raiden00pl 753d2a3466
Some checks failed
MemBrowse Memory Report / changes-filter (push) Waiting to run
MemBrowse Memory Report / load-targets (push) Waiting to run
MemBrowse Memory Report / identical (push) Blocked by required conditions
MemBrowse Memory Report / analyze (push) Blocked by required conditions
Build Documentation / build-html (push) Has been cancelled
drivers/serial: fetch uart_writev data from the iovec segment
Since 00010089b8 uart_writev() takes the data one byte at a time with
uio_copyto() plus uio_advance().  Both of them walk the iovec list and
redo the byte counters for every single byte, so most of the work is
bookkeeping rather than copying.  On slow cores this is what limits how
fast the TX buffer can be filled.

Take a pointer to the current iovec segment and read the bytes straight
from it, and move the uio forward once per segment instead of once per
byte.  nseg counts only the bytes that really went into the buffer: it
is increased at the end of a loop pass, and that step is skipped when
uart_putxmitchar() fails.

Measured on nRF52840 (Cortex-M4, 64 MHz), 8 MiB write() to a CDC/ACM
port: 223 KB/s to 481 KB/s.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
2026-08-09 03:23:28 +08:00
..
CMakeLists.txt serial/xlnx_ps: add common Xilinx UART Peripheral System (XUARTPS) support 2026-02-27 08:14:03 -03:00
Kconfig serial/xlnx_ps: add help chapter for XUARTPS 2026-02-27 08:14:03 -03:00
Kconfig-16550 drivers/serial/16550: add polling mode support for serial drivers 2026-02-27 08:14:03 -03:00
Kconfig-cmsdk drivers/serial:support arm cmsdk drivers 2024-04-26 18:42:35 -03:00
Kconfig-lpuart Add initial support for NXP S32K3 MCU family 2022-07-25 23:47:05 +08:00
Kconfig-pci drivers/serial: simplify 16550_PCI_UARTx_CLOCK config 2025-01-03 08:52:43 +08:00
Kconfig-pl011 drivers/serial/uart_pl011.c : add the interface about clock and reset control for reducing power consumption. 2024-06-03 21:18:44 +08:00
Kconfig-sci
Kconfig-uart
Kconfig-usart drivers/serial/serial: prevent race conditions on 8-bit architectures 2025-06-19 10:01:24 -03:00
Kconfig-xlnxps drivers/serial/xlnxps: add polling mode support for serial drivers 2026-02-27 08:14:03 -03:00
Make.defs serial/xlnx_ps: add common Xilinx UART Peripheral System (XUARTPS) support 2026-02-27 08:14:03 -03:00
ptmx.c drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
pty.c drivers/serial: Modify serial/pty to allow NSH/Telnet line edit 2026-07-22 22:07:18 +08:00
pty.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
serial.c drivers/serial: fetch uart_writev data from the iovec segment 2026-08-09 03:23:28 +08:00
serial_cmsdk.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
serial_dma.c style: fix checkpatch issues after debug.h move 2026-04-07 07:50:06 -03:00
serial_gdbstub.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
serial_io.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
uart_16550.c arch/mips: Add basic support for MIPS Creator CI20 board 2026-07-15 08:02:55 -03:00
uart_bth4.c drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
uart_bth5.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
uart_hostfs.c drivers/: Multiple Drivers Are Registered With World Writable Part 3 2026-07-16 09:49:07 -03:00
uart_pci_16550.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
uart_pl011.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
uart_ram.c drivers/serial/uart_ram: match uart_ops_s receive() prototype 2026-07-09 09:59:27 -04:00
uart_rpmsg.c serial/uart_rpmsg: Remove redundant CONFIG_RPMSG_UART_CONSOLE macro check 2026-03-03 11:55:34 -05:00
uart_rpmsg_raw.c serial/uart_rpmsg: Remove redundant CONFIG_RPMSG_UART_CONSOLE macro check 2026-03-03 11:55:34 -05:00
uart_xlnx_ps.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00