Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wmsofts
rt-thread
提交
dfddd79b
R
rt-thread
项目概览
wmsofts
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
dfddd79b
编写于
3月 16, 2023
作者:
mysterywolf
提交者:
mysterywolf
3月 16, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[errno code][-RT_EINVAL] fix that use RT_EINVAL without -
上级
e4e88b2f
变更
136
展开全部
隐藏空白更改
内联
并排
Showing
136 changed file
with
316 addition
and
324 deletion
+316
-324
bsp/Infineon/libraries/HAL_Drivers/drv_pwm.c
bsp/Infineon/libraries/HAL_Drivers/drv_pwm.c
+1
-1
bsp/airm2m/air105/libraries/rt_drivers/drv_spi.c
bsp/airm2m/air105/libraries/rt_drivers/drv_spi.c
+1
-1
bsp/airm2m/air32f103/libraries/rt_drivers/drv_hwtimer.c
bsp/airm2m/air32f103/libraries/rt_drivers/drv_hwtimer.c
+1
-1
bsp/allwinner_tina/drivers/drv_clock.c
bsp/allwinner_tina/drivers/drv_clock.c
+11
-11
bsp/allwinner_tina/drivers/drv_gpio.c
bsp/allwinner_tina/drivers/drv_gpio.c
+5
-5
bsp/allwinner_tina/drivers/drv_gpio.h
bsp/allwinner_tina/drivers/drv_gpio.h
+1
-1
bsp/apm32/libraries/Drivers/drv_pwm.c
bsp/apm32/libraries/Drivers/drv_pwm.c
+1
-1
bsp/at32/libraries/rt_drivers/drv_pwm.c
bsp/at32/libraries/rt_drivers/drv_pwm.c
+1
-1
bsp/essemi/es32f0654/drivers/drv_hwtimer.c
bsp/essemi/es32f0654/drivers/drv_hwtimer.c
+1
-1
bsp/essemi/es32f0654/drivers/drv_pwm.c
bsp/essemi/es32f0654/drivers/drv_pwm.c
+1
-1
bsp/essemi/es32f369x/drivers/drv_hwtimer.c
bsp/essemi/es32f369x/drivers/drv_hwtimer.c
+1
-1
bsp/essemi/es32f369x/drivers/drv_pwm.c
bsp/essemi/es32f369x/drivers/drv_pwm.c
+1
-1
bsp/ft2004/drivers/drv_sdctrl.c
bsp/ft2004/drivers/drv_sdctrl.c
+1
-1
bsp/gd32105c-eval/drivers/drv_gpio.c
bsp/gd32105c-eval/drivers/drv_gpio.c
+10
-10
bsp/gd32107c-eval/drivers/drv_gpio.c
bsp/gd32107c-eval/drivers/drv_gpio.c
+10
-10
bsp/gd32303e-eval/drivers/drv_gpio.c
bsp/gd32303e-eval/drivers/drv_gpio.c
+10
-10
bsp/gd32350r-eval/drivers/drv_gpio.c
bsp/gd32350r-eval/drivers/drv_gpio.c
+10
-10
bsp/gd32e230k-start/drivers/drv_gpio.c
bsp/gd32e230k-start/drivers/drv_gpio.c
+10
-10
bsp/hc32/libraries/hc32_drivers/drv_can.c
bsp/hc32/libraries/hc32_drivers/drv_can.c
+1
-1
bsp/hc32/libraries/hc32_drivers/drv_pwm_tmra.c
bsp/hc32/libraries/hc32_drivers/drv_pwm_tmra.c
+1
-1
bsp/hc32/libraries/hc32_drivers/drv_spi.c
bsp/hc32/libraries/hc32_drivers/drv_spi.c
+1
-1
bsp/hpmicro/libraries/drivers/drv_gpio.c
bsp/hpmicro/libraries/drivers/drv_gpio.c
+1
-1
bsp/hpmicro/libraries/drivers/drv_rtc.c
bsp/hpmicro/libraries/drivers/drv_rtc.c
+1
-1
bsp/hpmicro/libraries/drivers/drv_spi.c
bsp/hpmicro/libraries/drivers/drv_spi.c
+1
-1
bsp/hpmicro/libraries/drivers/drv_usb.c
bsp/hpmicro/libraries/drivers/drv_usb.c
+1
-1
bsp/hpmicro/libraries/drivers/drv_wdt.c
bsp/hpmicro/libraries/drivers/drv_wdt.c
+1
-1
bsp/imxrt/libraries/drivers/drv_gpio.c
bsp/imxrt/libraries/drivers/drv_gpio.c
+1
-1
bsp/imxrt/libraries/drivers/drv_pwm.c
bsp/imxrt/libraries/drivers/drv_pwm.c
+2
-2
bsp/imxrt/libraries/drivers/drv_spi.c
bsp/imxrt/libraries/drivers/drv_spi.c
+1
-1
bsp/imxrt/libraries/drivers/drv_wdt.c
bsp/imxrt/libraries/drivers/drv_wdt.c
+2
-2
bsp/loongson/ls2kdev/drivers/drv_pwm.c
bsp/loongson/ls2kdev/drivers/drv_pwm.c
+1
-1
bsp/lpc55sxx/Libraries/drivers/drv_pwm.c
bsp/lpc55sxx/Libraries/drivers/drv_pwm.c
+1
-1
bsp/lpc55sxx/Libraries/drivers/drv_rtc.c
bsp/lpc55sxx/Libraries/drivers/drv_rtc.c
+1
-1
bsp/lpc55sxx/Libraries/drivers/drv_wdt.c
bsp/lpc55sxx/Libraries/drivers/drv_wdt.c
+1
-1
bsp/n32/libraries/n32_drivers/drv_adc.c
bsp/n32/libraries/n32_drivers/drv_adc.c
+2
-2
bsp/n32/libraries/n32_drivers/drv_wdt.c
bsp/n32/libraries/n32_drivers/drv_wdt.c
+1
-1
bsp/n32g452xx/Libraries/rt_drivers/drv_pwm.c
bsp/n32g452xx/Libraries/rt_drivers/drv_pwm.c
+1
-1
bsp/nrf5x/libraries/drivers/drv_gpio.c
bsp/nrf5x/libraries/drivers/drv_gpio.c
+3
-3
bsp/nrf5x/libraries/drivers/drv_gpio.h
bsp/nrf5x/libraries/drivers/drv_gpio.h
+2
-10
bsp/nrf5x/libraries/drivers/drv_pwm.c
bsp/nrf5x/libraries/drivers/drv_pwm.c
+1
-1
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_adc.c
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_adc.c
+2
-2
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_gpio.c
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_gpio.c
+2
-2
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_pwm.c
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_pwm.c
+6
-6
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_rtc.c
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_rtc.c
+1
-1
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_wdt.c
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_wdt.c
+1
-1
bsp/nuvoton/libraries/m031/rtt_port/drv_bpwm.c
bsp/nuvoton/libraries/m031/rtt_port/drv_bpwm.c
+1
-1
bsp/nuvoton/libraries/m031/rtt_port/drv_pdma.c
bsp/nuvoton/libraries/m031/rtt_port/drv_pdma.c
+7
-7
bsp/nuvoton/libraries/m031/rtt_port/drv_qspi.c
bsp/nuvoton/libraries/m031/rtt_port/drv_qspi.c
+1
-1
bsp/nuvoton/libraries/m031/rtt_port/drv_spi.c
bsp/nuvoton/libraries/m031/rtt_port/drv_spi.c
+1
-1
bsp/nuvoton/libraries/m031/rtt_port/drv_timer.c
bsp/nuvoton/libraries/m031/rtt_port/drv_timer.c
+1
-1
bsp/nuvoton/libraries/m031/rtt_port/drv_uart.c
bsp/nuvoton/libraries/m031/rtt_port/drv_uart.c
+3
-3
bsp/nuvoton/libraries/m031/rtt_port/drv_uspi.c
bsp/nuvoton/libraries/m031/rtt_port/drv_uspi.c
+1
-1
bsp/nuvoton/libraries/m031/rtt_port/drv_uuart.c
bsp/nuvoton/libraries/m031/rtt_port/drv_uuart.c
+3
-3
bsp/nuvoton/libraries/m031/rtt_port/drv_wdt.c
bsp/nuvoton/libraries/m031/rtt_port/drv_wdt.c
+3
-3
bsp/nuvoton/libraries/m2354/rtt_port/drv_bpwm.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_bpwm.c
+1
-1
bsp/nuvoton/libraries/m2354/rtt_port/drv_pdma.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_pdma.c
+7
-7
bsp/nuvoton/libraries/m2354/rtt_port/drv_qspi.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_qspi.c
+1
-1
bsp/nuvoton/libraries/m2354/rtt_port/drv_scuart.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_scuart.c
+3
-3
bsp/nuvoton/libraries/m2354/rtt_port/drv_spi.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_spi.c
+1
-1
bsp/nuvoton/libraries/m2354/rtt_port/drv_timer.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_timer.c
+1
-1
bsp/nuvoton/libraries/m2354/rtt_port/drv_uart.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_uart.c
+3
-3
bsp/nuvoton/libraries/m2354/rtt_port/drv_uspi.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_uspi.c
+1
-1
bsp/nuvoton/libraries/m2354/rtt_port/drv_uuart.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_uuart.c
+3
-3
bsp/nuvoton/libraries/m2354/rtt_port/drv_wdt.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_wdt.c
+3
-3
bsp/nuvoton/libraries/m460/rtt_port/drv_dac.c
bsp/nuvoton/libraries/m460/rtt_port/drv_dac.c
+1
-1
bsp/nuvoton/libraries/m460/rtt_port/drv_eadc.c
bsp/nuvoton/libraries/m460/rtt_port/drv_eadc.c
+1
-1
bsp/nuvoton/libraries/m460/rtt_port/drv_pdma.c
bsp/nuvoton/libraries/m460/rtt_port/drv_pdma.c
+8
-8
bsp/nuvoton/libraries/m460/rtt_port/drv_qspi.c
bsp/nuvoton/libraries/m460/rtt_port/drv_qspi.c
+1
-1
bsp/nuvoton/libraries/m460/rtt_port/drv_scuart.c
bsp/nuvoton/libraries/m460/rtt_port/drv_scuart.c
+3
-3
bsp/nuvoton/libraries/m460/rtt_port/drv_spi.c
bsp/nuvoton/libraries/m460/rtt_port/drv_spi.c
+1
-1
bsp/nuvoton/libraries/m460/rtt_port/drv_timer.c
bsp/nuvoton/libraries/m460/rtt_port/drv_timer.c
+2
-2
bsp/nuvoton/libraries/m460/rtt_port/drv_uart.c
bsp/nuvoton/libraries/m460/rtt_port/drv_uart.c
+3
-3
bsp/nuvoton/libraries/m460/rtt_port/drv_uspi.c
bsp/nuvoton/libraries/m460/rtt_port/drv_uspi.c
+1
-1
bsp/nuvoton/libraries/m460/rtt_port/drv_uuart.c
bsp/nuvoton/libraries/m460/rtt_port/drv_uuart.c
+3
-3
bsp/nuvoton/libraries/m460/rtt_port/drv_wdt.c
bsp/nuvoton/libraries/m460/rtt_port/drv_wdt.c
+3
-3
bsp/nuvoton/libraries/m480/rtt_port/drv_bpwm.c
bsp/nuvoton/libraries/m480/rtt_port/drv_bpwm.c
+1
-1
bsp/nuvoton/libraries/m480/rtt_port/drv_pdma.c
bsp/nuvoton/libraries/m480/rtt_port/drv_pdma.c
+7
-7
bsp/nuvoton/libraries/m480/rtt_port/drv_qspi.c
bsp/nuvoton/libraries/m480/rtt_port/drv_qspi.c
+1
-1
bsp/nuvoton/libraries/m480/rtt_port/drv_scuart.c
bsp/nuvoton/libraries/m480/rtt_port/drv_scuart.c
+3
-3
bsp/nuvoton/libraries/m480/rtt_port/drv_spi.c
bsp/nuvoton/libraries/m480/rtt_port/drv_spi.c
+1
-1
bsp/nuvoton/libraries/m480/rtt_port/drv_timer.c
bsp/nuvoton/libraries/m480/rtt_port/drv_timer.c
+1
-1
bsp/nuvoton/libraries/m480/rtt_port/drv_uart.c
bsp/nuvoton/libraries/m480/rtt_port/drv_uart.c
+3
-3
bsp/nuvoton/libraries/m480/rtt_port/drv_uspi.c
bsp/nuvoton/libraries/m480/rtt_port/drv_uspi.c
+1
-1
bsp/nuvoton/libraries/m480/rtt_port/drv_uuart.c
bsp/nuvoton/libraries/m480/rtt_port/drv_uuart.c
+3
-3
bsp/nuvoton/libraries/m480/rtt_port/drv_wdt.c
bsp/nuvoton/libraries/m480/rtt_port/drv_wdt.c
+3
-3
bsp/nuvoton/libraries/ma35/rtt_port/drv_adc.c
bsp/nuvoton/libraries/ma35/rtt_port/drv_adc.c
+2
-2
bsp/nuvoton/libraries/ma35/rtt_port/drv_pdma.c
bsp/nuvoton/libraries/ma35/rtt_port/drv_pdma.c
+8
-8
bsp/nuvoton/libraries/ma35/rtt_port/drv_qspi.c
bsp/nuvoton/libraries/ma35/rtt_port/drv_qspi.c
+1
-1
bsp/nuvoton/libraries/ma35/rtt_port/drv_scuart.c
bsp/nuvoton/libraries/ma35/rtt_port/drv_scuart.c
+3
-3
bsp/nuvoton/libraries/ma35/rtt_port/drv_spi.c
bsp/nuvoton/libraries/ma35/rtt_port/drv_spi.c
+1
-1
bsp/nuvoton/libraries/ma35/rtt_port/drv_timer.c
bsp/nuvoton/libraries/ma35/rtt_port/drv_timer.c
+2
-2
bsp/nuvoton/libraries/ma35/rtt_port/drv_uart.c
bsp/nuvoton/libraries/ma35/rtt_port/drv_uart.c
+3
-3
bsp/nuvoton/libraries/ma35/rtt_port/drv_wdt.c
bsp/nuvoton/libraries/ma35/rtt_port/drv_wdt.c
+4
-4
bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc.c
bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc.c
+2
-2
bsp/nuvoton/libraries/n9h30/rtt_port/drv_etimer.c
bsp/nuvoton/libraries/n9h30/rtt_port/drv_etimer.c
+2
-2
bsp/nuvoton/libraries/n9h30/rtt_port/drv_pwm.c
bsp/nuvoton/libraries/n9h30/rtt_port/drv_pwm.c
+1
-1
bsp/nuvoton/libraries/n9h30/rtt_port/drv_qspi.c
bsp/nuvoton/libraries/n9h30/rtt_port/drv_qspi.c
+1
-1
bsp/nuvoton/libraries/n9h30/rtt_port/drv_scuart.c
bsp/nuvoton/libraries/n9h30/rtt_port/drv_scuart.c
+3
-3
bsp/nuvoton/libraries/n9h30/rtt_port/drv_timer.c
bsp/nuvoton/libraries/n9h30/rtt_port/drv_timer.c
+2
-2
bsp/nuvoton/libraries/n9h30/rtt_port/drv_uart.c
bsp/nuvoton/libraries/n9h30/rtt_port/drv_uart.c
+3
-3
bsp/nuvoton/libraries/n9h30/rtt_port/drv_wdt.c
bsp/nuvoton/libraries/n9h30/rtt_port/drv_wdt.c
+3
-3
bsp/nuvoton/libraries/nu_packages/SPINAND/spinand.c
bsp/nuvoton/libraries/nu_packages/SPINAND/spinand.c
+1
-1
bsp/nuvoton/libraries/nuc980/rtt_port/drv_adc.c
bsp/nuvoton/libraries/nuc980/rtt_port/drv_adc.c
+2
-2
bsp/nuvoton/libraries/nuc980/rtt_port/drv_etimer.c
bsp/nuvoton/libraries/nuc980/rtt_port/drv_etimer.c
+2
-2
bsp/nuvoton/libraries/nuc980/rtt_port/drv_pdma.c
bsp/nuvoton/libraries/nuc980/rtt_port/drv_pdma.c
+8
-8
bsp/nuvoton/libraries/nuc980/rtt_port/drv_pwm.c
bsp/nuvoton/libraries/nuc980/rtt_port/drv_pwm.c
+1
-1
bsp/nuvoton/libraries/nuc980/rtt_port/drv_qspi.c
bsp/nuvoton/libraries/nuc980/rtt_port/drv_qspi.c
+1
-1
bsp/nuvoton/libraries/nuc980/rtt_port/drv_scuart.c
bsp/nuvoton/libraries/nuc980/rtt_port/drv_scuart.c
+3
-3
bsp/nuvoton/libraries/nuc980/rtt_port/drv_spi.c
bsp/nuvoton/libraries/nuc980/rtt_port/drv_spi.c
+1
-1
bsp/nuvoton/libraries/nuc980/rtt_port/drv_uart.c
bsp/nuvoton/libraries/nuc980/rtt_port/drv_uart.c
+3
-3
bsp/nuvoton/libraries/nuc980/rtt_port/drv_wdt.c
bsp/nuvoton/libraries/nuc980/rtt_port/drv_wdt.c
+3
-3
bsp/qemu-virt64-aarch64/drivers/drv_rtc.c
bsp/qemu-virt64-aarch64/drivers/drv_rtc.c
+1
-1
bsp/raspberry-pi/raspi3-32/driver/drv_rtc.c
bsp/raspberry-pi/raspi3-32/driver/drv_rtc.c
+1
-1
bsp/raspberry-pi/raspi3-64/driver/drv_rtc.c
bsp/raspberry-pi/raspi3-64/driver/drv_rtc.c
+1
-1
bsp/rockchip/common/drivers/drv_gpio.c
bsp/rockchip/common/drivers/drv_gpio.c
+1
-1
bsp/synwit/swm320/drivers/drv_gpio.c
bsp/synwit/swm320/drivers/drv_gpio.c
+1
-1
bsp/synwit/swm320/drivers/drv_pwm.c
bsp/synwit/swm320/drivers/drv_pwm.c
+1
-1
bsp/synwit/swm320/drivers/drv_spi.c
bsp/synwit/swm320/drivers/drv_spi.c
+1
-1
bsp/synwit/swm341/drivers/drv_gpio.c
bsp/synwit/swm341/drivers/drv_gpio.c
+1
-1
bsp/synwit/swm341/drivers/drv_pwm.c
bsp/synwit/swm341/drivers/drv_pwm.c
+1
-1
bsp/synwit/swm341/drivers/drv_spi.c
bsp/synwit/swm341/drivers/drv_spi.c
+1
-1
bsp/ti/c28x/libraries/HAL_Drivers/drv_pwm.c
bsp/ti/c28x/libraries/HAL_Drivers/drv_pwm.c
+1
-1
bsp/tm4c123bsp/libraries/Drivers/drv_pwm.c
bsp/tm4c123bsp/libraries/Drivers/drv_pwm.c
+1
-1
bsp/w60x/drivers/drv_pwm.c
bsp/w60x/drivers/drv_pwm.c
+2
-2
bsp/w60x/drivers/drv_rtc.c
bsp/w60x/drivers/drv_rtc.c
+1
-1
bsp/w60x/drivers/drv_wifi.c
bsp/w60x/drivers/drv_wifi.c
+1
-1
bsp/wch/arm/Libraries/ch32_drivers/drv_gpio_ch32f10x.c
bsp/wch/arm/Libraries/ch32_drivers/drv_gpio_ch32f10x.c
+2
-2
bsp/wch/arm/Libraries/ch32_drivers/drv_gpio_ch32f20x.c
bsp/wch/arm/Libraries/ch32_drivers/drv_gpio_ch32f20x.c
+2
-2
bsp/wch/arm/Libraries/ch32_drivers/drv_hwtimer_ch32f10x.c
bsp/wch/arm/Libraries/ch32_drivers/drv_hwtimer_ch32f10x.c
+1
-1
bsp/wch/arm/Libraries/ch32_drivers/drv_hwtimer_ch32f20x.c
bsp/wch/arm/Libraries/ch32_drivers/drv_hwtimer_ch32f20x.c
+1
-1
bsp/wch/arm/Libraries/ch32_drivers/drv_pwm_ch32f10x.c
bsp/wch/arm/Libraries/ch32_drivers/drv_pwm_ch32f10x.c
+5
-5
bsp/wch/arm/Libraries/ch32_drivers/drv_pwm_ch32f20x.c
bsp/wch/arm/Libraries/ch32_drivers/drv_pwm_ch32f20x.c
+5
-5
bsp/yichip/yc3121-pos/drivers/drv_gpio.c
bsp/yichip/yc3121-pos/drivers/drv_gpio.c
+1
-1
components/drivers/wlan/wlan_mgnt.c
components/drivers/wlan/wlan_mgnt.c
+2
-2
components/lwp/lwp_signal.c
components/lwp/lwp_signal.c
+1
-1
components/utilities/rt-link/src/rtlink_dev.c
components/utilities/rt-link/src/rtlink_dev.c
+1
-1
未找到文件。
bsp/Infineon/libraries/HAL_Drivers/drv_pwm.c
浏览文件 @
dfddd79b
...
...
@@ -153,7 +153,7 @@ static rt_err_t drv_pwm_control(struct rt_device_pwm *device, int cmd, void *arg
return
drv_pwm_get
(
htim
,
configuration
);
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
}
...
...
bsp/airm2m/air105/libraries/rt_drivers/drv_spi.c
浏览文件 @
dfddd79b
...
...
@@ -96,7 +96,7 @@ static rt_err_t spi_configure(struct rt_spi_device *device,
RT_ASSERT
(
configuration
!=
RT_NULL
);
rt_uint32_t
spi_id
=
device
->
bus
->
parent
.
user_data
;
rt_uint8_t
mode
=
configuration
->
mode
&
(
RT_SPI_CPHA
|
RT_SPI_CPOL
);
if
(
configuration
->
mode
&
RT_SPI_SLAVE
)
return
RT_EINVAL
;
if
(
configuration
->
mode
&
RT_SPI_SLAVE
)
return
-
RT_EINVAL
;
switch
(
spi_id
)
{
case
0
:
...
...
bsp/airm2m/air32f103/libraries/rt_drivers/drv_hwtimer.c
浏览文件 @
dfddd79b
...
...
@@ -171,7 +171,7 @@ static rt_err_t air32_hwtimer_control(struct rt_hwtimer_device *device, rt_uint3
}
else
{
result
=
RT_EINVAL
;
result
=
-
RT_EINVAL
;
}
}
break
;
...
...
bsp/allwinner_tina/drivers/drv_clock.c
浏览文件 @
dfddd79b
...
...
@@ -211,7 +211,7 @@ rt_err_t cpu_set_pll_clk(int clk)
int
p
=
0
,
k
=
1
,
m
=
1
,
n
=
0
;
if
(
clk
==
0
)
return
RT_EINVAL
;
return
-
RT_EINVAL
;
if
(
clk
>
1152000000
)
{
...
...
@@ -244,7 +244,7 @@ rt_err_t audio_set_pll_clk(int clk)
int
m_temp
=
_24MHZ_
*
2
;
if
((
clk
>
200000000
)
||
(
clk
<
20000000
))
return
RT_EINVAL
;
return
-
RT_EINVAL
;
if
(
clk
==
0
)
{
...
...
@@ -288,7 +288,7 @@ rt_err_t video_set_pll_clk(int clk)
int
m_temp
=
_24MHZ_
;
if
((
clk
>
600000000
)
||
(
clk
<
30000000
))
return
RT_EINVAL
;
return
-
RT_EINVAL
;
if
(
clk
==
0
)
{
...
...
@@ -333,7 +333,7 @@ rt_err_t ve_set_pll_clk(int clk)
int
m_temp
=
_24MHZ_
;
if
((
clk
>
600000000
)
||
(
clk
<
30000000
))
return
RT_EINVAL
;
return
-
RT_EINVAL
;
if
(
clk
==
0
)
{
...
...
@@ -377,7 +377,7 @@ rt_err_t periph_set_pll_clk(int clk)
int
n
=
0
,
k
=
0
;
if
((
clk
>
1800000000
)
||
(
clk
<
200000000
)
||
(
clk
==
0
)
||
(
clk
%
_24MHZ_
!=
0
))
return
RT_EINVAL
;
return
-
RT_EINVAL
;
n
=
clk
/
_24MHZ_
;
...
...
@@ -413,7 +413,7 @@ rt_err_t periph_set_pll_clk(int clk)
rt_err_t
cpu_set_clk
(
int
clk
)
{
if
(
clk
<
_24MHZ_
)
return
RT_EINVAL
;
return
-
RT_EINVAL
;
if
(
clk
==
cpu_get_clk
())
return
RT_EOK
;
...
...
@@ -446,7 +446,7 @@ rt_err_t bus_gate_clk_enalbe(enum bus_gate bus)
else
if
(
gate_reg
==
0x02
)
CCU
->
bus_clk_gating2
|=
(
0x1
<<
offset
);
else
return
RT_EINVAL
;
return
-
RT_EINVAL
;
return
RT_EOK
;
}
...
...
@@ -466,7 +466,7 @@ rt_err_t bus_gate_clk_disalbe(enum bus_gate bus)
else
if
(
gate_reg
==
0x02
)
CCU
->
bus_clk_gating2
&=
~
(
0x1
<<
offset
);
else
return
RT_EINVAL
;
return
-
RT_EINVAL
;
return
RT_EOK
;
}
...
...
@@ -486,7 +486,7 @@ rt_err_t bus_software_reset_disalbe(enum bus_gate bus)
else
if
(
gate_reg
==
0x02
)
CCU
->
bus_soft_rst2
|=
(
0x1
<<
offset
);
else
return
RT_EINVAL
;
return
-
RT_EINVAL
;
return
RT_EOK
;
}
...
...
@@ -506,7 +506,7 @@ rt_err_t bus_software_reset_enalbe(enum bus_gate bus)
else
if
(
gate_reg
==
0x02
)
CCU
->
bus_soft_rst2
&=
~
(
0x1
<<
offset
);
else
return
RT_EINVAL
;
return
-
RT_EINVAL
;
return
RT_EOK
;
}
...
...
@@ -519,7 +519,7 @@ rt_err_t mmc_set_clk(enum mmc_clk_id clk_id, int hz)
if
(
hz
<
0
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
if
(
hz
==
0
)
...
...
bsp/allwinner_tina/drivers/drv_gpio.c
浏览文件 @
dfddd79b
...
...
@@ -25,7 +25,7 @@
/*********************************************************
** IO
*********************************************************/
in
t
gpio_set_func
(
enum
gpio_port
port
,
enum
gpio_pin
pin
,
rt_uint8_t
func
)
rt_err_
t
gpio_set_func
(
enum
gpio_port
port
,
enum
gpio_pin
pin
,
rt_uint8_t
func
)
{
rt_uint32_t
addr
;
rt_uint32_t
offset
;
...
...
@@ -37,7 +37,7 @@ int gpio_set_func(enum gpio_port port, enum gpio_pin pin, rt_uint8_t func)
if
(
func
&
0x8
)
{
LOG_W
(
"[line]:%d There is a warning with parameter input"
,
__LINE__
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
addr
=
GPIOn_CFG_ADDR
(
port
)
+
(
pin
/
8
)
*
4
;
...
...
@@ -64,7 +64,7 @@ int gpio_set_value(enum gpio_port port, enum gpio_pin pin, rt_uint8_t value)
if
(
value
&
0xE
)
{
LOG_W
(
"[line]:%d There is a warning with parameter input"
,
__LINE__
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
addr
=
GPIOn_DATA_ADDR
(
port
);
...
...
@@ -109,7 +109,7 @@ int gpio_set_pull_mode(enum gpio_port port, enum gpio_pin pin, enum gpio_pull p
if
(
pull
&
0xC
)
{
LOG_W
(
"[line]:%d There is a warning with parameter input"
,
__LINE__
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
addr
=
GPIOn_PUL_ADDR
(
port
);
...
...
@@ -137,7 +137,7 @@ int gpio_set_drive_level(enum gpio_port port, enum gpio_pin pin, enum gpio_drv_l
if
(
level
&
0xC
)
{
LOG_W
(
"[line]:%d There is a warning with parameter input"
,
__LINE__
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
addr
=
GPIOn_DRV_ADDR
(
port
);
...
...
bsp/allwinner_tina/drivers/drv_gpio.h
浏览文件 @
dfddd79b
...
...
@@ -212,7 +212,7 @@ typedef struct tina_gpio *tina_gpio_t;
#define GPIO ((tina_gpio_t)GPIO_BASE_ADDR)
in
t
gpio_set_func
(
enum
gpio_port
port
,
enum
gpio_pin
pin
,
rt_uint8_t
func
);
rt_err_
t
gpio_set_func
(
enum
gpio_port
port
,
enum
gpio_pin
pin
,
rt_uint8_t
func
);
int
gpio_set_value
(
enum
gpio_port
port
,
enum
gpio_pin
pin
,
rt_uint8_t
value
);
int
gpio_get_value
(
enum
gpio_port
port
,
enum
gpio_pin
pin
);
int
gpio_set_pull_mode
(
enum
gpio_port
port
,
enum
gpio_pin
pin
,
enum
gpio_pull
pull
);
...
...
bsp/apm32/libraries/Drivers/drv_pwm.c
浏览文件 @
dfddd79b
...
...
@@ -583,7 +583,7 @@ static rt_err_t drv_pwm_control(struct rt_device_pwm *device, int cmd, void *arg
case
PWM_CMD_GET
:
return
drv_pwm_get
(
tmr
,
configuration
);
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
}
...
...
bsp/at32/libraries/rt_drivers/drv_pwm.c
浏览文件 @
dfddd79b
...
...
@@ -423,7 +423,7 @@ static rt_err_t drv_pwm_control(struct rt_device_pwm *device, int cmd, void *arg
case
PWM_CMD_GET
:
return
drv_pwm_get
(
tmr_x
,
configuration
);
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
}
...
...
bsp/essemi/es32f0654/drivers/drv_hwtimer.c
浏览文件 @
dfddd79b
...
...
@@ -305,7 +305,7 @@ static rt_err_t es32f0_hwtimer_control(rt_hwtimer_t *timer,
break
;
default:
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/essemi/es32f0654/drivers/drv_pwm.c
浏览文件 @
dfddd79b
...
...
@@ -80,7 +80,7 @@ static rt_err_t es32f0_pwm_control(struct rt_device_pwm *device, int cmd, void *
_ccep_ch_en
=
timer_initstruct
->
perh
->
CCEP
&
TIMER_CCEP_CC4EN_MSK
;
}
else
return
RT_EINVAL
;
return
-
RT_EINVAL
;
switch
(
cmd
)
{
...
...
bsp/essemi/es32f369x/drivers/drv_hwtimer.c
浏览文件 @
dfddd79b
...
...
@@ -301,7 +301,7 @@ static rt_err_t es32f3_hwtimer_control(rt_hwtimer_t *timer,
break
;
default:
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/essemi/es32f369x/drivers/drv_pwm.c
浏览文件 @
dfddd79b
...
...
@@ -81,7 +81,7 @@ static rt_err_t es32f3_pwm_control(struct rt_device_pwm *device, int cmd, void *
_ccep_ch_en
=
timer_initstruct
->
perh
->
CCEP
&
TIMER_CCEP_CC4EN_MSK
;
}
else
return
RT_EINVAL
;
return
-
RT_EINVAL
;
switch
(
cmd
)
{
...
...
bsp/ft2004/drivers/drv_sdctrl.c
浏览文件 @
dfddd79b
...
...
@@ -243,7 +243,7 @@ static void rthw_sdctrl_request(struct rt_mmcsd_host *host, struct rt_mmcsd_req
if
(
pkg
.
cmd
->
cmd_code
==
5
||
pkg
.
cmd
->
cmd_code
==
1
)
{
rt_kprintf
(
"cmd_code is not vaild %x
\r\n
"
,
pkg
.
cmd
->
cmd_code
);
pkg
.
cmd
->
err
=
RT_EINVAL
;
pkg
.
cmd
->
err
=
-
RT_EINVAL
;
goto
_exit
;
}
...
...
bsp/gd32105c-eval/drivers/drv_gpio.c
浏览文件 @
dfddd79b
...
...
@@ -325,12 +325,12 @@ static rt_err_t _pin_attach_irq(struct rt_device *device, rt_int32_t pin,
index
=
get_pin
(
pin
);
if
(
index
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
hdr_index
=
bit2bitno
(
index
->
pin
);
if
(
hdr_index
<
0
||
hdr_index
>=
ITEM_NUM
(
pin_irq_map
))
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
level
=
rt_hw_interrupt_disable
();
...
...
@@ -364,12 +364,12 @@ static rt_err_t _pin_detach_irq(struct rt_device *device, rt_int32_t pin)
index
=
get_pin
(
pin
);
if
(
index
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
hdr_index
=
bit2bitno
(
index
->
pin
);
if
(
hdr_index
<
0
||
hdr_index
>=
ITEM_NUM
(
pin_irq_map
))
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
level
=
rt_hw_interrupt_disable
();
...
...
@@ -397,20 +397,20 @@ static rt_err_t _pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint
index
=
get_pin
(
pin
);
if
(
index
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
if
(
enabled
==
PIN_IRQ_ENABLE
)
{
hdr_index
=
bit2bitno
(
index
->
pin
);
if
(
hdr_index
<
0
||
hdr_index
>=
ITEM_NUM
(
pin_irq_map
))
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
level
=
rt_hw_interrupt_disable
();
if
(
pin_irq_hdr_tab
[
hdr_index
].
pin
==
-
1
)
{
rt_hw_interrupt_enable
(
level
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
irqmap
=
&
pin_irq_map
[
hdr_index
];
...
...
@@ -427,7 +427,7 @@ static rt_err_t _pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint
break
;
default:
rt_hw_interrupt_enable
(
level
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
rcu_periph_clock_enable
(
RCU_AF
);
...
...
@@ -449,13 +449,13 @@ static rt_err_t _pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint
irqmap
=
get_pin_irq_map
(
index
->
pin
);
if
(
irqmap
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
nvic_irq_disable
(
irqmap
->
irqno
);
}
else
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
return
RT_EOK
;
...
...
bsp/gd32107c-eval/drivers/drv_gpio.c
浏览文件 @
dfddd79b
...
...
@@ -325,12 +325,12 @@ static rt_err_t _pin_attach_irq(struct rt_device *device, rt_int32_t pin,
index
=
get_pin
(
pin
);
if
(
index
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
hdr_index
=
bit2bitno
(
index
->
pin
);
if
(
hdr_index
<
0
||
hdr_index
>=
ITEM_NUM
(
pin_irq_map
))
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
level
=
rt_hw_interrupt_disable
();
...
...
@@ -364,12 +364,12 @@ static rt_err_t _pin_detach_irq(struct rt_device *device, rt_int32_t pin)
index
=
get_pin
(
pin
);
if
(
index
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
hdr_index
=
bit2bitno
(
index
->
pin
);
if
(
hdr_index
<
0
||
hdr_index
>=
ITEM_NUM
(
pin_irq_map
))
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
level
=
rt_hw_interrupt_disable
();
...
...
@@ -397,20 +397,20 @@ static rt_err_t _pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint
index
=
get_pin
(
pin
);
if
(
index
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
if
(
enabled
==
PIN_IRQ_ENABLE
)
{
hdr_index
=
bit2bitno
(
index
->
pin
);
if
(
hdr_index
<
0
||
hdr_index
>=
ITEM_NUM
(
pin_irq_map
))
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
level
=
rt_hw_interrupt_disable
();
if
(
pin_irq_hdr_tab
[
hdr_index
].
pin
==
-
1
)
{
rt_hw_interrupt_enable
(
level
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
irqmap
=
&
pin_irq_map
[
hdr_index
];
...
...
@@ -427,7 +427,7 @@ static rt_err_t _pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint
break
;
default:
rt_hw_interrupt_enable
(
level
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
rcu_periph_clock_enable
(
RCU_AF
);
...
...
@@ -449,13 +449,13 @@ static rt_err_t _pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint
irqmap
=
get_pin_irq_map
(
index
->
pin
);
if
(
irqmap
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
nvic_irq_disable
(
irqmap
->
irqno
);
}
else
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
return
RT_EOK
;
...
...
bsp/gd32303e-eval/drivers/drv_gpio.c
浏览文件 @
dfddd79b
...
...
@@ -350,12 +350,12 @@ rt_err_t gd32_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
index
=
get_pin
(
pin
);
if
(
index
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
hdr_index
=
bit2bitno
(
index
->
pin
);
if
(
hdr_index
<
0
||
hdr_index
>=
ITEM_NUM
(
pin_irq_map
))
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
level
=
rt_hw_interrupt_disable
();
...
...
@@ -389,12 +389,12 @@ rt_err_t gd32_pin_detach_irq(struct rt_device *device, rt_int32_t pin)
index
=
get_pin
(
pin
);
if
(
index
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
hdr_index
=
bit2bitno
(
index
->
pin
);
if
(
hdr_index
<
0
||
hdr_index
>=
ITEM_NUM
(
pin_irq_map
))
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
level
=
rt_hw_interrupt_disable
();
...
...
@@ -422,20 +422,20 @@ rt_err_t gd32_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint32_
index
=
get_pin
(
pin
);
if
(
index
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
if
(
enabled
==
PIN_IRQ_ENABLE
)
{
hdr_index
=
bit2bitno
(
index
->
pin
);
if
(
hdr_index
<
0
||
hdr_index
>=
ITEM_NUM
(
pin_irq_map
))
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
level
=
rt_hw_interrupt_disable
();
if
(
pin_irq_hdr_tab
[
hdr_index
].
pin
==
-
1
)
{
rt_hw_interrupt_enable
(
level
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
irqmap
=
&
pin_irq_map
[
hdr_index
];
...
...
@@ -452,7 +452,7 @@ rt_err_t gd32_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint32_
break
;
default:
rt_hw_interrupt_enable
(
level
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
rcu_periph_clock_enable
(
RCU_AF
);
...
...
@@ -474,13 +474,13 @@ rt_err_t gd32_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint32_
irqmap
=
get_pin_irq_map
(
index
->
pin
);
if
(
irqmap
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
nvic_irq_disable
(
irqmap
->
irqno
);
}
else
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
return
RT_EOK
;
...
...
bsp/gd32350r-eval/drivers/drv_gpio.c
浏览文件 @
dfddd79b
...
...
@@ -272,13 +272,13 @@ rt_err_t gd32_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
index
=
get_pin
(
pin
);
if
(
index
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
hdr_index
=
bit2bitno
(
index
->
pin
);
if
(
hdr_index
<
0
||
hdr_index
>=
ITEM_NUM
(
pin_irq_map
))
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
level
=
rt_hw_interrupt_disable
();
...
...
@@ -313,13 +313,13 @@ rt_err_t gd32_pin_detach_irq(struct rt_device *device, rt_int32_t pin)
index
=
get_pin
(
pin
);
if
(
index
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
hdr_index
=
bit2bitno
(
index
->
pin
);
if
(
hdr_index
<
0
||
hdr_index
>=
ITEM_NUM
(
pin_irq_map
))
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
level
=
rt_hw_interrupt_disable
();
...
...
@@ -348,7 +348,7 @@ rt_err_t gd32_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint32_
index
=
get_pin
(
pin
);
if
(
index
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
if
(
enabled
==
PIN_IRQ_ENABLE
)
...
...
@@ -356,14 +356,14 @@ rt_err_t gd32_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint32_
hdr_index
=
bit2bitno
(
index
->
pin
);
if
(
hdr_index
<
0
||
hdr_index
>=
ITEM_NUM
(
pin_irq_map
))
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
level
=
rt_hw_interrupt_disable
();
if
(
pin_irq_hdr_tab
[
hdr_index
].
pin
==
-
1
)
{
rt_hw_interrupt_enable
(
level
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
irqmap
=
&
pin_irq_map
[
hdr_index
];
...
...
@@ -381,7 +381,7 @@ rt_err_t gd32_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint32_
break
;
default:
rt_hw_interrupt_enable
(
level
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
rcu_periph_clock_enable
(
RCU_CFGCMP
);
...
...
@@ -403,13 +403,13 @@ rt_err_t gd32_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint32_
irqmap
=
get_pin_irq_map
(
index
->
pin
);
if
(
irqmap
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
nvic_irq_disable
(
irqmap
->
irqno
);
}
else
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
return
RT_EOK
;
...
...
bsp/gd32e230k-start/drivers/drv_gpio.c
浏览文件 @
dfddd79b
...
...
@@ -245,12 +245,12 @@ rt_err_t gd32_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
index
=
get_pin
(
pin
);
if
(
index
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
hdr_index
=
bit2bitno
(
index
->
pin
);
if
(
hdr_index
<
0
||
hdr_index
>=
ITEM_NUM
(
pin_irq_map
))
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
level
=
rt_hw_interrupt_disable
();
...
...
@@ -284,12 +284,12 @@ rt_err_t gd32_pin_detach_irq(struct rt_device *device, rt_int32_t pin)
index
=
get_pin
(
pin
);
if
(
index
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
hdr_index
=
bit2bitno
(
index
->
pin
);
if
(
hdr_index
<
0
||
hdr_index
>=
ITEM_NUM
(
pin_irq_map
))
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
level
=
rt_hw_interrupt_disable
();
...
...
@@ -317,20 +317,20 @@ rt_err_t gd32_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint32_
index
=
get_pin
(
pin
);
if
(
index
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
if
(
enabled
==
PIN_IRQ_ENABLE
)
{
hdr_index
=
bit2bitno
(
index
->
pin
);
if
(
hdr_index
<
0
||
hdr_index
>=
ITEM_NUM
(
pin_irq_map
))
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
level
=
rt_hw_interrupt_disable
();
if
(
pin_irq_hdr_tab
[
hdr_index
].
pin
==
-
1
)
{
rt_hw_interrupt_enable
(
level
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
irqmap
=
&
pin_irq_map
[
hdr_index
];
...
...
@@ -347,7 +347,7 @@ rt_err_t gd32_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint32_
break
;
default:
rt_hw_interrupt_enable
(
level
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
//rcu_periph_clock_enable(RCU_AF);
...
...
@@ -369,13 +369,13 @@ rt_err_t gd32_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint32_
irqmap
=
get_pin_irq_map
(
index
->
pin
);
if
(
irqmap
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
nvic_irq_disable
(
irqmap
->
irqno
);
}
else
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
return
RT_EOK
;
...
...
bsp/hc32/libraries/hc32_drivers/drv_can.c
浏览文件 @
dfddd79b
...
...
@@ -160,7 +160,7 @@ static rt_err_t _can_config(struct rt_can_device *can, struct can_configure *cfg
int32_t
ret
=
CAN_Init
(
p_can_dev
->
instance
,
&
p_can_dev
->
ll_init
);
if
(
ret
!=
LL_OK
)
{
rt_ret
=
RT_EINVAL
;
rt_ret
=
-
RT_EINVAL
;
}
return
rt_ret
;
...
...
bsp/hc32/libraries/hc32_drivers/drv_pwm_tmra.c
浏览文件 @
dfddd79b
...
...
@@ -209,7 +209,7 @@ static rt_err_t drv_pwm_control(struct rt_device_pwm *device, int cmd, void *arg
case
PWM_CMD_GET
:
return
drv_pwm_get
(
TMRAx
,
configuration
);
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
}
...
...
bsp/hc32/libraries/hc32_drivers/drv_spi.c
浏览文件 @
dfddd79b
...
...
@@ -156,7 +156,7 @@ static rt_err_t hc32_spi_init(struct hc32_spi *spi_drv, struct rt_spi_configurat
/* SI/SO pin shared */
if
(
cfg
->
mode
&
RT_SPI_3WIRE
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
else
{
...
...
bsp/hpmicro/libraries/drivers/drv_gpio.c
浏览文件 @
dfddd79b
...
...
@@ -297,7 +297,7 @@ static rt_err_t hpm_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_u
}
else
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
return
RT_EOK
;
...
...
bsp/hpmicro/libraries/drivers/drv_rtc.c
浏览文件 @
dfddd79b
...
...
@@ -86,7 +86,7 @@ static rt_err_t hpm_rtc_control(rt_device_t dev, int cmd, void *args)
hpm_rtc_set_timestamp
(
*
(
time_t
*
)
args
);
break
;
default:
err
=
RT_EINVAL
;
err
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/hpmicro/libraries/drivers/drv_spi.c
浏览文件 @
dfddd79b
...
...
@@ -73,7 +73,7 @@ static rt_err_t hpm_spi_configure(struct rt_spi_device *device, struct rt_spi_co
if
(
cfg
->
data_width
!=
8
&&
cfg
->
data_width
!=
16
&&
cfg
->
data_width
!=
32
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
spi_master_get_default_timing_config
(
&
timing_config
);
...
...
bsp/hpmicro/libraries/drivers/drv_usb.c
浏览文件 @
dfddd79b
...
...
@@ -93,7 +93,7 @@ rt_err_t hpm_usb_control(rt_device_t dev, int cmd, void *args)
break
;
default:
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/hpmicro/libraries/drivers/drv_wdt.c
浏览文件 @
dfddd79b
...
...
@@ -207,7 +207,7 @@ static rt_err_t hpm_wdog_control(rt_watchdog_t *wdt, int cmd, void *args)
hpm_wdog_close
(
wdt
);
break
;
default:
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/imxrt/libraries/drivers/drv_gpio.c
浏览文件 @
dfddd79b
...
...
@@ -774,7 +774,7 @@ static rt_err_t imxrt_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt
}
else
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
return
RT_EOK
;
...
...
bsp/imxrt/libraries/drivers/drv_pwm.c
浏览文件 @
dfddd79b
...
...
@@ -144,7 +144,7 @@ static rt_err_t imxrt_drv_pwm_control(struct rt_device_pwm *device, int cmd, voi
case
PWM_CMD_GET
:
return
imxrt_drv_pwm_get
(
device
,
configuration
);
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
}
...
...
@@ -422,7 +422,7 @@ static rt_err_t imxrt_drv_qtmr_control(struct rt_device_pwm *device, int cmd, vo
case
PWM_CMD_GET
:
return
imxrt_drv_qtmr_get
(
device
,
configuration
);
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
}
...
...
bsp/imxrt/libraries/drivers/drv_spi.c
浏览文件 @
dfddd79b
...
...
@@ -279,7 +279,7 @@ static rt_err_t spi_configure(struct rt_spi_device *device, struct rt_spi_config
if
(
cfg
->
data_width
!=
8
&&
cfg
->
data_width
!=
16
&&
cfg
->
data_width
!=
32
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
LPSPI_MasterGetDefaultConfig
(
&
masterConfig
);
...
...
bsp/imxrt/libraries/drivers/drv_wdt.c
浏览文件 @
dfddd79b
...
...
@@ -139,7 +139,7 @@ static rt_err_t imxrt_hp_wdog3_control(rt_watchdog_t *wdt, int cmd, void *args)
}
break
;
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
return
RT_EOK
;
...
...
@@ -274,7 +274,7 @@ static rt_err_t imxrt_hp_wdog_control(rt_watchdog_t *wdt, int cmd, void *args)
}
break
;
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
return
RT_EOK
;
...
...
bsp/loongson/ls2kdev/drivers/drv_pwm.c
浏览文件 @
dfddd79b
...
...
@@ -107,7 +107,7 @@ static rt_err_t loongson_pwm_ioctl(struct rt_device_pwm *device, int cmd, void *
rc
=
RT_ENOSYS
;
break
;
default:
rc
=
RT_EINVAL
;
rc
=
-
RT_EINVAL
;
break
;
}
return
rc
;
...
...
bsp/lpc55sxx/Libraries/drivers/drv_pwm.c
浏览文件 @
dfddd79b
...
...
@@ -239,7 +239,7 @@ static rt_err_t lpc_drv_pwm_control(struct rt_device_pwm *device, int cmd, void
case
PWM_CMD_GET
:
return
lpc_drv_pwm_get
(
device
,
configuration
);
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
}
...
...
bsp/lpc55sxx/Libraries/drivers/drv_rtc.c
浏览文件 @
dfddd79b
...
...
@@ -116,7 +116,7 @@ static rt_err_t lpc_rtc_control(rt_device_t dev, int cmd, void *args)
break
;
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
return
RT_EOK
;
...
...
bsp/lpc55sxx/Libraries/drivers/drv_wdt.c
浏览文件 @
dfddd79b
...
...
@@ -204,7 +204,7 @@ static rt_err_t lpc_wwdt_control(rt_watchdog_t *wdt, int cmd, void *args)
}
break
;
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
return
RT_EOK
;
...
...
bsp/n32/libraries/n32_drivers/drv_adc.c
浏览文件 @
dfddd79b
...
...
@@ -92,7 +92,7 @@ static rt_err_t n32_adc_enabled(struct rt_adc_device *device, rt_uint32_t channe
{
if
(
channel
>
ADC_CH_18
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
return
RT_EOK
;
}
...
...
@@ -104,7 +104,7 @@ static rt_err_t n32_adc_convert(struct rt_adc_device *device, rt_uint32_t channe
if
(
channel
>
ADC_CH_18
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
config
=
(
struct
n32_adc_config
*
)(
device
->
parent
.
user_data
);
...
...
bsp/n32/libraries/n32_drivers/drv_wdt.c
浏览文件 @
dfddd79b
...
...
@@ -151,7 +151,7 @@ static rt_err_t n32_wdt_control(rt_watchdog_t *wdt, int cmd, void *args)
break
;
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
return
RT_EOK
;
...
...
bsp/n32g452xx/Libraries/rt_drivers/drv_pwm.c
浏览文件 @
dfddd79b
...
...
@@ -314,7 +314,7 @@ static rt_err_t drv_pwm_control(struct rt_device_pwm *device, int cmd, void *arg
case
PWM_CMD_GET
:
return
drv_pwm_get
(
pwm_dev
,
configuration
);
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
}
...
...
bsp/nrf5x/libraries/drivers/drv_gpio.c
浏览文件 @
dfddd79b
...
...
@@ -356,7 +356,7 @@ const static struct rt_pin_ops _nrf5x_pin_ops =
RT_NULL
,
};
in
t
rt_hw_pin_init
(
void
)
rt_err_
t
rt_hw_pin_init
(
void
)
{
nrfx_err_t
err_code
;
...
...
@@ -366,11 +366,11 @@ int rt_hw_pin_init(void)
switch
(
err_code
)
{
case
NRFX_ERROR_INVALID_STATE
:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
case
NRFX_SUCCESS
:
return
RT_EOK
;
default:
return
RT_ERROR
;;
return
-
RT_ERROR
;;
}
}
...
...
bsp/nrf5x/libraries/drivers/drv_gpio.h
浏览文件 @
dfddd79b
...
...
@@ -35,18 +35,10 @@ struct pin_index
{
int
index
;
NRF_GPIO_Type
*
gpio
;
//NRF_P0 or NRF_P1
uint32
_t
pin
;
rt_base
_t
pin
;
};
static
void
nrf5x_pin_write
(
rt_device_t
dev
,
rt_base_t
pin
,
rt_base_t
value
);
static
int
nrf5x_pin_read
(
rt_device_t
dev
,
rt_base_t
pin
);
static
void
nrf5x_pin_mode
(
rt_device_t
dev
,
rt_base_t
pin
,
rt_base_t
mode
);
static
rt_err_t
nrf5x_pin_attach_irq
(
struct
rt_device
*
device
,
rt_int32_t
pin
,
rt_uint32_t
mode
,
void
(
*
hdr
)(
void
*
args
),
void
*
args
);
static
rt_err_t
nrf5x_pin_dettach_irq
(
struct
rt_device
*
device
,
rt_int32_t
pin
);
static
rt_err_t
nrf5x_pin_irq_enable
(
struct
rt_device
*
device
,
rt_base_t
pin
,
rt_uint32_t
enabled
);
int
rt_hw_pin_init
(
void
);
rt_err_t
rt_hw_pin_init
(
void
);
#endif
/* __DRV_GPIO_H__ */
bsp/nrf5x/libraries/drivers/drv_pwm.c
浏览文件 @
dfddd79b
...
...
@@ -212,7 +212,7 @@ static rt_err_t drv_pwm_control(struct rt_device_pwm *device, int cmd, void *arg
case
PWM_CMD_GET
:
return
drv_pwm_get
(
p_mcu
,
configuration
);
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
}
...
...
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_adc.c
浏览文件 @
dfddd79b
...
...
@@ -66,7 +66,7 @@ static rt_err_t gd32_adc_enabled(struct rt_adc_device *device, rt_uint32_t chann
{
if
(
channel
>
ADC_CHANNEL_17
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
return
RT_EOK
;
}
...
...
@@ -78,7 +78,7 @@ static rt_err_t gd32_adc_convert(struct rt_adc_device *device, rt_uint32_t chann
if
(
channel
>
ADC_CHANNEL_17
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
config
=
(
struct
gd32_adc_config
*
)(
device
->
parent
.
user_data
);
...
...
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_gpio.c
浏览文件 @
dfddd79b
...
...
@@ -379,7 +379,7 @@ static rt_err_t gd32_pin_irq_enable(struct rt_device *device, rt_base_t pin,
break
;
default:
rt_hw_interrupt_enable
(
level
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
/* connect EXTI line to GPIO pin */
...
...
@@ -404,7 +404,7 @@ static rt_err_t gd32_pin_irq_enable(struct rt_device *device, rt_base_t pin,
irqmap
=
get_pin_irq_map
(
index
->
pin
);
if
(
irqmap
==
RT_NULL
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
if
((
irqmap
->
pinbit
>=
GPIO_PIN_5
)
&&
(
irqmap
->
pinbit
<=
GPIO_PIN_9
))
{
...
...
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_pwm.c
浏览文件 @
dfddd79b
...
...
@@ -71,7 +71,7 @@ static rt_err_t gd32_pwm_enable(struct rt_device_pwm *device, struct rt_pwm_conf
if
(
configuration
->
channel
>
GD32_MAX_PWM_CHANNELS
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
if
(
!
enable
)
{
...
...
@@ -143,12 +143,12 @@ static rt_err_t gd32_pwm_set(struct rt_device_pwm *device, struct rt_pwm_configu
if
(
configuration
->
channel
>
GD32_MAX_PWM_CHANNELS
)
{
LOG_I
(
"max channel supported is %d
\n
"
,
GD32_MAX_PWM_CHANNELS
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
if
(
configuration
->
period
<
configuration
->
pulse
)
{
LOG_I
(
"period should > pulse
\n
"
);
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
pwmclk
=
gd32_get_pwm_clk
(
config
->
periph
);
...
...
@@ -157,12 +157,12 @@ static rt_err_t gd32_pwm_set(struct rt_device_pwm *device, struct rt_pwm_configu
period_cmp
=
(
uint64_t
)(
1000000000
/
pwmclk
)
*
10
;
if
(
configuration
->
period
<
period_cmp
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
period_cmp
=
(
uint64_t
)(
1000000000
/
(
pwmclk
/
65536
/
4
))
*
65536
;
if
(
configuration
->
period
>
period_cmp
)
{
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
period_cmp
=
(
uint64_t
)
pwmclk
*
configuration
->
period
/
1000000000
;
...
...
@@ -252,7 +252,7 @@ static rt_err_t gd32_pwm_control(struct rt_device_pwm *device, int cmd, void *ar
case
PWM_CMD_GET
:
return
gd32_pwm_get
(
device
,
configuration
);
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
}
...
...
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_rtc.c
浏览文件 @
dfddd79b
...
...
@@ -127,7 +127,7 @@ static rt_err_t gd32_rtc_control(rt_device_t dev, int cmd, void *args)
break
;
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
return
RT_EOK
;
...
...
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_wdt.c
浏览文件 @
dfddd79b
...
...
@@ -124,7 +124,7 @@ static rt_err_t gd32_wdog_control(rt_watchdog_t *wdt, int cmd, void *args)
}
break
;
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
return
RT_EOK
;
...
...
bsp/nuvoton/libraries/m031/rtt_port/drv_bpwm.c
浏览文件 @
dfddd79b
...
...
@@ -205,7 +205,7 @@ static rt_err_t nu_bpwm_control(struct rt_device_pwm *device, int cmd, void *arg
case
PWM_CMD_GET
:
return
nu_bpwm_get
(
device
,
configuration
);
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
}
...
...
bsp/nuvoton/libraries/m031/rtt_port/drv_pdma.c
浏览文件 @
dfddd79b
...
...
@@ -284,7 +284,7 @@ exit_pdma_channel_terminate:
static
rt_err_t
nu_pdma_timeout_set
(
int
i32ChannID
,
int
i32Timeout_us
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
!
(
nu_pdma_chn_mask
&
(
1
<<
i32ChannID
)))
goto
exit_nu_pdma_timeout_set
;
...
...
@@ -355,7 +355,7 @@ exit_nu_pdma_channel_allocate:
rt_err_t
nu_pdma_channel_free
(
int
i32ChannID
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
!
nu_pdma_inited
)
goto
exit_nu_pdma_channel_free
;
...
...
@@ -373,7 +373,7 @@ exit_nu_pdma_channel_free:
rt_err_t
nu_pdma_callback_register
(
int
i32ChannID
,
nu_pdma_cb_handler_t
pfnHandler
,
void
*
pvUserData
,
uint32_t
u32EventFilter
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
!
(
nu_pdma_chn_mask
&
(
1
<<
i32ChannID
)))
goto
exit_nu_pdma_callback_register
;
...
...
@@ -461,7 +461,7 @@ exit_nu_pdma_channel_memctrl_get:
rt_err_t
nu_pdma_channel_memctrl_set
(
int
i32ChannID
,
nu_pdma_memctrl_t
eMemCtrl
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
nu_pdma_chn_t
*
psPdmaChann
=
&
nu_pdma_chn_arr
[
i32ChannID
-
NU_PDMA_CH_Pos
];
...
...
@@ -518,7 +518,7 @@ rt_err_t nu_pdma_desc_setup(int i32ChannID, nu_pdma_desc_t dma_desc, uint32_t u3
uint32_t
u32SrcCtl
=
0
;
uint32_t
u32DstCtl
=
0
;
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
!
dma_desc
)
goto
exit_nu_pdma_desc_setup
;
...
...
@@ -714,7 +714,7 @@ static void _nu_pdma_transfer(int i32ChannID, uint32_t u32Peripheral, nu_pdma_de
rt_err_t
nu_pdma_transfer
(
int
i32ChannID
,
uint32_t
u32DataWidth
,
uint32_t
u32AddrSrc
,
uint32_t
u32AddrDst
,
int32_t
i32TransferCnt
,
uint32_t
u32IdleTimeout_us
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
nu_pdma_periph_ctl_t
*
psPeriphCtl
=
NULL
;
...
...
@@ -744,7 +744,7 @@ exit_nu_pdma_transfer:
rt_err_t
nu_pdma_sg_transfer
(
int
i32ChannID
,
nu_pdma_desc_t
head
,
uint32_t
u32IdleTimeout_us
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
nu_pdma_periph_ctl_t
*
psPeriphCtl
=
NULL
;
if
(
!
head
)
...
...
bsp/nuvoton/libraries/m031/rtt_port/drv_qspi.c
浏览文件 @
dfddd79b
...
...
@@ -111,7 +111,7 @@ static rt_err_t nu_qspi_bus_configure(struct rt_spi_device *device,
configuration
->
data_width
==
24
||
configuration
->
data_width
==
32
))
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_qspi_bus_configure
;
}
...
...
bsp/nuvoton/libraries/m031/rtt_port/drv_spi.c
浏览文件 @
dfddd79b
...
...
@@ -130,7 +130,7 @@ static rt_err_t nu_spi_bus_configure(struct rt_spi_device *device,
configuration
->
data_width
==
24
||
configuration
->
data_width
==
32
))
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_spi_bus_configure
;
}
...
...
bsp/nuvoton/libraries/m031/rtt_port/drv_timer.c
浏览文件 @
dfddd79b
...
...
@@ -191,7 +191,7 @@ static rt_err_t nu_timer_control(rt_hwtimer_t *timer, rt_uint32_t cmd, void *arg
break
;
default:
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/nuvoton/libraries/m031/rtt_port/drv_uart.c
浏览文件 @
dfddd79b
...
...
@@ -442,7 +442,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
rt_kprintf
(
"Unsupported data length
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
@@ -459,7 +459,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
rt_kprintf
(
"Unsupported stop bit
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
@@ -480,7 +480,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
rt_kprintf
(
"Unsupported parity
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
bsp/nuvoton/libraries/m031/rtt_port/drv_uspi.c
浏览文件 @
dfddd79b
...
...
@@ -168,7 +168,7 @@ static rt_err_t nu_uspi_bus_configure(struct rt_spi_device *device,
if
(
!
(
configuration
->
data_width
==
8
||
configuration
->
data_width
==
16
))
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uspi_bus_configure
;
}
...
...
bsp/nuvoton/libraries/m031/rtt_port/drv_uuart.c
浏览文件 @
dfddd79b
...
...
@@ -224,7 +224,7 @@ static rt_err_t nu_uuart_configure(struct rt_serial_device *serial, struct seria
default:
rt_kprintf
(
"Unsupported data length"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uuart_configure
;
}
...
...
@@ -241,7 +241,7 @@ static rt_err_t nu_uuart_configure(struct rt_serial_device *serial, struct seria
default:
rt_kprintf
(
"Unsupported stop bit"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uuart_configure
;
}
...
...
@@ -262,7 +262,7 @@ static rt_err_t nu_uuart_configure(struct rt_serial_device *serial, struct seria
default:
rt_kprintf
(
"Unsupported parity"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uuart_configure
;
}
/* Reset this module */
...
...
bsp/nuvoton/libraries/m031/rtt_port/drv_wdt.c
浏览文件 @
dfddd79b
...
...
@@ -371,7 +371,7 @@ static rt_err_t wdt_control(rt_watchdog_t *dev, int cmd, void *args)
if
(
args
==
RT_NULL
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
@@ -385,7 +385,7 @@ static rt_err_t wdt_control(rt_watchdog_t *dev, int cmd, void *args)
if
(
wanted_sec
==
0
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
@@ -396,7 +396,7 @@ static rt_err_t wdt_control(rt_watchdog_t *dev, int cmd, void *args)
if
(
args
==
RT_NULL
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/nuvoton/libraries/m2354/rtt_port/drv_bpwm.c
浏览文件 @
dfddd79b
...
...
@@ -205,7 +205,7 @@ static rt_err_t nu_bpwm_control(struct rt_device_pwm *device, int cmd, void *arg
case
PWM_CMD_GET
:
return
nu_bpwm_get
(
device
,
configuration
);
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
}
...
...
bsp/nuvoton/libraries/m2354/rtt_port/drv_pdma.c
浏览文件 @
dfddd79b
...
...
@@ -285,7 +285,7 @@ exit_pdma_channel_terminate:
static
rt_err_t
nu_pdma_timeout_set
(
int
i32ChannID
,
int
i32Timeout_us
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
PDMA_T
*
PDMA
=
NULL
;
if
(
!
(
nu_pdma_chn_mask
&
(
1
<<
i32ChannID
)))
...
...
@@ -359,7 +359,7 @@ exit_nu_pdma_channel_allocate:
rt_err_t
nu_pdma_channel_free
(
int
i32ChannID
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
!
nu_pdma_inited
)
goto
exit_nu_pdma_channel_free
;
...
...
@@ -377,7 +377,7 @@ exit_nu_pdma_channel_free:
rt_err_t
nu_pdma_callback_register
(
int
i32ChannID
,
nu_pdma_cb_handler_t
pfnHandler
,
void
*
pvUserData
,
uint32_t
u32EventFilter
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
!
(
nu_pdma_chn_mask
&
(
1
<<
i32ChannID
)))
goto
exit_nu_pdma_callback_register
;
...
...
@@ -469,7 +469,7 @@ exit_nu_pdma_channel_memctrl_get:
rt_err_t
nu_pdma_channel_memctrl_set
(
int
i32ChannID
,
nu_pdma_memctrl_t
eMemCtrl
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
nu_pdma_chn_t
*
psPdmaChann
=
&
nu_pdma_chn_arr
[
i32ChannID
-
NU_PDMA_CH_Pos
];
...
...
@@ -527,7 +527,7 @@ rt_err_t nu_pdma_desc_setup(int i32ChannID, nu_pdma_desc_t dma_desc, uint32_t u3
uint32_t
u32SrcCtl
=
0
;
uint32_t
u32DstCtl
=
0
;
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
!
dma_desc
)
goto
exit_nu_pdma_desc_setup
;
...
...
@@ -727,7 +727,7 @@ static void _nu_pdma_transfer(int i32ChannID, uint32_t u32Peripheral, nu_pdma_de
rt_err_t
nu_pdma_transfer
(
int
i32ChannID
,
uint32_t
u32DataWidth
,
uint32_t
u32AddrSrc
,
uint32_t
u32AddrDst
,
int32_t
i32TransferCnt
,
uint32_t
u32IdleTimeout_us
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
PDMA_T
*
PDMA
=
NU_PDMA_GET_BASE
(
i32ChannID
);
...
...
@@ -759,7 +759,7 @@ exit_nu_pdma_transfer:
rt_err_t
nu_pdma_sg_transfer
(
int
i32ChannID
,
nu_pdma_desc_t
head
,
uint32_t
u32IdleTimeout_us
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
nu_pdma_periph_ctl_t
*
psPeriphCtl
=
NULL
;
if
(
!
head
)
...
...
bsp/nuvoton/libraries/m2354/rtt_port/drv_qspi.c
浏览文件 @
dfddd79b
...
...
@@ -111,7 +111,7 @@ static rt_err_t nu_qspi_bus_configure(struct rt_spi_device *device,
configuration
->
data_width
==
24
||
configuration
->
data_width
==
32
))
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_qspi_bus_configure
;
}
...
...
bsp/nuvoton/libraries/m2354/rtt_port/drv_scuart.c
浏览文件 @
dfddd79b
...
...
@@ -213,7 +213,7 @@ static rt_err_t nu_scuart_configure(struct rt_serial_device *serial, struct seri
default:
LOG_E
(
"Unsupported data length"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_scuart_configure
;
}
...
...
@@ -230,7 +230,7 @@ static rt_err_t nu_scuart_configure(struct rt_serial_device *serial, struct seri
default:
LOG_E
(
"Unsupported stop bit"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_scuart_configure
;
}
...
...
@@ -251,7 +251,7 @@ static rt_err_t nu_scuart_configure(struct rt_serial_device *serial, struct seri
default:
LOG_E
(
"Unsupported parity"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_scuart_configure
;
}
...
...
bsp/nuvoton/libraries/m2354/rtt_port/drv_spi.c
浏览文件 @
dfddd79b
...
...
@@ -190,7 +190,7 @@ static rt_err_t nu_spi_bus_configure(struct rt_spi_device *device,
configuration
->
data_width
==
24
||
configuration
->
data_width
==
32
))
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_spi_bus_configure
;
}
...
...
bsp/nuvoton/libraries/m2354/rtt_port/drv_timer.c
浏览文件 @
dfddd79b
...
...
@@ -198,7 +198,7 @@ static rt_err_t nu_timer_control(rt_hwtimer_t *timer, rt_uint32_t cmd, void *arg
break
;
default:
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/nuvoton/libraries/m2354/rtt_port/drv_uart.c
浏览文件 @
dfddd79b
...
...
@@ -396,7 +396,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
rt_kprintf
(
"Unsupported data length
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
@@ -413,7 +413,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
rt_kprintf
(
"Unsupported stop bit
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
@@ -434,7 +434,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
rt_kprintf
(
"Unsupported parity
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
bsp/nuvoton/libraries/m2354/rtt_port/drv_uspi.c
浏览文件 @
dfddd79b
...
...
@@ -168,7 +168,7 @@ static rt_err_t nu_uspi_bus_configure(struct rt_spi_device *device,
if
(
!
(
configuration
->
data_width
==
8
||
configuration
->
data_width
==
16
))
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uspi_bus_configure
;
}
...
...
bsp/nuvoton/libraries/m2354/rtt_port/drv_uuart.c
浏览文件 @
dfddd79b
...
...
@@ -233,7 +233,7 @@ static rt_err_t nu_uuart_configure(struct rt_serial_device *serial, struct seria
default:
rt_kprintf
(
"Unsupported data length"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uuart_configure
;
}
...
...
@@ -250,7 +250,7 @@ static rt_err_t nu_uuart_configure(struct rt_serial_device *serial, struct seria
default:
rt_kprintf
(
"Unsupported stop bit"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uuart_configure
;
}
...
...
@@ -271,7 +271,7 @@ static rt_err_t nu_uuart_configure(struct rt_serial_device *serial, struct seria
default:
rt_kprintf
(
"Unsupported parity"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uuart_configure
;
}
/* Reset this module */
...
...
bsp/nuvoton/libraries/m2354/rtt_port/drv_wdt.c
浏览文件 @
dfddd79b
...
...
@@ -370,7 +370,7 @@ static rt_err_t wdt_control(rt_watchdog_t *dev, int cmd, void *args)
if
(
args
==
RT_NULL
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
@@ -384,7 +384,7 @@ static rt_err_t wdt_control(rt_watchdog_t *dev, int cmd, void *args)
if
(
wanted_sec
==
0
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
@@ -395,7 +395,7 @@ static rt_err_t wdt_control(rt_watchdog_t *dev, int cmd, void *args)
if
(
args
==
RT_NULL
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/nuvoton/libraries/m460/rtt_port/drv_dac.c
浏览文件 @
dfddd79b
...
...
@@ -118,7 +118,7 @@ static rt_err_t nu_dac_convert(struct rt_dac_device *device, rt_uint32_t channel
if
(
channel
>=
psNuDAC
->
max_chn_num
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_dac_convert
;
}
...
...
bsp/nuvoton/libraries/m460/rtt_port/drv_eadc.c
浏览文件 @
dfddd79b
...
...
@@ -131,7 +131,7 @@ static rt_err_t nu_get_eadc_value(struct rt_adc_device *device, rt_uint32_t chan
if
(
channel
>=
psNuEADC
->
max_chn_num
)
{
*
value
=
0xFFFFFFFF
;
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_get_eadc_value
;
}
...
...
bsp/nuvoton/libraries/m460/rtt_port/drv_pdma.c
浏览文件 @
dfddd79b
...
...
@@ -341,7 +341,7 @@ exit_pdma_channel_terminate:
static
rt_err_t
nu_pdma_timeout_set
(
int
i32ChannID
,
int
i32Timeout_us
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
PDMA_T
*
PDMA
=
NULL
;
uint32_t
u32ModChannId
;
...
...
@@ -425,7 +425,7 @@ exit_nu_pdma_channel_allocate:
rt_err_t
nu_pdma_channel_free
(
int
i32ChannID
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
!
nu_pdma_inited
)
goto
exit_nu_pdma_channel_free
;
...
...
@@ -446,7 +446,7 @@ exit_nu_pdma_channel_free:
rt_err_t
nu_pdma_filtering_set
(
int
i32ChannID
,
uint32_t
u32EventFilter
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
nu_pdma_check_is_nonallocated
(
i32ChannID
))
goto
exit_nu_pdma_filtering_set
;
...
...
@@ -473,7 +473,7 @@ exit_nu_pdma_filtering_get:
rt_err_t
nu_pdma_callback_register
(
int
i32ChannID
,
nu_pdma_chn_cb_t
psChnCb
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
nu_pdma_chn_cb_t
psChnCb_Current
=
RT_NULL
;
RT_ASSERT
(
psChnCb
!=
RT_NULL
);
...
...
@@ -595,7 +595,7 @@ exit_nu_pdma_channel_memctrl_get:
rt_err_t
nu_pdma_channel_memctrl_set
(
int
i32ChannID
,
nu_pdma_memctrl_t
eMemCtrl
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
nu_pdma_chn_t
*
psPdmaChann
=
&
nu_pdma_chn_arr
[
i32ChannID
-
NU_PDMA_CH_Pos
];
if
(
nu_pdma_check_is_nonallocated
(
i32ChannID
))
...
...
@@ -652,7 +652,7 @@ rt_err_t nu_pdma_desc_setup(int i32ChannID, nu_pdma_desc_t dma_desc, uint32_t u3
uint32_t
u32SrcCtl
=
0
;
uint32_t
u32DstCtl
=
0
;
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
!
dma_desc
)
goto
exit_nu_pdma_desc_setup
;
...
...
@@ -925,7 +925,7 @@ exit__nu_pdma_transfer_chain:
rt_err_t
nu_pdma_transfer
(
int
i32ChannID
,
uint32_t
u32DataWidth
,
uint32_t
u32AddrSrc
,
uint32_t
u32AddrDst
,
uint32_t
u32TransferCnt
,
uint32_t
u32IdleTimeout_us
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
PDMA_T
*
PDMA
=
NU_PDMA_GET_BASE
(
i32ChannID
);
nu_pdma_desc_t
head
;
nu_pdma_chn_t
*
psPdmaChann
;
...
...
@@ -966,7 +966,7 @@ exit_nu_pdma_transfer:
rt_err_t
nu_pdma_sg_transfer
(
int
i32ChannID
,
nu_pdma_desc_t
head
,
uint32_t
u32IdleTimeout_us
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
nu_pdma_periph_ctl_t
*
psPeriphCtl
=
NULL
;
if
(
!
head
)
...
...
bsp/nuvoton/libraries/m460/rtt_port/drv_qspi.c
浏览文件 @
dfddd79b
...
...
@@ -129,7 +129,7 @@ static rt_err_t nu_qspi_bus_configure(struct rt_spi_device *device,
configuration
->
data_width
==
24
||
configuration
->
data_width
==
32
))
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_qspi_bus_configure
;
}
...
...
bsp/nuvoton/libraries/m460/rtt_port/drv_scuart.c
浏览文件 @
dfddd79b
...
...
@@ -186,7 +186,7 @@ static rt_err_t nu_scuart_configure(struct rt_serial_device *serial,
default:
LOG_E
(
"Unsupported data length
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_scuart_configure
;
}
...
...
@@ -203,7 +203,7 @@ static rt_err_t nu_scuart_configure(struct rt_serial_device *serial,
default:
LOG_E
(
"Unsupported stop bit
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_scuart_configure
;
}
...
...
@@ -224,7 +224,7 @@ static rt_err_t nu_scuart_configure(struct rt_serial_device *serial,
default:
LOG_E
(
"Unsupported parity
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_scuart_configure
;
}
...
...
bsp/nuvoton/libraries/m460/rtt_port/drv_spi.c
浏览文件 @
dfddd79b
...
...
@@ -334,7 +334,7 @@ static rt_err_t nu_spi_bus_configure(struct rt_spi_device *device,
configuration
->
data_width
==
24
||
configuration
->
data_width
==
32
))
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_spi_bus_configure
;
}
...
...
bsp/nuvoton/libraries/m460/rtt_port/drv_timer.c
浏览文件 @
dfddd79b
...
...
@@ -122,7 +122,7 @@ static void nu_timer_init(rt_hwtimer_t *timer, rt_uint32_t state)
static
rt_err_t
nu_timer_start
(
rt_hwtimer_t
*
timer
,
rt_uint32_t
cnt
,
rt_hwtimer_mode_t
opmode
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
rt_uint32_t
u32OpMode
;
nu_timer_t
psNuTmr
=
NU_TIMER_DEVICE
(
timer
);
...
...
@@ -205,7 +205,7 @@ static rt_err_t nu_timer_control(rt_hwtimer_t *timer, rt_uint32_t cmd, void *arg
break
;
default:
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/nuvoton/libraries/m460/rtt_port/drv_uart.c
浏览文件 @
dfddd79b
...
...
@@ -577,7 +577,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
rt_kprintf
(
"Unsupported data length
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
@@ -594,7 +594,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
rt_kprintf
(
"Unsupported stop bit
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
@@ -615,7 +615,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
rt_kprintf
(
"Unsupported parity
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
bsp/nuvoton/libraries/m460/rtt_port/drv_uspi.c
浏览文件 @
dfddd79b
...
...
@@ -147,7 +147,7 @@ static rt_err_t nu_uspi_bus_configure(struct rt_spi_device *device,
if
(
!
(
configuration
->
data_width
==
8
||
configuration
->
data_width
==
16
))
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uspi_bus_configure
;
}
...
...
bsp/nuvoton/libraries/m460/rtt_port/drv_uuart.c
浏览文件 @
dfddd79b
...
...
@@ -196,7 +196,7 @@ static rt_err_t nu_uuart_configure(struct rt_serial_device *serial, struct seria
default:
rt_kprintf
(
"Unsupported data length"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uuart_configure
;
}
...
...
@@ -213,7 +213,7 @@ static rt_err_t nu_uuart_configure(struct rt_serial_device *serial, struct seria
default:
rt_kprintf
(
"Unsupported stop bit
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uuart_configure
;
}
...
...
@@ -234,7 +234,7 @@ static rt_err_t nu_uuart_configure(struct rt_serial_device *serial, struct seria
default:
rt_kprintf
(
"Unsupported parity
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uuart_configure
;
}
/* Reset this module */
...
...
bsp/nuvoton/libraries/m460/rtt_port/drv_wdt.c
浏览文件 @
dfddd79b
...
...
@@ -385,7 +385,7 @@ static rt_err_t wdt_control(rt_watchdog_t *dev, int cmd, void *args)
if
(
args
==
RT_NULL
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
@@ -399,7 +399,7 @@ static rt_err_t wdt_control(rt_watchdog_t *dev, int cmd, void *args)
if
(
wanted_sec
==
0
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
@@ -410,7 +410,7 @@ static rt_err_t wdt_control(rt_watchdog_t *dev, int cmd, void *args)
if
(
args
==
RT_NULL
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/nuvoton/libraries/m480/rtt_port/drv_bpwm.c
浏览文件 @
dfddd79b
...
...
@@ -205,7 +205,7 @@ static rt_err_t nu_bpwm_control(struct rt_device_pwm *device, int cmd, void *arg
case
PWM_CMD_GET
:
return
nu_bpwm_get
(
device
,
configuration
);
default:
return
RT_EINVAL
;
return
-
RT_EINVAL
;
}
}
...
...
bsp/nuvoton/libraries/m480/rtt_port/drv_pdma.c
浏览文件 @
dfddd79b
...
...
@@ -314,7 +314,7 @@ exit_pdma_channel_terminate:
static
rt_err_t
nu_pdma_timeout_set
(
int
i32ChannID
,
int
i32Timeout_us
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
!
(
nu_pdma_chn_mask
&
(
1
<<
i32ChannID
)))
goto
exit_nu_pdma_timeout_set
;
...
...
@@ -385,7 +385,7 @@ exit_nu_pdma_channel_allocate:
rt_err_t
nu_pdma_channel_free
(
int
i32ChannID
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
!
nu_pdma_inited
)
goto
exit_nu_pdma_channel_free
;
...
...
@@ -403,7 +403,7 @@ exit_nu_pdma_channel_free:
rt_err_t
nu_pdma_callback_register
(
int
i32ChannID
,
nu_pdma_cb_handler_t
pfnHandler
,
void
*
pvUserData
,
uint32_t
u32EventFilter
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
!
(
nu_pdma_chn_mask
&
(
1
<<
i32ChannID
)))
goto
exit_nu_pdma_callback_register
;
...
...
@@ -491,7 +491,7 @@ exit_nu_pdma_channel_memctrl_get:
rt_err_t
nu_pdma_channel_memctrl_set
(
int
i32ChannID
,
nu_pdma_memctrl_t
eMemCtrl
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
nu_pdma_chn_t
*
psPdmaChann
=
&
nu_pdma_chn_arr
[
i32ChannID
-
NU_PDMA_CH_Pos
];
...
...
@@ -548,7 +548,7 @@ rt_err_t nu_pdma_desc_setup(int i32ChannID, nu_pdma_desc_t dma_desc, uint32_t u3
uint32_t
u32SrcCtl
=
0
;
uint32_t
u32DstCtl
=
0
;
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
!
dma_desc
)
goto
exit_nu_pdma_desc_setup
;
...
...
@@ -744,7 +744,7 @@ static void _nu_pdma_transfer(int i32ChannID, uint32_t u32Peripheral, nu_pdma_de
rt_err_t
nu_pdma_transfer
(
int
i32ChannID
,
uint32_t
u32DataWidth
,
uint32_t
u32AddrSrc
,
uint32_t
u32AddrDst
,
int32_t
i32TransferCnt
,
uint32_t
u32IdleTimeout_us
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
nu_pdma_periph_ctl_t
*
psPeriphCtl
=
NULL
;
...
...
@@ -774,7 +774,7 @@ exit_nu_pdma_transfer:
rt_err_t
nu_pdma_sg_transfer
(
int
i32ChannID
,
nu_pdma_desc_t
head
,
uint32_t
u32IdleTimeout_us
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
nu_pdma_periph_ctl_t
*
psPeriphCtl
=
NULL
;
if
(
!
head
)
...
...
bsp/nuvoton/libraries/m480/rtt_port/drv_qspi.c
浏览文件 @
dfddd79b
...
...
@@ -130,7 +130,7 @@ static rt_err_t nu_qspi_bus_configure(struct rt_spi_device *device,
configuration
->
data_width
==
24
||
configuration
->
data_width
==
32
))
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_qspi_bus_configure
;
}
...
...
bsp/nuvoton/libraries/m480/rtt_port/drv_scuart.c
浏览文件 @
dfddd79b
...
...
@@ -213,7 +213,7 @@ static rt_err_t nu_scuart_configure(struct rt_serial_device *serial,
default:
LOG_E
(
"Unsupported data length"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_scuart_configure
;
}
...
...
@@ -230,7 +230,7 @@ static rt_err_t nu_scuart_configure(struct rt_serial_device *serial,
default:
LOG_E
(
"Unsupported stop bit"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_scuart_configure
;
}
...
...
@@ -251,7 +251,7 @@ static rt_err_t nu_scuart_configure(struct rt_serial_device *serial,
default:
LOG_E
(
"Unsupported parity"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_scuart_configure
;
}
...
...
bsp/nuvoton/libraries/m480/rtt_port/drv_spi.c
浏览文件 @
dfddd79b
...
...
@@ -190,7 +190,7 @@ static rt_err_t nu_spi_bus_configure(struct rt_spi_device *device,
configuration
->
data_width
==
24
||
configuration
->
data_width
==
32
))
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_spi_bus_configure
;
}
...
...
bsp/nuvoton/libraries/m480/rtt_port/drv_timer.c
浏览文件 @
dfddd79b
...
...
@@ -190,7 +190,7 @@ static rt_err_t nu_timer_control(rt_hwtimer_t *timer, rt_uint32_t cmd, void *arg
break
;
default:
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/nuvoton/libraries/m480/rtt_port/drv_uart.c
浏览文件 @
dfddd79b
...
...
@@ -474,7 +474,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
rt_kprintf
(
"Unsupported data length
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
@@ -491,7 +491,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
rt_kprintf
(
"Unsupported stop bit
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
@@ -512,7 +512,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
rt_kprintf
(
"Unsupported parity
\n
"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
bsp/nuvoton/libraries/m480/rtt_port/drv_uspi.c
浏览文件 @
dfddd79b
...
...
@@ -168,7 +168,7 @@ static rt_err_t nu_uspi_bus_configure(struct rt_spi_device *device,
if
(
!
(
configuration
->
data_width
==
8
||
configuration
->
data_width
==
16
))
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uspi_bus_configure
;
}
...
...
bsp/nuvoton/libraries/m480/rtt_port/drv_uuart.c
浏览文件 @
dfddd79b
...
...
@@ -233,7 +233,7 @@ static rt_err_t nu_uuart_configure(struct rt_serial_device *serial, struct seria
default:
rt_kprintf
(
"Unsupported data length"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uuart_configure
;
}
...
...
@@ -250,7 +250,7 @@ static rt_err_t nu_uuart_configure(struct rt_serial_device *serial, struct seria
default:
rt_kprintf
(
"Unsupported stop bit"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uuart_configure
;
}
...
...
@@ -271,7 +271,7 @@ static rt_err_t nu_uuart_configure(struct rt_serial_device *serial, struct seria
default:
rt_kprintf
(
"Unsupported parity"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uuart_configure
;
}
/* Reset this module */
...
...
bsp/nuvoton/libraries/m480/rtt_port/drv_wdt.c
浏览文件 @
dfddd79b
...
...
@@ -367,7 +367,7 @@ static rt_err_t wdt_control(rt_watchdog_t *dev, int cmd, void *args)
if
(
args
==
RT_NULL
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
@@ -381,7 +381,7 @@ static rt_err_t wdt_control(rt_watchdog_t *dev, int cmd, void *args)
if
(
wanted_sec
==
0
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
@@ -392,7 +392,7 @@ static rt_err_t wdt_control(rt_watchdog_t *dev, int cmd, void *args)
if
(
args
==
RT_NULL
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/nuvoton/libraries/ma35/rtt_port/drv_adc.c
浏览文件 @
dfddd79b
...
...
@@ -329,7 +329,7 @@ static void nu_adc_touch_smpl(void *p)
static
rt_err_t
_nu_adc_control
(
rt_device_t
dev
,
int
cmd
,
void
*
args
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
nu_adc_t
psNuAdc
=
(
nu_adc_t
)
dev
;
ADC_T
*
adc
=
psNuAdc
->
base
;
...
...
@@ -563,7 +563,7 @@ static rt_err_t nu_adc_convert(struct rt_adc_device *device, rt_uint32_t channel
if
(
channel
>=
ADC_CH_NUM
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_adc_convert
;
}
else
if
((
ret
=
_nu_adc_control
((
rt_device_t
)
device
,
SWITCH_CH
,
(
void
*
)
channel
))
!=
RT_EOK
)
...
...
bsp/nuvoton/libraries/ma35/rtt_port/drv_pdma.c
浏览文件 @
dfddd79b
...
...
@@ -330,7 +330,7 @@ static inline void nu_pdma_channel_reset(int i32ChannID)
static
rt_err_t
nu_pdma_timeout_set
(
int
i32ChannID
,
int
i32Timeout_us
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
PDMA_T
*
PDMA
=
NULL
;
uint32_t
u32ModChannId
;
...
...
@@ -435,7 +435,7 @@ exit_nu_pdma_channel_allocate:
rt_err_t
nu_pdma_channel_free
(
int
i32ChannID
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
!
nu_pdma_inited
)
goto
exit_nu_pdma_channel_free
;
...
...
@@ -456,7 +456,7 @@ exit_nu_pdma_channel_free:
rt_err_t
nu_pdma_filtering_set
(
int
i32ChannID
,
uint32_t
u32EventFilter
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
nu_pdma_check_is_nonallocated
(
i32ChannID
))
goto
exit_nu_pdma_filtering_set
;
...
...
@@ -483,7 +483,7 @@ exit_nu_pdma_filtering_get:
rt_err_t
nu_pdma_callback_register
(
int
i32ChannID
,
nu_pdma_chn_cb_t
psChnCb
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
nu_pdma_chn_cb_t
psChnCb_Current
=
RT_NULL
;
RT_ASSERT
(
psChnCb
!=
RT_NULL
);
...
...
@@ -630,7 +630,7 @@ exit_nu_pdma_channel_memctrl_get:
rt_err_t
nu_pdma_channel_memctrl_set
(
int
i32ChannID
,
nu_pdma_memctrl_t
eMemCtrl
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
nu_pdma_chn_t
*
psPdmaChann
=
&
nu_pdma_chn_arr
[
i32ChannID
-
NU_PDMA_CH_Pos
];
if
(
nu_pdma_check_is_nonallocated
(
i32ChannID
))
...
...
@@ -686,7 +686,7 @@ rt_err_t nu_pdma_desc_setup(int i32ChannID, nu_pdma_desc_t dma_desc, uint32_t u3
uint32_t
u32SrcCtl
=
0
;
uint32_t
u32DstCtl
=
0
;
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
if
(
!
dma_desc
)
goto
exit_nu_pdma_desc_setup
;
...
...
@@ -949,7 +949,7 @@ exit__nu_pdma_transfer_chain:
rt_err_t
nu_pdma_transfer
(
int
i32ChannID
,
uint32_t
u32DataWidth
,
uint32_t
u32AddrSrc
,
uint32_t
u32AddrDst
,
uint32_t
u32TransferCnt
,
uint32_t
u32IdleTimeout_us
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
PDMA_T
*
PDMA
=
NU_PDMA_GET_BASE
(
i32ChannID
);
nu_pdma_desc_t
head
;
nu_pdma_chn_t
*
psPdmaChann
;
...
...
@@ -990,7 +990,7 @@ exit_nu_pdma_transfer:
rt_err_t
nu_pdma_sg_transfer
(
int
i32ChannID
,
nu_pdma_desc_t
head
,
uint32_t
u32IdleTimeout_us
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
nu_pdma_periph_ctl_t
*
psPeriphCtl
=
NULL
;
if
(
!
head
)
...
...
bsp/nuvoton/libraries/ma35/rtt_port/drv_qspi.c
浏览文件 @
dfddd79b
...
...
@@ -128,7 +128,7 @@ static rt_err_t nu_qspi_bus_configure(struct rt_spi_device *device,
configuration
->
data_width
==
24
||
configuration
->
data_width
==
32
))
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_qspi_bus_configure
;
}
...
...
bsp/nuvoton/libraries/ma35/rtt_port/drv_scuart.c
浏览文件 @
dfddd79b
...
...
@@ -146,7 +146,7 @@ static rt_err_t nu_scuart_configure(struct rt_serial_device *serial,
default:
LOG_E
(
"Unsupported data length"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_scuart_configure
;
}
...
...
@@ -163,7 +163,7 @@ static rt_err_t nu_scuart_configure(struct rt_serial_device *serial,
default:
LOG_E
(
"Unsupported stop bit"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_scuart_configure
;
}
...
...
@@ -184,7 +184,7 @@ static rt_err_t nu_scuart_configure(struct rt_serial_device *serial,
default:
LOG_E
(
"Unsupported parity"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_scuart_configure
;
}
...
...
bsp/nuvoton/libraries/ma35/rtt_port/drv_spi.c
浏览文件 @
dfddd79b
...
...
@@ -185,7 +185,7 @@ static rt_err_t nu_spi_bus_configure(struct rt_spi_device *device,
configuration
->
data_width
==
24
||
configuration
->
data_width
==
32
))
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_spi_bus_configure
;
}
...
...
bsp/nuvoton/libraries/ma35/rtt_port/drv_timer.c
浏览文件 @
dfddd79b
...
...
@@ -171,7 +171,7 @@ static void nu_timer_init(rt_hwtimer_t *timer, rt_uint32_t state)
static
rt_err_t
nu_timer_start
(
rt_hwtimer_t
*
timer
,
rt_uint32_t
cnt
,
rt_hwtimer_mode_t
opmode
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
rt_uint32_t
u32OpMode
;
nu_timer_t
psNuTmr
=
NU_TIMER_DEVICE
(
timer
);
...
...
@@ -254,7 +254,7 @@ static rt_err_t nu_timer_control(rt_hwtimer_t *timer, rt_uint32_t cmd, void *arg
break
;
default:
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/nuvoton/libraries/ma35/rtt_port/drv_uart.c
浏览文件 @
dfddd79b
...
...
@@ -639,7 +639,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
LOG_E
(
"Unsupported data length."
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
@@ -656,7 +656,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
LOG_E
(
"Unsupported stop bit."
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
@@ -677,7 +677,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
LOG_E
(
"Unsupported parity."
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
bsp/nuvoton/libraries/ma35/rtt_port/drv_wdt.c
浏览文件 @
dfddd79b
...
...
@@ -257,7 +257,7 @@ static rt_err_t nu_wdt_control(rt_watchdog_t *dev, int cmd, void *args)
if
(
args
==
RT_NULL
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
@@ -269,7 +269,7 @@ static rt_err_t nu_wdt_control(rt_watchdog_t *dev, int cmd, void *args)
if
(
args
==
RT_NULL
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
@@ -277,7 +277,7 @@ static rt_err_t nu_wdt_control(rt_watchdog_t *dev, int cmd, void *args)
if
(
wanted_sec
==
0
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
@@ -289,7 +289,7 @@ static rt_err_t nu_wdt_control(rt_watchdog_t *dev, int cmd, void *args)
if
(
args
==
RT_NULL
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc.c
浏览文件 @
dfddd79b
...
...
@@ -330,7 +330,7 @@ static void nu_adc_touch_smpl(void *p)
static
rt_err_t
_nu_adc_control
(
rt_device_t
dev
,
int
cmd
,
void
*
args
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
nu_adc_t
psNuAdc
=
(
nu_adc_t
)
dev
;
ADC_T
*
adc
=
psNuAdc
->
base
;
...
...
@@ -564,7 +564,7 @@ static rt_err_t nu_adc_convert(struct rt_adc_device *device, rt_uint32_t channel
if
(
channel
>=
ADC_CH_NUM
)
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_adc_convert
;
}
else
if
((
ret
=
_nu_adc_control
((
rt_device_t
)
device
,
SWITCH_CH
,
(
void
*
)
channel
))
!=
RT_EOK
)
...
...
bsp/nuvoton/libraries/n9h30/rtt_port/drv_etimer.c
浏览文件 @
dfddd79b
...
...
@@ -147,7 +147,7 @@ static void nu_etimer_init(rt_hwtimer_t *timer, rt_uint32_t state)
static
rt_err_t
nu_etimer_start
(
rt_hwtimer_t
*
timer
,
rt_uint32_t
cnt
,
rt_hwtimer_mode_t
opmode
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
rt_uint32_t
u32OpMode
;
nu_etimer_t
psNuETmr
=
NU_TIMER_DEVICE
(
timer
);
...
...
@@ -230,7 +230,7 @@ static rt_err_t nu_etimer_control(rt_hwtimer_t *timer, rt_uint32_t cmd, void *ar
break
;
default:
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/nuvoton/libraries/n9h30/rtt_port/drv_pwm.c
浏览文件 @
dfddd79b
...
...
@@ -223,7 +223,7 @@ uint32_t nu_pwm_config(uint32_t u32PwmBaseAddr, uint32_t u32ChannelNum, uint32_t
static
rt_err_t
nu_pwm_set
(
struct
rt_device_pwm
*
device
,
struct
rt_pwm_configuration
*
config
)
{
nu_pwm_t
psNuPWM
=
(
nu_pwm_t
)
device
;
rt_err_t
result
=
RT_EINVAL
;
rt_err_t
result
=
-
RT_EINVAL
;
rt_uint32_t
u32FreqInHz
;
/* unit:Hz */
rt_uint32_t
u32PulseInHz
;
/* unit:% */
...
...
bsp/nuvoton/libraries/n9h30/rtt_port/drv_qspi.c
浏览文件 @
dfddd79b
...
...
@@ -137,7 +137,7 @@ static rt_err_t nu_qspi_bus_configure(struct rt_spi_device *device,
configuration
->
data_width
==
24
||
configuration
->
data_width
==
32
))
{
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_qspi_bus_configure
;
}
...
...
bsp/nuvoton/libraries/n9h30/rtt_port/drv_scuart.c
浏览文件 @
dfddd79b
...
...
@@ -156,7 +156,7 @@ static rt_err_t nu_scuart_configure(struct rt_serial_device *serial,
default:
LOG_E
(
"Unsupported data length"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_scuart_configure
;
}
...
...
@@ -173,7 +173,7 @@ static rt_err_t nu_scuart_configure(struct rt_serial_device *serial,
default:
LOG_E
(
"Unsupported stop bit"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_scuart_configure
;
}
...
...
@@ -194,7 +194,7 @@ static rt_err_t nu_scuart_configure(struct rt_serial_device *serial,
default:
LOG_E
(
"Unsupported parity"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_scuart_configure
;
}
...
...
bsp/nuvoton/libraries/n9h30/rtt_port/drv_timer.c
浏览文件 @
dfddd79b
...
...
@@ -150,7 +150,7 @@ static void nu_timer_init(rt_hwtimer_t *timer, rt_uint32_t state)
static
rt_err_t
nu_timer_start
(
rt_hwtimer_t
*
timer
,
rt_uint32_t
cnt
,
rt_hwtimer_mode_t
opmode
)
{
rt_err_t
ret
=
RT_EINVAL
;
rt_err_t
ret
=
-
RT_EINVAL
;
rt_uint32_t
u32OpMode
;
nu_timer_t
psNuTmr
=
NU_TIMER_DEVICE
(
timer
);
...
...
@@ -233,7 +233,7 @@ static rt_err_t nu_timer_control(rt_hwtimer_t *timer, rt_uint32_t cmd, void *arg
break
;
default:
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
break
;
}
...
...
bsp/nuvoton/libraries/n9h30/rtt_port/drv_uart.c
浏览文件 @
dfddd79b
...
...
@@ -300,7 +300,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
rt_kprintf
(
"Unsupported data length"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
@@ -317,7 +317,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
rt_kprintf
(
"Unsupported stop bit"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
@@ -338,7 +338,7 @@ static rt_err_t nu_uart_configure(struct rt_serial_device *serial, struct serial
default:
rt_kprintf
(
"Unsupported parity"
);
ret
=
RT_EINVAL
;
ret
=
-
RT_EINVAL
;
goto
exit_nu_uart_configure
;
}
...
...
bsp/nuvoton/libraries/n9h30/rtt_port/drv_wdt.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nu_packages/SPINAND/spinand.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nuc980/rtt_port/drv_adc.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nuc980/rtt_port/drv_etimer.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nuc980/rtt_port/drv_pdma.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nuc980/rtt_port/drv_pwm.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nuc980/rtt_port/drv_qspi.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nuc980/rtt_port/drv_scuart.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nuc980/rtt_port/drv_spi.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nuc980/rtt_port/drv_uart.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nuc980/rtt_port/drv_wdt.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/qemu-virt64-aarch64/drivers/drv_rtc.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/raspberry-pi/raspi3-32/driver/drv_rtc.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/raspberry-pi/raspi3-64/driver/drv_rtc.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/rockchip/common/drivers/drv_gpio.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/synwit/swm320/drivers/drv_gpio.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/synwit/swm320/drivers/drv_pwm.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/synwit/swm320/drivers/drv_spi.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/synwit/swm341/drivers/drv_gpio.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/synwit/swm341/drivers/drv_pwm.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/synwit/swm341/drivers/drv_spi.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/ti/c28x/libraries/HAL_Drivers/drv_pwm.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/tm4c123bsp/libraries/Drivers/drv_pwm.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/w60x/drivers/drv_pwm.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/w60x/drivers/drv_rtc.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/w60x/drivers/drv_wifi.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/wch/arm/Libraries/ch32_drivers/drv_gpio_ch32f10x.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/wch/arm/Libraries/ch32_drivers/drv_gpio_ch32f20x.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/wch/arm/Libraries/ch32_drivers/drv_hwtimer_ch32f10x.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/wch/arm/Libraries/ch32_drivers/drv_hwtimer_ch32f20x.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/wch/arm/Libraries/ch32_drivers/drv_pwm_ch32f10x.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/wch/arm/Libraries/ch32_drivers/drv_pwm_ch32f20x.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
bsp/yichip/yc3121-pos/drivers/drv_gpio.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
components/drivers/wlan/wlan_mgnt.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
components/lwp/lwp_signal.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
components/utilities/rt-link/src/rtlink_dev.c
浏览文件 @
dfddd79b
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录