summaryrefslogtreecommitdiff
path: root/components/drivers/serial
AgeCommit message (Collapse)Author
2025-11-07[serialv2]:Fixed the issue where the serialv2 terminal did not have the ↵CYFS
enable stream mode
2025-10-16utest: Improve the strings displayed in the menuChen Wang
Use "Test" instead of "Unit Testcases" to make string shorter. Use uppercase to make it look more eye-catching. Signed-off-by: Chen Wang <[email protected]>
2025-10-15utest: UTEST_SERIAL_POSIX_TC -> RT_UTEST_SERIAL_POSIXChen Wang
Signed-off-by: Chen Wang <[email protected]>
2025-10-15utest: UTEST_SERIAL_QEMU_TC -> RT_UTEST_SERIAL_QEMUChen Wang
Signed-off-by: Chen Wang <[email protected]>
2025-10-15utest: UTEST_SERIAL_TC -> RT_UTEST_SERIAL_V2Chen Wang
Signed-off-by: Chen Wang <[email protected]>
2025-10-15utest: UTEST_SERIAL_BYPASS -> RT_UTEST_SERIAL_BYPASSChen Wang
Signed-off-by: Chen Wang <[email protected]>
2025-10-11utest: serial: update case namesChen Wang
Follow the naming rules of utest-cases. Signed-off-by: Chen Wang <[email protected]>
2025-10-11utest: serial: move from examples to components/drivers/serialChen Wang
Signed-off-by: Chen Wang <[email protected]>
2025-09-06feat: Initialize local variables to prevent GCC compilation warningswdfk-prog
2025-09-01fix(ioctl): _IOR() overflows in switch (int) #10650Tang Haojin
2025-09-01fix: warnings generated by Kconfig.maosql
2025-08-16[component][drivers][serial_v2] 优化serial_v2 (#10603)RyanCW
* [bsp][stm32][drv_usart_v2] uart_isr不再使用链式调用,RXNE内循环读空,一些细节优化 * [componnents][drivers][serial_v2] 增加获取config接口,使用rt_tick_get_delta替代内部的时间绕回判断,写满丢弃策略rx接收数据错乱修复,clang-tidy和cppcheck审查优化 * [utest][drivers][serial_v2] 测试例程进行优化 * [bsp][stm32][drv_usart_v2] 撤回DMAMUX1修改 * [componnents][drivers][serial_v2] read和write不再返回-RT_ETIMEOUT改为已发送或读取的字节数,细节优化 * [utest][drivers][serial_v2] 增加单独的timeout测试,减少测试中的硬延时 * [utest][drivers][serial_v2] 漏提交的posix下标志位 * [utest][drivers][serial_v2] 优化测试例程 * [bsp][stm32][drv_usart_v2] transmit返回错误值,RXNE增加超时逻辑 * [componnents][drivers][serial_v2] 增加transmit错误处理,增加超时退出机制显式的避免死循环 * [componnents][drivers][serial_v2] 适配serial_v2和posix非libc标准库下的console和shell
2025-08-10[driver][serial] V1]: fix correct data loss logic when RX ring buffer is fullwdfk-prog
In the serial ISR (`rt_hw_serial_isr`), the previous logic for handling a full RX FIFO was flawed. When the buffer was filled, it would increment `get_index` (`get_index += 1`). This had two negative consequences: 1. It effectively discarded the oldest byte of data prematurely. 2. It reduced the usable capacity of a buffer of size N to N-1. For example, a 64-byte buffer could only ever hold 63 readable bytes after becoming full. This patch corrects the behavior by implementing a standard overwriting ring buffer strategy. When the buffer is full, the logic is changed to `get_index = put_index`. This ensures that: - When new data arrives, it correctly overwrites the oldest data. - The `get_index` is advanced along with the `put_index`, correctly marking the new start of the buffer. - The full N-byte capacity of the buffer is utilized, always storing the N most recent bytes. This change resolves the unexpected data loss and makes the buffer behavior correct and predictable.
2025-08-01【SMART】【BSP】【allwinner】Fix smart serial_v2 bypass compile error ↵rcitach
issue (#10524) * Modify the reference path of the header file in the middle section * format * Fix smart serial_v2 bypass compile error issue * add allwinner/d1s ci
2025-07-24[drivers][serial_v2] 修复dma下rx_flush的bugryancw
2025-05-22[components][serial_v2] ↵ryancw
写满丢弃策略对dma_ping_buf的处理有误、细节调整
2025-05-16[drivers][serial_v2]允许阻塞接收超过rx缓冲区大小的数据、增 ↵ryancw
加超时时间、flush、获取缓冲区数据长度命令、数据溢出逻辑修复、稳定性细节优化、添加更多serial_v2测试用例 [components][serial_v2] 优化txflush逻辑、对tx的activated做中断保护 [components][at] at_client适配新版serial_v2 [components][at] at_server适配新版serial_v2 [components][serial_v2] 测试用例增加循环调用,format测试用例 [components][serial_v2] poll模式判断逻辑错误 [components][serial_v2] 测试用例去掉一些非必要延时 [components][serial_v2] 测试例程使用menuconfig进行配置,更新readme [components][at_client] at_client_getchar返回值错误、at_client解析线程优先级错误设置 [components][at] 错误码应该返回负值 [components][serial_v2] TCFLSH和FIONREAD完善、control函数增加错误返回值 [components][serial_v2] RT_SERIAL_CTRL_GET_RX_DATA_LEN更改为RT_SERIAL_CTRL_GET_UNREAD_BYTES_COUNT [utest][serial_v2] TC_UART_SEND_TIMES替换为RT_SERIAL_TC_SEND_ITERATIONS [components][serial_v2] FIONREAD参数应该是无符号类型 [utest][serial_v2] 完善测试用例 [components][serial_v2] 避免使用三目运算符 [components][serial_v2] 使用clang-format格式化代码 [components][serial_v2] 添加get超时时间命令 [components][serial_v2] 完善posix接口 [components][serial_v2] 阻塞接口添加阻塞时间为0时的处理逻辑、优化RX阻塞接收逻辑 [components][serial_v2] 设置超时时间命令的参数改为指针形式 [components][serial_v2] nbuf发送添加超时时间为0时的逻辑 [components][serial_v2] 完善添加测试用例 [utest][serial_v2] 修复依赖关系 [components][serial_v2] 非阻塞模式下tx_flush错误修复 [components][serial_v2] activated使用原子API [components][serial_v2] 优化DMA逻辑、没使能DMA时屏蔽DMA逻辑节约资源 [components][serial_v2] 提供写满时丢弃新数据和覆盖旧数据策略,写满丢弃策略效率更高 [components][serial_v2] 部分平台适配写满时两种策略功能 [components][serial_v2] DMA模式暂不支持丢弃新数据策略 [utest][serial_v2] 优化测试代码 [components][serial_v2] DMA模式下使用乒乓缓冲、DMA模式支持丢弃新数据策略 [utest][serial_v2] 适配DMA乒乓缓冲 [bsp][serial_v2] 部分bsp适配DMA下乒乓缓冲 [components][serial_v2] 使用spinlock替换中断,对部分结构体变量使用原子操作 [utest][serial_v2] 更新测试用例 [components][at] 适配new serialv2不再判断RTT版本号 [components][at] 删除多余的中文注释 [utest][serial_v2] 添加交叉echo示例,qemu环境下专用 [bsp][qemu] 适配串口v2并开启fifo [components][at] 修复合并导致的错误 [bsp][n32] 适配serial_v2,没有经过测试 [components][serial_v2] 格式化代码 [utest][serial_v2] 删除无意义的打印
2025-01-20fix when open samrt but using msh after run elf file the msh will downzhujiale
2024-12-17[serial] add bypass testcase in utestzhujiale
2024-12-17[serial] add bypass hook to direct processing char when uart irq comingzhujiale
2024-11-24[drivers] fixed a minor typo in the comments of dev_serial_v2.cPermissionDenied7335
2024-09-13[drivers] Specifies the name of the drivers driver fileCXSforHPU
https://github.com/RT-Thread/rt-thread/pull/9420
2024-07-09[smart/tty] skip configure of rt_serial on tty open (#9152)Shell
Skip configure on open since all configs are copied from the current configuration on device. So we don't bother to set it back to device again. Changes: - test and skip configuration on open() of tty device Signed-off-by: Shell <[email protected]>
2024-07-09[fixed]serial_v2.c兼容DFS_V2接口 (#9153)LaterComer
2024-06-27[drivers][serial V1]poll tx 增加异常退出机制wdfk-prog
2024-06-16[components] [drivers ] [Kconfig] 整理 components/drivers 的 Kconfig (#9054)sp-cai
整理 components/drivers 的 Kconfig
2024-05-21[component][driver]init dm serial naming framework in a separate phase (#8971)zms123456
init dm serial naming framework in a phase
2024-05-17[smart] select console device dynamically (#8949)Shell
* [smart] select console device dynamically - Fixed compiler warning on terminal subsystem for `components/lwp/terminal/terminal.h` - Updated default console setup to dynamically select an appropriate tty device based on the configured console device name. Signed-off-by: Shell <[email protected]> * fixup: remove useless codes --------- Signed-off-by: Shell <[email protected]>
2024-05-16[drivers][serial]fix error in getting serial_tty settings (#8953)zms123456
fix error in getting serial_tty settings
2024-05-09fix_serial_baudrate_setgeniusgogo
2024-05-07fix_serial_baudrate_setgeniusgogo
Signed-off-by: geniusgogo <[email protected]>
2024-04-29fix baudrate error (#8873)xiao-mang
* fix baudrate error * fix baudrate error * fix baudrate error * fix baudrate error * fix baudrate error * fix baudrate error * fix baudrate error * fix baudrate error * fix baudrate error
2024-04-25[smart] fix tty serial ioctl (#8861)Shell
Using param callback to reduce unnecessary call. Signed-off-by: Shell <[email protected]>
2024-04-20[smart] fixup rt_hw_serial_unregister_tty of serial ttyShell
Mutex lock should be taken before release the TTY device. Signed-off-by: Shell <[email protected]>
2024-04-15[component][driver][serial/tty]using serial name to name ttyzms123456
当使用新device model时,serial的名字由系统分配,id也由系统分配,此时应根据系统分配的serial id来作为serial-tty的id
2024-04-15[components][drivers]fix workqueue bugzms123456
fix workqueue bug
2024-04-09[drivers/serial] Introduce hooker for TTY (#8733)Shell
In this patch, a hook list has been introduced to address the concerns regarding coupling issues arising from modifications to the serial code for integrating TTY logic. Signed-off-by: Shell <[email protected]>
2024-04-02fix: code format of serial.c and compile error in aarch64 context_gcczhao maosheng
2024-04-01[components][drivers] fix posix tty, and add more baudrate (#8683)zms123456
* serial-tty fix * v2
2024-03-28sync smart & dfs (#8672)Shell
Signed-off-by: xqyjlj <[email protected]> Signed-off-by: Shell <[email protected]> Co-authored-by: xqyjlj <[email protected]>
2024-03-20[components/driver] Fix issue for serial_V2 in no buffer bloking tx mode.Liu Yang
2024-03-01[components/driver] update serial (#8567)fangjianzhou
2024-02-21fix(serial_v2): tx_fifo->rb.buffer_ptr not init when RT_DEVICE_FLAG_DMA_TX ↵LaterComer
and RT_SERIAL_TX_BLOCKING 为什么提交这份PR (why to submit this PR) serial_v2驱动框架,rt_serial_tx_enable()函数,在 DMA阻塞发送(RT_DEVICE_FLAG_DMA_TX and RT_SERIAL_TX_BLOCKING) 的时候,使用rt_malloc分配了tx_fifo内存,但是并未对tx_fifo->rb.buffer_ptr指针进行初始化(rt_malloc不会自动初始化内存),因此可能导致buffer_ptr是一个随机指针。但是rt_serail_write()函数需要根据tx_fifo->rb.buffer_ptr是否为RT_NULL来判断是调用_serial_fifo_tx_blocking_nbuf()还是_serial_fifo_tx_blocking_buf()。 由于tx_fifo->rb.buffer_ptr可能是一个随机值(不一定为RT_NULL=0),导致RT_DEVICE_FLAG_DMA_TX and RT_SERIAL_TX_BLOCKING模式下调用了_serial_fifo_tx_blocking_buf(),但是rb没有真正开辟内存空间,导致内存异常 你的解决方案是什么 (what is your solution) rt_serial_tx_enable(),在DMA阻塞发送分支下,对tx_fifo->rb.buffer_ptr进行初始化,赋值为RT_NULL。
2023-10-25🎈 perf: perf rt_hw_interrupt_disable/enable (#8042)xqyjlj
Signed-off-by: Shell <[email protected]> Co-authored-by: Shell <[email protected]>
2023-09-28[serial_v2] ↵zan319
修复阻塞模式下中断发送的逻辑顺序问题与多线程下的竞态条件 (#7997)
2023-07-24modify some function prototypes of the dfs_file_ops structure and the ↵xiao-mang
function declarations based on it (#7849)
2023-07-07[components][drivers][serial] serial.c 修复串口有时重复发送 '\r' ↵sp-cai
的问题 (#7767)
2023-06-10[dfs] Add DFS v2.0 (#7606)Bernard Xiong
2023-05-15[components][drivers][HUST CSE]修复serial_v2.c中可能产生的死循环 ↵7YZ7
(#7394)
2023-04-19[serial-v2]fix the data type errorMeco Man