diff options
| author | liangtian061109 <[email protected]> | 2026-11-25 13:11:41 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2026-11-25 16:10:54 +0800 |
| commit | 07fcaa6928d96ace89bf5afe90435d63a2bc9251 (patch) | |
| tree | 19fcef8d78ac60093aca3d5e972a856af2006f20 /components | |
| parent | f27b61d6c4f56d4216416a75a68dd71929aa6f55 (diff) | |
Signed-off-by: liangtian061109 <[email protected]>
Diffstat (limited to 'components')
| -rw-r--r-- | components/drivers/serial/Kconfig | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/components/drivers/serial/Kconfig b/components/drivers/serial/Kconfig index 95b375c3e6..249ccd25c4 100644 --- a/components/drivers/serial/Kconfig +++ b/components/drivers/serial/Kconfig @@ -12,6 +12,31 @@ menuconfig RT_USING_SERIAL bool "RT_USING_SERIAL_V1" config RT_USING_SERIAL_V2 bool "RT_USING_SERIAL_V2" + help + Enable the Serial V2 device driver framework, which unifies + polling, interrupt, and DMA transfers behind blocking and + non-blocking I/O modes (RT_SERIAL_RX_BLOCKING / + RT_SERIAL_RX_NON_BLOCKING and RT_SERIAL_TX_BLOCKING / + RT_SERIAL_TX_NON_BLOCKING). + + When enabled, the build compiles dev_serial_v2.c and includes + drivers/dev_serial_v2.h instead of the V1 implementation. + Buffer sizes are configured per device via rx_bufsz and + tx_bufsz in struct serial_configure (allocated dynamically on + open when non-zero, or using polling when set to 0), and + RX ringbuffer overflow handling is controlled by + RT_USING_SERIAL_MODE. + + Requires RT_USING_SERIAL (with RT_USING_DEVICE and + RT_USING_DEVICE_IPC), RT_USING_HEAP when buffered RX/TX is + used, and a BSP UART driver adapted to Serial V2 + rt_uart_ops (including a valid transmit callback). + + Mutually exclusive with RT_USING_SERIAL_V1 and disables the + global RT_SERIAL_RB_BUFSZ option. Applications and BSP + drivers written for legacy V1 open flags + (RT_DEVICE_FLAG_INT_RX/TX, RT_DEVICE_FLAG_DMA_RX/TX) are + incompatible without adaptation. endchoice choice RT_USING_SERIAL_MODE |
