Commit Graph

1738 Commits

Author SHA1 Message Date
wdfk-prog
7e5cd48360 feat[SPI]: Add SPI device detach function 2025-09-25 11:41:58 +08:00
Yonggang Luo
66b2bcc080 RT_TIMER_CTRL_SET_TIME only accept rt_tick_t, pass rt_tick_t instead int/rt_int32_t 2025-09-24 18:12:36 +08:00
Yonggang Luo
4da1ef0f3d cast to (rt_tick_t)RT_WAITING_FOREVER for explicit 2025-09-24 18:12:36 +08:00
Yonggang Luo
0e9e50fe6d _rt_wqueue_wait use rt_tick_t 2025-09-24 18:12:36 +08:00
Chen Wang
b03bb709b9 utest: update naems using new rule
The names of the utest cases defined in their respective
modules have been updated.

Some utest case names are not yet in their respective modules
because their paths need to be finalized before their unique
names can be determined. Currently, these names do not
appear to conflict with the unified names. These include:

- utest cases still in examples
- bsp/qemu-virt64-riscv/applications/test/test_vector/test_vector.c.
  The entire test case should probably be placed in libcpu/risc-v
  rather than bsp.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-09-15 19:40:31 +08:00
GuEe-GUI
09d4d5f6fe [DM/NVME] Fixup the QUEUE alloc errorno check
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-09-07 07:54:01 +08:00
wdfk-prog
6881f96ea5 feat: Initialize local variables to prevent GCC compilation warnings 2025-09-06 10:51:57 +08:00
wdfk-prog
5abce84ca7 fix: 在没有定义FINSH_USING_SYMTAB时编译报错以及IPC及finsh启用时自动选择必要的功能 2025-09-04 21:42:10 +08:00
Tang Haojin
728d9e4919 fix(ioctl): _IOR() overflows in switch (int) #10650 2025-09-01 12:46:43 +08:00
maosql
9567564e86 fix: warnings generated by Kconfig. 2025-09-01 11:50:41 +08:00
Chen Wang
0fdeb4c077 utest: integrate config option for utest of audio driver
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-08-26 10:26:47 +08:00
GuEe-GUI
1892b27a45 [DM/THERMAL] Fixup the PWM-FAN remove handle data ptr
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-08-26 09:34:15 +08:00
GuEe-GUI
7101b22ffb [DM/THERMAL] Fixup the C99, 6.8.1 Labeled statements p4
Append a null statement for "Any statement may be preceded by a prefix that declares an identifier as a label name."

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-08-26 09:34:15 +08:00
GuEe-GUI
af2c8ae174 [DM/PCI] Add SoC PCI Kconfig import
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-08-25 11:12:02 +08:00
GuEe-GUI
7d96990eff [DM/PCI] Fixup the DWC PCI resource release
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-08-25 11:12:02 +08:00
GuEe-GUI
77e845e018 [DM/PCI] Fixup the bus-range probe
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-08-25 11:12:02 +08:00
GuEe-GUI
8731289055 [DM/PCI] Fixup the MSI info shuold free
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-08-25 11:12:02 +08:00
RyanCW
e0243e87c0 [component][drivers][serial_v2] 优化serial_v2 (#10603)
* [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-16 11:51:57 +08:00
wdfk-prog
302370720e [driver][serial] V1]: fix correct data loss logic when RX ring buffer is full
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-10 12:10:16 +08:00
sakumisu
38499668bf update(cherryusb): update to v1.5.2
Signed-off-by: sakumisu <1203593632@qq.com>
2025-08-08 14:50:52 +08:00
cmbjxxiao
37d902537c [arm_compiler_v4/v5] define rt_packed as __packed #10553 2025-08-06 15:16:18 +08:00
rcitach
ae50e406da 【SMART】【BSP】【allwinner】Fix smart serial_v2 bypass compile error 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-08-01 20:59:08 +08:00
liuyucai
a1c642aa3a [Fix] <components>:drivers/can/dev_can.c 修复CAN底层无法工作时导致调用 _can_int_tx 的线程一直挂起的问题
Solution: 使用 can->status.sndchange 的bit位来表示某个发送邮箱超时
如果超时 底层驱动再通知tx_done或者tx_fail事件时不予处理

Signed-off-by: Yucai Liu <1486344514@qq.com>
2025-07-29 20:18:14 +08:00
ryancw
d23006ea4f [drivers][serial_v2] 修复dma下rx_flush的bug 2025-07-24 09:37:54 +08:00
Chen Wang
895b272b69 doxygen: fix duplicated defgroup for clock
Problen:
Duplicated definition of group_clk in clk.c and clk.h.

Solution:
Delete the definition in clk.c and keep only the definition
in clk.h.

Also change the name of group_clk to group_driver_clock to
conform to the naming convention of other driver groups.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-07-22 16:00:33 +08:00
Chen Wang
2aebe694d9 doxygen: group name all in lowcase (part 2) (#10530)
* doxygen: fs: unify groupname to lowercase

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

* doxygen: drivers: unify groupname to lowercase

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

* doxygen: signal: unify groupname to lowercase

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

---------

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-07-22 13:59:25 +08:00
sakumisu
5e03e07c43 update(cherryusb): update to v1.5.1
Signed-off-by: sakumisu <1203593632@qq.com>
2025-07-15 16:35:20 +08:00
wdfk-prog
95b1d69e8c [serial_v2]modify the default configuration of the RT_SERIAL_CONFIG_DEFAULT structure to support parameters in the absence of DMA configuration. 2025-07-12 07:23:25 +08:00
GuEe-GUI
01e4caf60c [DM/PIC] Fixup the interrput info list format
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-07-12 07:16:25 +08:00
GuEe-GUI
30ab08c7c9 [DM/PIC] Config IPI by RT_MAX_IPI
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-07-12 07:16:25 +08:00
GuEe-GUI
5297c13ab0 [DM/PIC] Import DM Kconfig
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-07-12 07:16:25 +08:00
GuEe-GUI
bb9c7151bb [WDT] Intel 6300ESB Timer/Watchdog
Used for QEMU on PCI

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-07-10 17:33:40 +08:00
GuEe-GUI
2532450a83 [WDT] Add Synopsys DesignWare watchdog
This device is commonly used in SoCs.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-07-10 17:33:40 +08:00
GuEe-GUI
37818aa518 [WDT] Update for DM build
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-07-10 17:33:40 +08:00
GUI
8a7ef41c3c [SPI]Update and fixup the SPI
* Make a priv data read API for probed SPI device
* Fixup the SPI device pre-alloc
2025-07-10 13:28:16 +08:00
sakumisu
61a5710664 update(cherryusb): update framework and bugfix
* update cdc_acm device framework
* add host serial device framework
* fix dfs read write return type
* fix webusb desc len
* fix dwc2 h7rs gccfg

Signed-off-by: sakumisu <1203593632@qq.com>
2025-07-08 09:32:30 +08:00
sakumisu
2ac969b4ca update(cherryusb): update to v1.5.0 (#10409) 2025-06-20 16:19:38 +08:00
Chen Wang
60c6fc0e3a components: drivers: adc: fixed cppcheck error
[cpp_check.py 80 INFO] components/drivers/misc/adc.c:76:12:
error: Uninitialized variable: result [legacyUninitvar]
    return result;
           ^

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-06-10 14:21:46 +08:00
Chen Wang
ae86c6e8bb componnets: drivers: adc: remove build warnings
gcc build warnings:
cast from pointer to integer of different size [-Wpointer-to-int-cast]

For rt_adc_ops.enabled, the type of second param is rt_int8_t,
original _adc_control also called with wrong type casting.

Convert first to rt_base_t, then cast to rt_int8_t to remove the
build warnings.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-06-10 14:21:46 +08:00
Runcheng Lu
72c45043b5 components: drivers: rtc: add the alarm using local time for calculation
- add the alarm using local time for calculation

Signed-off-by: Runcheng Lu <runcheng.lu@hpmicro.com>
2025-06-09 13:31:16 +08:00
Chen Wang
a3339ca734 doxygen: change group_Drivers to group_device_driver
The originally defined "group_Drivers" should actually
be part of the device-driver component, so
"group_Drivers" is renamed to "group_device_driver".

In this way, the original "group_Device" and
"group_Drivers" are merged into "group_device_driver".

Adjusted the writing method of doxygen comments in the
driver code to be unified as follows:

```c
* @defgroup group_XXX XXX
* @brief xxxxxx
* @ingroup group_device_driver
```

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-05-29 13:47:46 +08:00
GuEe-GUI
99fc1bb72b [DM/PCI] Add /proc access in RT-Smart user.
1. Add ROM base info.
2. Save th PM status.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-05-23 13:22:25 +08:00
ryancw
5c23485006 [components][serial_v2] 写满丢弃策略对dma_ping_buf的处理有误、细节调整 2025-05-22 21:32:21 +08:00
Bernard Xiong
d1628a1cf3 [dfs] enable procfs and tempfs in default when using smart; fix LWIP_ROUTE warning issue. 2025-05-20 17:27:55 +08:00
1078249029
d834899a6f components: drivers: audio: Add audio driver test framework
Achieve driver framework by operating memory to simulate audio
peripheral drivers. And it could be as a draft standrad for other
drivers test framework.

Signed-off-by: 1078249029 <1078249029@qq.com>
2025-05-18 15:48:27 +08:00
ryancw
ac8fba0129 [drivers][serial_v2]允许阻塞接收超过rx缓冲区大小的数据、增加超时时间、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-05-16 09:42:11 +08:00
Bernard Xiong
50998f4e43 [building] rename the group name: LIBADT to Utilities. (#10267)
* [building] rename the group name: LIBADT to Utilities.
2025-05-16 07:31:18 +08:00
ricky
396eaa32f6 [components][wlan] Fixing comments errors of RT_WLAN_EVT_SCAN_DONE and RT_WLAN_EVT_SCAN_REPORT (#10237) 2025-04-29 09:51:49 +08:00
zhangyan
3ebad06ff3 [bsp/phytium]适配rtthread5.2版本 (#10178)
* rtthread 5.2适配
2025-04-14 19:14:54 +08:00
1078249029
9d1fb86020 [DM/FDT] Fix garble when booting
Fix garble caused by empty implementation of earlycon series
function in driver.If driver doesn't offer earlycon_id or rt_f
dt_earlycon_id.setup function but open option, the checking
of best_earlycon_id will failed.

Signed-off-by: 1078249029 <1078249029@qq.com>
2025-04-14 18:04:39 +08:00