There is a problem with the matching of case names
in the original code. Due to original code use memcmp
with len, if the input case name and the existing
case name have an inclusion relationship, for example,
if the actual case name is "gpip_irq", and run
`utest_run gpio` will also match successfully, but it's
not expected.
Modify the logic of exact matching and use strcmp instead.
Keep the original wildcard logic, that is,
`utest_run gpio*` can match both "gpio_irq" and "gpio".
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
K230 supports 3 GPIO groups:
group0: GPIO0 ~ GPIO31, support i/o and irq
group1: GPIO32 ~ GPIO63, support i/o and irq
group2: GPIO64 ~ GPIO71, only support i/o.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
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>
- include the year, month, and day for rtc_alarm_time_set API
- add local time conversion for get timeval and set stamp
Signed-off-by: Runcheng Lu <runcheng.lu@hpmicro.com>
K230 support 6 general hardware timers and 3 stc timers.
This patch only implement drivers for general hw timers.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
In line with the layout of the source code, the
Device-Driver submodule should belong to components.
The doxygen Module part has been adjusted. This commit
modifies the markdown document part and moves the
device-driver pages under to components.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
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>
The originally defined "group_Device" should actually
be part of the device-driver component, so create
a new "group_device_driver" and then rename
"group_Device" to "group_device_driver".
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
K230 has two watchdog timers.
Add unit tests based on utest framework.
Watchdog and test are both configuable, disabled by default.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
scons --menuconfig will report:
```
warning: the choice symbol PKG_USING_ZLIB_LATEST_VERSION
(defined at /home/u/.env/packages/packages/misc/zlib/Kconfig:31)
is selected by the following symbols, but select/imply has no
effect on choice symbols
- BSP_ROOTFS_TYPE_CROMFS (defined at Kconfig:36)
warning: default on the choice symbol BSP_USING_SDIO0
(defined at board/Kconfig:20) will have no effect, as defaults
do not affect choice symbols
warning: default on the choice symbol BSP_USING_SDIO1
(defined at board/Kconfig:34) will have no effect, as defaults
do not affect choice symbols
```
Fix and remove these warnings.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
* [bsp][wch][risc-v] add drv_flash for ch32v307.
* [bsp][wch][risc-v] 1. add yml file for ch32v307.
2. fix programs a word at chip flash timeout.
3. priority use of fast mode.
* [bsp][wch][risc-v] fix spi device for ch32v307.
To enhance the robustness of key recognition and solve the problem of errors and omissions caused by the lag of state assignment statement
增强方向键识别的鲁棒性,解决状态赋值语句滞后带来的错漏问题