Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
RT-Thread
rt-thread
提交
0f461e87
R
rt-thread
项目概览
RT-Thread
/
rt-thread
9 个月 前同步成功
通知
751
Star
8909
Fork
4735
代码
文件
提交
分支
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 搜索 >>
提交
0f461e87
编写于
3月 17, 2023
作者:
mysterywolf
提交者:
mysterywolf
3月 20, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[errno code][-RT_ERROR] fix that use RT_ERROR without -
上级
de963fee
变更
272
展开全部
隐藏空白更改
内联
并排
Showing
272 changed file
with
639 addition
and
644 deletion
+639
-644
bsp/Infineon/libraries/HAL_Drivers/drv_hwtimer.c
bsp/Infineon/libraries/HAL_Drivers/drv_hwtimer.c
+3
-3
bsp/Infineon/libraries/HAL_Drivers/drv_pwm.c
bsp/Infineon/libraries/HAL_Drivers/drv_pwm.c
+1
-1
bsp/Infineon/libraries/HAL_Drivers/drv_rtc.c
bsp/Infineon/libraries/HAL_Drivers/drv_rtc.c
+1
-1
bsp/Infineon/libraries/HAL_Drivers/drv_spi.c
bsp/Infineon/libraries/HAL_Drivers/drv_spi.c
+1
-1
bsp/Infineon/libraries/HAL_Drivers/drv_uart.c
bsp/Infineon/libraries/HAL_Drivers/drv_uart.c
+1
-1
bsp/Infineon/libraries/HAL_Drivers/drv_wdt.c
bsp/Infineon/libraries/HAL_Drivers/drv_wdt.c
+1
-1
bsp/Infineon/libraries/templates/PSOC62/board/ports/slider_sample.c
...on/libraries/templates/PSOC62/board/ports/slider_sample.c
+1
-1
bsp/Infineon/libraries/templates/PSOC62/board/ports/spi_sample.c
...ineon/libraries/templates/PSOC62/board/ports/spi_sample.c
+1
-1
bsp/Infineon/psoc6-cy8ckit-062-BLE/board/ports/slider_sample.c
...nfineon/psoc6-cy8ckit-062-BLE/board/ports/slider_sample.c
+1
-1
bsp/Infineon/psoc6-cy8ckit-062-BLE/board/ports/spi_sample.c
bsp/Infineon/psoc6-cy8ckit-062-BLE/board/ports/spi_sample.c
+1
-1
bsp/Infineon/psoc6-cy8ckit-062-WIFI-BT/board/ports/slider_sample.c
...eon/psoc6-cy8ckit-062-WIFI-BT/board/ports/slider_sample.c
+1
-1
bsp/Infineon/psoc6-cy8ckit-062-WIFI-BT/board/ports/spi_sample.c
...fineon/psoc6-cy8ckit-062-WIFI-BT/board/ports/spi_sample.c
+1
-1
bsp/Infineon/psoc6-cy8ckit-062S2-43012/board/ports/slider_sample.c
...eon/psoc6-cy8ckit-062S2-43012/board/ports/slider_sample.c
+1
-1
bsp/Infineon/psoc6-cy8ckit-062S2-43012/board/ports/spi_sample.c
...fineon/psoc6-cy8ckit-062S2-43012/board/ports/spi_sample.c
+1
-1
bsp/Infineon/psoc6-cy8ckit-062s4/board/ports/slider_sample.c
bsp/Infineon/psoc6-cy8ckit-062s4/board/ports/slider_sample.c
+1
-1
bsp/Infineon/psoc6-cy8ckit-062s4/board/ports/spi_sample.c
bsp/Infineon/psoc6-cy8ckit-062s4/board/ports/spi_sample.c
+1
-1
bsp/Infineon/psoc6-cy8cproto-062S3-4343W/board/ports/slider_sample.c
...n/psoc6-cy8cproto-062S3-4343W/board/ports/slider_sample.c
+1
-1
bsp/Infineon/psoc6-cy8cproto-062S3-4343W/board/ports/spi_sample.c
...neon/psoc6-cy8cproto-062S3-4343W/board/ports/spi_sample.c
+1
-1
bsp/Infineon/psoc6-evaluationkit-062S2/board/ports/slider_sample.c
...eon/psoc6-evaluationkit-062S2/board/ports/slider_sample.c
+1
-1
bsp/Infineon/psoc6-evaluationkit-062S2/board/ports/spi_sample.c
...fineon/psoc6-evaluationkit-062S2/board/ports/spi_sample.c
+1
-1
bsp/airm2m/air105/board/wdt_feed.c
bsp/airm2m/air105/board/wdt_feed.c
+2
-2
bsp/airm2m/air105/libraries/rt_drivers/drv_i2c.c
bsp/airm2m/air105/libraries/rt_drivers/drv_i2c.c
+1
-1
bsp/airm2m/air105/libraries/rt_drivers/drv_usart_v2.c
bsp/airm2m/air105/libraries/rt_drivers/drv_usart_v2.c
+1
-1
bsp/allwinner/libraries/drivers/drv_pin.c
bsp/allwinner/libraries/drivers/drv_pin.c
+7
-7
bsp/allwinner/libraries/sunxi-hal/hal/source/gmac/hal_geth.c
bsp/allwinner/libraries/sunxi-hal/hal/source/gmac/hal_geth.c
+5
-5
bsp/allwinner_tina/drivers/drv_clock.c
bsp/allwinner_tina/drivers/drv_clock.c
+10
-10
bsp/allwinner_tina/drivers/drv_gpio.c
bsp/allwinner_tina/drivers/drv_gpio.c
+3
-3
bsp/allwinner_tina/drivers/drv_sdio.c
bsp/allwinner_tina/drivers/drv_sdio.c
+1
-1
bsp/allwinner_tina/drivers/spi/drv_spi.c
bsp/allwinner_tina/drivers/spi/drv_spi.c
+1
-1
bsp/allwinner_tina/drivers/spi/drv_spi_flash.c
bsp/allwinner_tina/drivers/spi/drv_spi_flash.c
+4
-10
bsp/apm32/libraries/Drivers/drv_rtc.c
bsp/apm32/libraries/Drivers/drv_rtc.c
+1
-1
bsp/at32/at32f425-start/applications/main.c
bsp/at32/at32f425-start/applications/main.c
+7
-7
bsp/at32/libraries/rt_drivers/drv_emac.c
bsp/at32/libraries/rt_drivers/drv_emac.c
+1
-1
bsp/efm32/drv_sdcard.c
bsp/efm32/drv_sdcard.c
+1
-1
bsp/essemi/es32f0654/drivers/drv_i2c.c
bsp/essemi/es32f0654/drivers/drv_i2c.c
+1
-1
bsp/essemi/es32f0654/drivers/drv_spi.c
bsp/essemi/es32f0654/drivers/drv_spi.c
+2
-2
bsp/essemi/es32f369x/drivers/drv_i2c.c
bsp/essemi/es32f369x/drivers/drv_i2c.c
+1
-1
bsp/essemi/es32f369x/drivers/drv_spi.c
bsp/essemi/es32f369x/drivers/drv_spi.c
+2
-2
bsp/ft2004/drivers/drv_qspi.c
bsp/ft2004/drivers/drv_qspi.c
+5
-5
bsp/ft2004/drivers/drv_sdcard.c
bsp/ft2004/drivers/drv_sdcard.c
+2
-2
bsp/fujitsu/mb9x/mb9bf506r/drivers/fm3_uart.c
bsp/fujitsu/mb9x/mb9bf506r/drivers/fm3_uart.c
+10
-10
bsp/gd32/arm/libraries/gd32_drivers/drv_spi_flash.c
bsp/gd32/arm/libraries/gd32_drivers/drv_spi_flash.c
+1
-1
bsp/gd32105c-eval/drivers/drv_i2c.c
bsp/gd32105c-eval/drivers/drv_i2c.c
+1
-1
bsp/gd32105c-eval/drivers/drv_spi_flash.c
bsp/gd32105c-eval/drivers/drv_spi_flash.c
+1
-1
bsp/gd32107c-eval/drivers/drv_i2c.c
bsp/gd32107c-eval/drivers/drv_i2c.c
+1
-1
bsp/gd32107c-eval/drivers/drv_spi_flash.c
bsp/gd32107c-eval/drivers/drv_spi_flash.c
+1
-1
bsp/gd32303e-eval/drivers/drv_i2c.c
bsp/gd32303e-eval/drivers/drv_i2c.c
+1
-1
bsp/gd32303e-eval/drivers/drv_spi_flash.c
bsp/gd32303e-eval/drivers/drv_spi_flash.c
+1
-1
bsp/gd32450z-eval/drivers/drv_spi.c
bsp/gd32450z-eval/drivers/drv_spi.c
+1
-1
bsp/gd32450z-eval/drivers/drv_spi_flash.c
bsp/gd32450z-eval/drivers/drv_spi_flash.c
+1
-1
bsp/gd32e230k-start/drivers/drv_i2c.c
bsp/gd32e230k-start/drivers/drv_i2c.c
+1
-1
bsp/hc32/ev_hc32f4a0_lqfp176/board/ports/tca9539.c
bsp/hc32/ev_hc32f4a0_lqfp176/board/ports/tca9539.c
+13
-13
bsp/hc32/libraries/hc32_drivers/drv_adc.c
bsp/hc32/libraries/hc32_drivers/drv_adc.c
+1
-1
bsp/hc32/libraries/hc32_drivers/drv_can.c
bsp/hc32/libraries/hc32_drivers/drv_can.c
+1
-1
bsp/hc32/libraries/hc32_drivers/drv_eth.c
bsp/hc32/libraries/hc32_drivers/drv_eth.c
+1
-1
bsp/hc32/libraries/hc32_drivers/drv_pwm_tmra.c
bsp/hc32/libraries/hc32_drivers/drv_pwm_tmra.c
+1
-1
bsp/hpmicro/hpm6750evk/board/eth_phy_port.c
bsp/hpmicro/hpm6750evk/board/eth_phy_port.c
+2
-2
bsp/hpmicro/hpm6750evkmini/board/eth_phy_port.c
bsp/hpmicro/hpm6750evkmini/board/eth_phy_port.c
+2
-2
bsp/hpmicro/libraries/drivers/drv_adc.c
bsp/hpmicro/libraries/drivers/drv_adc.c
+7
-7
bsp/hpmicro/libraries/drivers/drv_enet.c
bsp/hpmicro/libraries/drivers/drv_enet.c
+2
-2
bsp/hpmicro/libraries/drivers/drv_i2c.c
bsp/hpmicro/libraries/drivers/drv_i2c.c
+1
-1
bsp/hpmicro/libraries/drivers/drv_i2s.c
bsp/hpmicro/libraries/drivers/drv_i2s.c
+1
-1
bsp/hpmicro/libraries/drivers/drv_pdm.c
bsp/hpmicro/libraries/drivers/drv_pdm.c
+2
-2
bsp/hpmicro/libraries/drivers/drv_uart_v2.c
bsp/hpmicro/libraries/drivers/drv_uart_v2.c
+3
-3
bsp/imxrt/libraries/drivers/drv_can.c
bsp/imxrt/libraries/drivers/drv_can.c
+10
-10
bsp/imxrt/libraries/drivers/drv_i2c.c
bsp/imxrt/libraries/drivers/drv_i2c.c
+1
-1
bsp/imxrt/libraries/drivers/drv_rtc.c
bsp/imxrt/libraries/drivers/drv_rtc.c
+1
-1
bsp/imxrt/libraries/drivers/drv_usbd.c
bsp/imxrt/libraries/drivers/drv_usbd.c
+1
-1
bsp/k210/drivers/drv_lcd.c
bsp/k210/drivers/drv_lcd.c
+1
-1
bsp/loongson/ls1cdev/drivers/display_controller.c
bsp/loongson/ls1cdev/drivers/display_controller.c
+1
-1
bsp/loongson/ls1cdev/drivers/drv_can.c
bsp/loongson/ls1cdev/drivers/drv_can.c
+2
-2
bsp/loongson/ls1cdev/drivers/drv_touch.c
bsp/loongson/ls1cdev/drivers/drv_touch.c
+1
-1
bsp/loongson/ls1cdev/drivers/drv_wdt.c
bsp/loongson/ls1cdev/drivers/drv_wdt.c
+5
-5
bsp/loongson/ls2kdev/drivers/drv_uart.c
bsp/loongson/ls2kdev/drivers/drv_uart.c
+1
-1
bsp/lpc54114-lite/drivers/drv_gpio.c
bsp/lpc54114-lite/drivers/drv_gpio.c
+6
-6
bsp/lpc54114-lite/drivers/drv_spi_flash.c
bsp/lpc54114-lite/drivers/drv_spi_flash.c
+1
-1
bsp/lpc54608-LPCXpresso/drivers/drv_emac.c
bsp/lpc54608-LPCXpresso/drivers/drv_emac.c
+4
-4
bsp/lpc54608-LPCXpresso/drivers/drv_i2c.c
bsp/lpc54608-LPCXpresso/drivers/drv_i2c.c
+1
-1
bsp/lpc55sxx/Libraries/drivers/drv_i2c.c
bsp/lpc55sxx/Libraries/drivers/drv_i2c.c
+1
-1
bsp/lpc55sxx/Libraries/drivers/drv_mma8562.c
bsp/lpc55sxx/Libraries/drivers/drv_mma8562.c
+1
-1
bsp/lpc55sxx/Libraries/drivers/drv_pin.c
bsp/lpc55sxx/Libraries/drivers/drv_pin.c
+6
-6
bsp/maxim/libraries/HAL_Drivers/drv_spi.c
bsp/maxim/libraries/HAL_Drivers/drv_spi.c
+4
-4
bsp/maxim/libraries/HAL_Drivers/drv_spi.h
bsp/maxim/libraries/HAL_Drivers/drv_spi.h
+1
-1
bsp/microchip/common/applications/can_demo.c
bsp/microchip/common/applications/can_demo.c
+2
-2
bsp/microchip/common/board/sam_gmac.c
bsp/microchip/common/board/sam_gmac.c
+1
-1
bsp/microchip/common/board/sam_i2c.c
bsp/microchip/common/board/sam_i2c.c
+1
-1
bsp/n32/libraries/n32_drivers/drv_i2c.c
bsp/n32/libraries/n32_drivers/drv_i2c.c
+1
-1
bsp/n32g452xx/Libraries/rt_drivers/drv_spi.c
bsp/n32g452xx/Libraries/rt_drivers/drv_spi.c
+1
-1
bsp/n32g452xx/n32g452xx-mini-system/board/msp/n32_msp.c
bsp/n32g452xx/n32g452xx-mini-system/board/msp/n32_msp.c
+3
-3
bsp/nrf5x/libraries/drivers/drv_gpio.c
bsp/nrf5x/libraries/drivers/drv_gpio.c
+1
-1
bsp/nrf5x/libraries/drivers/drv_pwm.c
bsp/nrf5x/libraries/drivers/drv_pwm.c
+1
-1
bsp/nrf5x/libraries/drivers/drv_spi.c
bsp/nrf5x/libraries/drivers/drv_spi.c
+10
-10
bsp/nrf5x/libraries/drivers/drv_spi.h
bsp/nrf5x/libraries/drivers/drv_spi.h
+2
-2
bsp/nrf5x/libraries/drivers/drv_uart.c
bsp/nrf5x/libraries/drivers/drv_uart.c
+1
-1
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_i2c.c
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_i2c.c
+1
-1
bsp/nuvoton/libraries/m031/rtt_port/drv_adc.c
bsp/nuvoton/libraries/m031/rtt_port/drv_adc.c
+1
-1
bsp/nuvoton/libraries/m031/rtt_port/drv_bpwm_capture.c
bsp/nuvoton/libraries/m031/rtt_port/drv_bpwm_capture.c
+3
-3
bsp/nuvoton/libraries/m031/rtt_port/drv_gpio.c
bsp/nuvoton/libraries/m031/rtt_port/drv_gpio.c
+1
-1
bsp/nuvoton/libraries/m031/rtt_port/drv_i2c.c
bsp/nuvoton/libraries/m031/rtt_port/drv_i2c.c
+1
-1
bsp/nuvoton/libraries/m031/rtt_port/drv_pdma.c
bsp/nuvoton/libraries/m031/rtt_port/drv_pdma.c
+1
-1
bsp/nuvoton/libraries/m031/rtt_port/drv_pwm_capture.c
bsp/nuvoton/libraries/m031/rtt_port/drv_pwm_capture.c
+3
-3
bsp/nuvoton/libraries/m031/rtt_port/drv_timer.c
bsp/nuvoton/libraries/m031/rtt_port/drv_timer.c
+2
-2
bsp/nuvoton/libraries/m031/rtt_port/drv_timer_capture.c
bsp/nuvoton/libraries/m031/rtt_port/drv_timer_capture.c
+1
-1
bsp/nuvoton/libraries/m031/rtt_port/drv_uart.c
bsp/nuvoton/libraries/m031/rtt_port/drv_uart.c
+1
-1
bsp/nuvoton/libraries/m031/rtt_port/drv_ui2c.c
bsp/nuvoton/libraries/m031/rtt_port/drv_ui2c.c
+1
-1
bsp/nuvoton/libraries/m031/rtt_port/drv_uuart.c
bsp/nuvoton/libraries/m031/rtt_port/drv_uuart.c
+1
-1
bsp/nuvoton/libraries/m031/rtt_port/drv_wdt.c
bsp/nuvoton/libraries/m031/rtt_port/drv_wdt.c
+1
-1
bsp/nuvoton/libraries/m2354/rtt_port/drv_bpwm_capture.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_bpwm_capture.c
+3
-3
bsp/nuvoton/libraries/m2354/rtt_port/drv_eadc.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_eadc.c
+1
-1
bsp/nuvoton/libraries/m2354/rtt_port/drv_ecap.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_ecap.c
+3
-3
bsp/nuvoton/libraries/m2354/rtt_port/drv_epwm_capture.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_epwm_capture.c
+3
-3
bsp/nuvoton/libraries/m2354/rtt_port/drv_gpio.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_gpio.c
+1
-1
bsp/nuvoton/libraries/m2354/rtt_port/drv_i2c.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_i2c.c
+1
-1
bsp/nuvoton/libraries/m2354/rtt_port/drv_pdma.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_pdma.c
+1
-1
bsp/nuvoton/libraries/m2354/rtt_port/drv_qei.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_qei.c
+1
-1
bsp/nuvoton/libraries/m2354/rtt_port/drv_sdh.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_sdh.c
+3
-3
bsp/nuvoton/libraries/m2354/rtt_port/drv_timer.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_timer.c
+2
-2
bsp/nuvoton/libraries/m2354/rtt_port/drv_timer_capture.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_timer_capture.c
+1
-1
bsp/nuvoton/libraries/m2354/rtt_port/drv_uart.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_uart.c
+1
-1
bsp/nuvoton/libraries/m2354/rtt_port/drv_ui2c.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_ui2c.c
+1
-1
bsp/nuvoton/libraries/m2354/rtt_port/drv_uuart.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_uuart.c
+1
-1
bsp/nuvoton/libraries/m2354/rtt_port/drv_wdt.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_wdt.c
+1
-1
bsp/nuvoton/libraries/m460/rtt_port/drv_bpwm_capture.c
bsp/nuvoton/libraries/m460/rtt_port/drv_bpwm_capture.c
+1
-1
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_ecap.c
bsp/nuvoton/libraries/m460/rtt_port/drv_ecap.c
+1
-1
bsp/nuvoton/libraries/m460/rtt_port/drv_epwm_capture.c
bsp/nuvoton/libraries/m460/rtt_port/drv_epwm_capture.c
+1
-1
bsp/nuvoton/libraries/m460/rtt_port/drv_gpio.c
bsp/nuvoton/libraries/m460/rtt_port/drv_gpio.c
+1
-1
bsp/nuvoton/libraries/m460/rtt_port/drv_pdma.c
bsp/nuvoton/libraries/m460/rtt_port/drv_pdma.c
+3
-3
bsp/nuvoton/libraries/m460/rtt_port/drv_sdh.c
bsp/nuvoton/libraries/m460/rtt_port/drv_sdh.c
+3
-3
bsp/nuvoton/libraries/m460/rtt_port/drv_uart.c
bsp/nuvoton/libraries/m460/rtt_port/drv_uart.c
+1
-1
bsp/nuvoton/libraries/m460/rtt_port/drv_uuart.c
bsp/nuvoton/libraries/m460/rtt_port/drv_uuart.c
+1
-1
bsp/nuvoton/libraries/m460/rtt_port/drv_wdt.c
bsp/nuvoton/libraries/m460/rtt_port/drv_wdt.c
+1
-1
bsp/nuvoton/libraries/m480/rtt_port/drv_bpwm_capture.c
bsp/nuvoton/libraries/m480/rtt_port/drv_bpwm_capture.c
+3
-3
bsp/nuvoton/libraries/m480/rtt_port/drv_eadc.c
bsp/nuvoton/libraries/m480/rtt_port/drv_eadc.c
+1
-1
bsp/nuvoton/libraries/m480/rtt_port/drv_ecap.c
bsp/nuvoton/libraries/m480/rtt_port/drv_ecap.c
+3
-3
bsp/nuvoton/libraries/m480/rtt_port/drv_emac.c
bsp/nuvoton/libraries/m480/rtt_port/drv_emac.c
+1
-1
bsp/nuvoton/libraries/m480/rtt_port/drv_epwm_capture.c
bsp/nuvoton/libraries/m480/rtt_port/drv_epwm_capture.c
+3
-3
bsp/nuvoton/libraries/m480/rtt_port/drv_gpio.c
bsp/nuvoton/libraries/m480/rtt_port/drv_gpio.c
+1
-1
bsp/nuvoton/libraries/m480/rtt_port/drv_i2c.c
bsp/nuvoton/libraries/m480/rtt_port/drv_i2c.c
+1
-1
bsp/nuvoton/libraries/m480/rtt_port/drv_pdma.c
bsp/nuvoton/libraries/m480/rtt_port/drv_pdma.c
+1
-1
bsp/nuvoton/libraries/m480/rtt_port/drv_qei.c
bsp/nuvoton/libraries/m480/rtt_port/drv_qei.c
+1
-1
bsp/nuvoton/libraries/m480/rtt_port/drv_sdh.c
bsp/nuvoton/libraries/m480/rtt_port/drv_sdh.c
+3
-3
bsp/nuvoton/libraries/m480/rtt_port/drv_timer.c
bsp/nuvoton/libraries/m480/rtt_port/drv_timer.c
+2
-2
bsp/nuvoton/libraries/m480/rtt_port/drv_timer_capture.c
bsp/nuvoton/libraries/m480/rtt_port/drv_timer_capture.c
+1
-1
bsp/nuvoton/libraries/m480/rtt_port/drv_uart.c
bsp/nuvoton/libraries/m480/rtt_port/drv_uart.c
+1
-1
bsp/nuvoton/libraries/m480/rtt_port/drv_ui2c.c
bsp/nuvoton/libraries/m480/rtt_port/drv_ui2c.c
+1
-1
bsp/nuvoton/libraries/m480/rtt_port/drv_uuart.c
bsp/nuvoton/libraries/m480/rtt_port/drv_uuart.c
+1
-1
bsp/nuvoton/libraries/m480/rtt_port/drv_wdt.c
bsp/nuvoton/libraries/m480/rtt_port/drv_wdt.c
+1
-1
bsp/nuvoton/libraries/ma35/rtt_port/drv_adc.c
bsp/nuvoton/libraries/ma35/rtt_port/drv_adc.c
+1
-1
bsp/nuvoton/libraries/ma35/rtt_port/drv_ecap.c
bsp/nuvoton/libraries/ma35/rtt_port/drv_ecap.c
+1
-1
bsp/nuvoton/libraries/ma35/rtt_port/drv_epwm_capture.c
bsp/nuvoton/libraries/ma35/rtt_port/drv_epwm_capture.c
+1
-1
bsp/nuvoton/libraries/ma35/rtt_port/drv_gpio.c
bsp/nuvoton/libraries/ma35/rtt_port/drv_gpio.c
+1
-1
bsp/nuvoton/libraries/ma35/rtt_port/drv_pdma.c
bsp/nuvoton/libraries/ma35/rtt_port/drv_pdma.c
+2
-2
bsp/nuvoton/libraries/ma35/rtt_port/drv_uart.c
bsp/nuvoton/libraries/ma35/rtt_port/drv_uart.c
+1
-1
bsp/nuvoton/libraries/ma35/rtt_port/drv_wdt.c
bsp/nuvoton/libraries/ma35/rtt_port/drv_wdt.c
+1
-1
bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc.c
bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc.c
+1
-1
bsp/nuvoton/libraries/n9h30/rtt_port/drv_emac.c
bsp/nuvoton/libraries/n9h30/rtt_port/drv_emac.c
+2
-2
bsp/nuvoton/libraries/n9h30/rtt_port/drv_gpio.c
bsp/nuvoton/libraries/n9h30/rtt_port/drv_gpio.c
+1
-1
bsp/nuvoton/libraries/n9h30/rtt_port/drv_sdh.c
bsp/nuvoton/libraries/n9h30/rtt_port/drv_sdh.c
+5
-5
bsp/nuvoton/libraries/n9h30/rtt_port/drv_wdt.c
bsp/nuvoton/libraries/n9h30/rtt_port/drv_wdt.c
+1
-1
bsp/nuvoton/libraries/nu_packages/ADC_TOUCH/touch_sw.c
bsp/nuvoton/libraries/nu_packages/ADC_TOUCH/touch_sw.c
+2
-2
bsp/nuvoton/libraries/nu_packages/Demo/usbd_cdc_vcom_echo.c
bsp/nuvoton/libraries/nu_packages/Demo/usbd_cdc_vcom_echo.c
+1
-1
bsp/nuvoton/libraries/nu_packages/MAX31875/sensor_max31875.c
bsp/nuvoton/libraries/nu_packages/MAX31875/sensor_max31875.c
+1
-1
bsp/nuvoton/libraries/nuc980/rtt_port/drv_adc.c
bsp/nuvoton/libraries/nuc980/rtt_port/drv_adc.c
+1
-1
bsp/nuvoton/libraries/nuc980/rtt_port/drv_emac.c
bsp/nuvoton/libraries/nuc980/rtt_port/drv_emac.c
+2
-2
bsp/nuvoton/libraries/nuc980/rtt_port/drv_gpio.c
bsp/nuvoton/libraries/nuc980/rtt_port/drv_gpio.c
+1
-1
bsp/nuvoton/libraries/nuc980/rtt_port/drv_pdma.c
bsp/nuvoton/libraries/nuc980/rtt_port/drv_pdma.c
+2
-2
bsp/nuvoton/libraries/nuc980/rtt_port/drv_sdh.c
bsp/nuvoton/libraries/nuc980/rtt_port/drv_sdh.c
+5
-5
bsp/nuvoton/libraries/nuc980/rtt_port/drv_uart.c
bsp/nuvoton/libraries/nuc980/rtt_port/drv_uart.c
+1
-1
bsp/nuvoton/libraries/nuc980/rtt_port/drv_wdt.c
bsp/nuvoton/libraries/nuc980/rtt_port/drv_wdt.c
+1
-1
bsp/qemu-vexpress-a9/drivers/drv_keyboard.c
bsp/qemu-vexpress-a9/drivers/drv_keyboard.c
+2
-2
bsp/qemu-vexpress-a9/drivers/drv_mouse.c
bsp/qemu-vexpress-a9/drivers/drv_mouse.c
+2
-2
bsp/raspberry-pi/raspi3-32/applications/test_device.c
bsp/raspberry-pi/raspi3-32/applications/test_device.c
+5
-5
bsp/raspberry-pi/raspi3-32/driver/drv_sdio.c
bsp/raspberry-pi/raspi3-32/driver/drv_sdio.c
+3
-3
bsp/raspberry-pi/raspi3-32/driver/drv_spi.c
bsp/raspberry-pi/raspi3-32/driver/drv_spi.c
+2
-2
bsp/raspberry-pi/raspi3-64/driver/drv_sdio.c
bsp/raspberry-pi/raspi3-64/driver/drv_sdio.c
+3
-3
bsp/raspberry-pi/raspi3-64/driver/drv_spi.c
bsp/raspberry-pi/raspi3-64/driver/drv_spi.c
+2
-2
bsp/raspberry-pi/raspi4-32/driver/drv_bluetooth.c
bsp/raspberry-pi/raspi4-32/driver/drv_bluetooth.c
+12
-12
bsp/raspberry-pi/raspi4-32/driver/drv_dma.c
bsp/raspberry-pi/raspi4-32/driver/drv_dma.c
+1
-1
bsp/raspberry-pi/raspi4-32/driver/drv_eth.c
bsp/raspberry-pi/raspi4-32/driver/drv_eth.c
+1
-1
bsp/raspberry-pi/raspi4-32/driver/drv_sdio.c
bsp/raspberry-pi/raspi4-32/driver/drv_sdio.c
+2
-2
bsp/raspberry-pi/raspi4-32/driver/drv_spi.c
bsp/raspberry-pi/raspi4-32/driver/drv_spi.c
+2
-2
bsp/raspberry-pi/raspi4-64/driver/drv_eth.c
bsp/raspberry-pi/raspi4-64/driver/drv_eth.c
+1
-1
bsp/raspberry-pi/raspi4-64/driver/drv_sdio.c
bsp/raspberry-pi/raspi4-64/driver/drv_sdio.c
+2
-2
bsp/renesas/libraries/HAL_Drivers/drv_can.c
bsp/renesas/libraries/HAL_Drivers/drv_can.c
+2
-2
bsp/renesas/libraries/HAL_Drivers/drv_sdhi.c
bsp/renesas/libraries/HAL_Drivers/drv_sdhi.c
+4
-4
bsp/renesas/libraries/HAL_Drivers/drv_usart_v2.c
bsp/renesas/libraries/HAL_Drivers/drv_usart_v2.c
+1
-1
bsp/renesas/ra6m3-ek/board/ports/ili9341/lcd_ili9341.c
bsp/renesas/ra6m3-ek/board/ports/ili9341/lcd_ili9341.c
+1
-1
bsp/renesas/ra6m4-cpk/board/ports/ili9341/lcd_ili9341.c
bsp/renesas/ra6m4-cpk/board/ports/ili9341/lcd_ili9341.c
+1
-1
bsp/rx/drivers/uart.c
bsp/rx/drivers/uart.c
+3
-3
bsp/samd21/board/uart.c
bsp/samd21/board/uart.c
+1
-1
bsp/simulator/drivers/sd_sim.c
bsp/simulator/drivers/sd_sim.c
+1
-1
bsp/stm32/libraries/HAL_Drivers/drv_adc.c
bsp/stm32/libraries/HAL_Drivers/drv_adc.c
+1
-1
bsp/stm32/libraries/HAL_Drivers/drv_crypto.c
bsp/stm32/libraries/HAL_Drivers/drv_crypto.c
+1
-1
bsp/stm32/libraries/HAL_Drivers/drv_eth.c
bsp/stm32/libraries/HAL_Drivers/drv_eth.c
+1
-1
bsp/stm32/libraries/HAL_Drivers/drv_nand.c
bsp/stm32/libraries/HAL_Drivers/drv_nand.c
+1
-1
bsp/stm32/stm32f407-atk-explorer/board/ports/touch/drv_touch_ft.c
...2/stm32f407-atk-explorer/board/ports/touch/drv_touch_ft.c
+3
-3
bsp/stm32/stm32h743-atk-apollo/board/ports/drv_dcmi.c
bsp/stm32/stm32h743-atk-apollo/board/ports/drv_dcmi.c
+1
-1
bsp/stm32/stm32h743-atk-apollo/board/ports/drv_ov2640.c
bsp/stm32/stm32h743-atk-apollo/board/ports/drv_ov2640.c
+26
-26
bsp/stm32/stm32h743-openmv-h7plus/board/ports/drv_dcmi.c
bsp/stm32/stm32h743-openmv-h7plus/board/ports/drv_dcmi.c
+1
-1
bsp/stm32/stm32h743-openmv-h7plus/board/ports/drv_ov5640.c
bsp/stm32/stm32h743-openmv-h7plus/board/ports/drv_ov5640.c
+8
-8
bsp/stm32/stm32h750-artpi/board/port/drv_eth.c
bsp/stm32/stm32h750-artpi/board/port/drv_eth.c
+4
-4
bsp/stm32/stm32l4r9-st-eval/board/ports/drv_touch_ft.c
bsp/stm32/stm32l4r9-st-eval/board/ports/drv_touch_ft.c
+3
-3
bsp/stm32/stm32mp157a-st-discovery/board/ports/OpenAMP/drv_openamp.c
...tm32mp157a-st-discovery/board/ports/OpenAMP/drv_openamp.c
+5
-5
bsp/stm32/stm32mp157a-st-discovery/board/ports/audio/drv_cs42l51.c
.../stm32mp157a-st-discovery/board/ports/audio/drv_cs42l51.c
+3
-3
bsp/stm32/stm32mp157a-st-discovery/board/ports/audio/drv_mic.c
...tm32/stm32mp157a-st-discovery/board/ports/audio/drv_mic.c
+2
-2
bsp/stm32/stm32mp157a-st-discovery/board/ports/audio/drv_sound.c
...32/stm32mp157a-st-discovery/board/ports/audio/drv_sound.c
+3
-3
bsp/stm32/stm32mp157a-st-discovery/board/ports/crypto/crypto_sample.c
...m32mp157a-st-discovery/board/ports/crypto/crypto_sample.c
+1
-1
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_eth.c
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_eth.c
+1
-1
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_pmic.c
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_pmic.c
+4
-4
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_pwr.c
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_pwr.c
+2
-2
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_rs485.c
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_rs485.c
+2
-2
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_sdio.c
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_sdio.c
+1
-1
bsp/stm32/stm32mp157a-st-discovery/board/ports/spi_sample.c
bsp/stm32/stm32mp157a-st-discovery/board/ports/spi_sample.c
+1
-1
bsp/stm32/stm32mp157a-st-discovery/board/ports/timer_sample.c
...stm32/stm32mp157a-st-discovery/board/ports/timer_sample.c
+5
-5
bsp/stm32/stm32mp157a-st-ev1/board/ports/OpenAMP/drv_openamp.c
...tm32/stm32mp157a-st-ev1/board/ports/OpenAMP/drv_openamp.c
+5
-5
bsp/stm32/stm32mp157a-st-ev1/board/ports/crypto_sample.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/crypto_sample.c
+1
-1
bsp/stm32/stm32mp157a-st-ev1/board/ports/dma_sample.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/dma_sample.c
+2
-2
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_dcmi.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_dcmi.c
+1
-1
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_dfsdm.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_dfsdm.c
+11
-11
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_emmc.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_emmc.c
+1
-1
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_fdcan.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_fdcan.c
+4
-4
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_mfx.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_mfx.c
+3
-3
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_nand.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_nand.c
+5
-5
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_ov5640.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_ov5640.c
+8
-8
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_pmic.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_pmic.c
+3
-3
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_pwr.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_pwr.c
+2
-2
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_rs485.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_rs485.c
+2
-2
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_sdcard.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_sdcard.c
+7
-7
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_sound.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_sound.c
+4
-4
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_spdifrx.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_spdifrx.c
+3
-3
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_wm8994.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_wm8994.c
+4
-4
bsp/stm32/stm32mp157a-st-ev1/board/ports/eth/drv_eth.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/eth/drv_eth.c
+1
-1
bsp/stm32/stm32mp157a-st-ev1/board/ports/spi_sample.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/spi_sample.c
+1
-1
bsp/stm32/stm32mp157a-st-ev1/board/ports/timer_sample.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/timer_sample.c
+5
-5
bsp/synopsys/boards/drivers/rt_board.c
bsp/synopsys/boards/drivers/rt_board.c
+6
-6
bsp/synwit/swm320/applications/main.c
bsp/synwit/swm320/applications/main.c
+9
-9
bsp/synwit/swm320/drivers/drv_spi.c
bsp/synwit/swm320/drivers/drv_spi.c
+1
-1
bsp/synwit/swm341/applications/main.c
bsp/synwit/swm341/applications/main.c
+9
-9
bsp/synwit/swm341/drivers/drv_spi.c
bsp/synwit/swm341/drivers/drv_spi.c
+1
-1
bsp/w60x/drivers/drv_adc.c
bsp/w60x/drivers/drv_adc.c
+2
-2
bsp/w60x/drivers/drv_i2c.c
bsp/w60x/drivers/drv_i2c.c
+1
-1
bsp/w60x/drivers/drv_pwm.c
bsp/w60x/drivers/drv_pwm.c
+3
-3
bsp/w60x/drivers/drv_wifi.c
bsp/w60x/drivers/drv_wifi.c
+2
-2
components/drivers/include/drivers/usb_host.h
components/drivers/include/drivers/usb_host.h
+1
-1
components/drivers/ipc/dataqueue.c
components/drivers/ipc/dataqueue.c
+2
-2
components/drivers/misc/rt_drv_pwm.c
components/drivers/misc/rt_drv_pwm.c
+2
-2
components/drivers/rtc/alarm.c
components/drivers/rtc/alarm.c
+4
-4
components/drivers/spi/spi_msd.c
components/drivers/spi/spi_msd.c
+17
-17
components/drivers/tty/console.c
components/drivers/tty/console.c
+1
-1
components/drivers/usb/usbdevice/class/cdc_vcom.c
components/drivers/usb/usbdevice/class/cdc_vcom.c
+1
-1
components/drivers/usb/usbdevice/core/usbdevice.c
components/drivers/usb/usbdevice/core/usbdevice.c
+2
-2
components/drivers/usb/usbdevice/core/usbdevice_core.c
components/drivers/usb/usbdevice/core/usbdevice_core.c
+1
-1
components/drivers/usb/usbhost/core/hub.c
components/drivers/usb/usbhost/core/hub.c
+2
-2
components/drivers/usb/usbhost/core/usbhost_core.c
components/drivers/usb/usbhost/core/usbhost_core.c
+8
-8
components/utilities/rt-link/src/rtlink_dev.c
components/utilities/rt-link/src/rtlink_dev.c
+1
-1
components/utilities/zmodem/rz.c
components/utilities/zmodem/rz.c
+1
-1
components/utilities/zmodem/sz.c
components/utilities/zmodem/sz.c
+1
-1
components/vbus/prio_queue.c
components/vbus/prio_queue.c
+1
-1
documentation/device/adc/adc.md
documentation/device/adc/adc.md
+1
-1
documentation/device/device.md
documentation/device/device.md
+1
-1
documentation/device/hwtimer/hwtimer.md
documentation/device/hwtimer/hwtimer.md
+2
-2
documentation/device/pwm/pwm.md
documentation/device/pwm/pwm.md
+1
-1
documentation/device/uart/uart.md
documentation/device/uart/uart.md
+4
-4
documentation/device/watchdog/watchdog.md
documentation/device/watchdog/watchdog.md
+3
-3
examples/rt-link/rtlink_dev_example.c
examples/rt-link/rtlink_dev_example.c
+4
-3
examples/test/device_test.c
examples/test/device_test.c
+3
-3
examples/test/rtc_test.c
examples/test/rtc_test.c
+2
-2
examples/utest/testcases/kernel/thread_tc.c
examples/utest/testcases/kernel/thread_tc.c
+2
-2
src/mempool.c
src/mempool.c
+2
-2
src/timer.c
src/timer.c
+1
-1
未找到文件。
bsp/Infineon/libraries/HAL_Drivers/drv_hwtimer.c
浏览文件 @
0f461e87
...
@@ -198,7 +198,7 @@ static rt_err_t timer_ctrl(rt_hwtimer_t *timer, rt_uint32_t cmd, void *arg)
...
@@ -198,7 +198,7 @@ static rt_err_t timer_ctrl(rt_hwtimer_t *timer, rt_uint32_t cmd, void *arg)
if
(
result
!=
CY_RSLT_SUCCESS
)
if
(
result
!=
CY_RSLT_SUCCESS
)
{
{
LOG_E
(
"cyhal_timer_set_frequency error
\r\n
"
);
LOG_E
(
"cyhal_timer_set_frequency error
\r\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
}
}
break
;
break
;
...
@@ -301,7 +301,7 @@ int hwtimer_sample()
...
@@ -301,7 +301,7 @@ int hwtimer_sample()
if
(
hw_dev
==
RT_NULL
)
if
(
hw_dev
==
RT_NULL
)
{
{
rt_kprintf
(
"hwtimer sample run failed! can't find %s device!
\n
"
,
HWTIMER_DEV_NAME
);
rt_kprintf
(
"hwtimer sample run failed! can't find %s device!
\n
"
,
HWTIMER_DEV_NAME
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
ret
=
rt_device_open
(
hw_dev
,
RT_DEVICE_OFLAG_RDWR
);
ret
=
rt_device_open
(
hw_dev
,
RT_DEVICE_OFLAG_RDWR
);
...
@@ -329,7 +329,7 @@ int hwtimer_sample()
...
@@ -329,7 +329,7 @@ int hwtimer_sample()
if
(
rt_device_write
(
hw_dev
,
0
,
&
timeout_s
,
sizeof
(
timeout_s
))
!=
sizeof
(
timeout_s
))
if
(
rt_device_write
(
hw_dev
,
0
,
&
timeout_s
,
sizeof
(
timeout_s
))
!=
sizeof
(
timeout_s
))
{
{
rt_kprintf
(
"set timeout value failed
\n
"
);
rt_kprintf
(
"set timeout value failed
\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
while
(
1
)
while
(
1
)
...
...
bsp/Infineon/libraries/HAL_Drivers/drv_pwm.c
浏览文件 @
0f461e87
...
@@ -243,7 +243,7 @@ static int pwm_sample(int argc, char *argv[])
...
@@ -243,7 +243,7 @@ static int pwm_sample(int argc, char *argv[])
if
(
pwm_dev
==
RT_NULL
)
if
(
pwm_dev
==
RT_NULL
)
{
{
rt_kprintf
(
"pwm sample run failed! can't find %s device!
\n
"
,
PWM_DEV_NAME
);
rt_kprintf
(
"pwm sample run failed! can't find %s device!
\n
"
,
PWM_DEV_NAME
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
rt_pwm_set
(
pwm_dev
,
PWM_DEV_CHANNEL
,
period
,
pulse
);
rt_pwm_set
(
pwm_dev
,
PWM_DEV_CHANNEL
,
period
,
pulse
);
...
...
bsp/Infineon/libraries/HAL_Drivers/drv_rtc.c
浏览文件 @
0f461e87
...
@@ -153,7 +153,7 @@ static int rt_hw_rtc_init(void)
...
@@ -153,7 +153,7 @@ static int rt_hw_rtc_init(void)
if
(
rt_hw_rtc_register
(
&
ifx32_rtc_dev
,
"rtc"
,
RT_DEVICE_FLAG_RDWR
,
RT_NULL
)
!=
RT_EOK
)
if
(
rt_hw_rtc_register
(
&
ifx32_rtc_dev
,
"rtc"
,
RT_DEVICE_FLAG_RDWR
,
RT_NULL
)
!=
RT_EOK
)
{
{
LOG_E
(
"rtc init failed"
);
LOG_E
(
"rtc init failed"
);
result
=
RT_ERROR
;
result
=
-
RT_ERROR
;
}
}
else
else
{
{
...
...
bsp/Infineon/libraries/HAL_Drivers/drv_spi.c
浏览文件 @
0f461e87
...
@@ -60,7 +60,7 @@ static void ifx_spi_init(struct ifx_spi *ifx_spi)
...
@@ -60,7 +60,7 @@ static void ifx_spi_init(struct ifx_spi *ifx_spi)
result
=
cyhal_spi_init
(
ifx_spi
->
spi_obj
,
ifx_spi
->
mosi_pin
,
ifx_spi
->
miso_pin
,
ifx_spi
->
sck_pin
,
result
=
cyhal_spi_init
(
ifx_spi
->
spi_obj
,
ifx_spi
->
mosi_pin
,
ifx_spi
->
miso_pin
,
ifx_spi
->
sck_pin
,
NC
,
NULL
,
ifx_spi
->
spi_obj
->
data_bits
,
ifx_spi
->
spi_obj
->
mode
,
false
);
NC
,
NULL
,
ifx_spi
->
spi_obj
->
data_bits
,
ifx_spi
->
spi_obj
->
mode
,
false
);
RT_ASSERT
(
result
!=
RT_ERROR
);
RT_ASSERT
(
result
==
RT_EOK
);
rt_kprintf
(
"[%s] Freq:[%d]HZ
\n
"
,
ifx_spi
->
bus_name
,
ifx_spi
->
freq
);
rt_kprintf
(
"[%s] Freq:[%d]HZ
\n
"
,
ifx_spi
->
bus_name
,
ifx_spi
->
freq
);
...
...
bsp/Infineon/libraries/HAL_Drivers/drv_uart.c
浏览文件 @
0f461e87
...
@@ -182,7 +182,7 @@ static rt_err_t ifx_configure(struct rt_serial_device *serial, struct serial_con
...
@@ -182,7 +182,7 @@ static rt_err_t ifx_configure(struct rt_serial_device *serial, struct serial_con
result
=
cyhal_uart_set_baud
(
uart
->
config
->
uart_obj
,
cfg
->
baud_rate
,
NULL
);
result
=
cyhal_uart_set_baud
(
uart
->
config
->
uart_obj
,
cfg
->
baud_rate
,
NULL
);
}
}
RT_ASSERT
(
result
!=
RT_ERROR
);
RT_ASSERT
(
result
==
RT_EOK
);
return
RT_EOK
;
return
RT_EOK
;
}
}
...
...
bsp/Infineon/libraries/HAL_Drivers/drv_wdt.c
浏览文件 @
0f461e87
...
@@ -60,7 +60,7 @@ static rt_err_t wdt_control(rt_watchdog_t *wdt_device, int cmd, void *arg)
...
@@ -60,7 +60,7 @@ static rt_err_t wdt_control(rt_watchdog_t *wdt_device, int cmd, void *arg)
/* Initialize the WDT */
/* Initialize the WDT */
int
result
=
cyhal_wdt_init
(
cfg
->
WDTx
,
(
rt_uint32_t
)
timeout_ms
);
int
result
=
cyhal_wdt_init
(
cfg
->
WDTx
,
(
rt_uint32_t
)
timeout_ms
);
/* WDT initialization failed. Stop program execution */
/* WDT initialization failed. Stop program execution */
RT_ASSERT
(
result
!=
RT_ERROR
);
RT_ASSERT
(
result
==
RT_EOK
);
}
}
break
;
break
;
...
...
bsp/Infineon/libraries/templates/PSOC62/board/ports/slider_sample.c
浏览文件 @
0f461e87
...
@@ -234,7 +234,7 @@ int Slider_ctrl_sample(void)
...
@@ -234,7 +234,7 @@ int Slider_ctrl_sample(void)
}
}
else
else
{
{
ret
=
RT_ERROR
;
ret
=
-
RT_ERROR
;
}
}
return
ret
;
return
ret
;
...
...
bsp/Infineon/libraries/templates/PSOC62/board/ports/spi_sample.c
浏览文件 @
0f461e87
...
@@ -32,7 +32,7 @@ static int rt_spi_device_init(void)
...
@@ -32,7 +32,7 @@ static int rt_spi_device_init(void)
if
(
RT_NULL
==
spi_dev
)
if
(
RT_NULL
==
spi_dev
)
{
{
rt_kprintf
(
"spi sample run failed! can't find %s device!
\n
"
,
SPI_NAME
);
rt_kprintf
(
"spi sample run failed! can't find %s device!
\n
"
,
SPI_NAME
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
rt_spi_configure
(
spi_dev
,
&
cfg
);
rt_spi_configure
(
spi_dev
,
&
cfg
);
...
...
bsp/Infineon/psoc6-cy8ckit-062-BLE/board/ports/slider_sample.c
浏览文件 @
0f461e87
...
@@ -234,7 +234,7 @@ int Slider_ctrl_sample(void)
...
@@ -234,7 +234,7 @@ int Slider_ctrl_sample(void)
}
}
else
else
{
{
ret
=
RT_ERROR
;
ret
=
-
RT_ERROR
;
}
}
return
ret
;
return
ret
;
...
...
bsp/Infineon/psoc6-cy8ckit-062-BLE/board/ports/spi_sample.c
浏览文件 @
0f461e87
...
@@ -32,7 +32,7 @@ static int rt_spi_device_init(void)
...
@@ -32,7 +32,7 @@ static int rt_spi_device_init(void)
if
(
RT_NULL
==
spi_dev
)
if
(
RT_NULL
==
spi_dev
)
{
{
rt_kprintf
(
"spi sample run failed! can't find %s device!
\n
"
,
SPI_NAME
);
rt_kprintf
(
"spi sample run failed! can't find %s device!
\n
"
,
SPI_NAME
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
rt_spi_configure
(
spi_dev
,
&
cfg
);
rt_spi_configure
(
spi_dev
,
&
cfg
);
...
...
bsp/Infineon/psoc6-cy8ckit-062-WIFI-BT/board/ports/slider_sample.c
浏览文件 @
0f461e87
...
@@ -234,7 +234,7 @@ int Slider_ctrl_sample(void)
...
@@ -234,7 +234,7 @@ int Slider_ctrl_sample(void)
}
}
else
else
{
{
ret
=
RT_ERROR
;
ret
=
-
RT_ERROR
;
}
}
return
ret
;
return
ret
;
...
...
bsp/Infineon/psoc6-cy8ckit-062-WIFI-BT/board/ports/spi_sample.c
浏览文件 @
0f461e87
...
@@ -32,7 +32,7 @@ static int rt_spi_device_init(void)
...
@@ -32,7 +32,7 @@ static int rt_spi_device_init(void)
if
(
RT_NULL
==
spi_dev
)
if
(
RT_NULL
==
spi_dev
)
{
{
rt_kprintf
(
"spi sample run failed! can't find %s device!
\n
"
,
SPI_NAME
);
rt_kprintf
(
"spi sample run failed! can't find %s device!
\n
"
,
SPI_NAME
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
rt_spi_configure
(
spi_dev
,
&
cfg
);
rt_spi_configure
(
spi_dev
,
&
cfg
);
...
...
bsp/Infineon/psoc6-cy8ckit-062S2-43012/board/ports/slider_sample.c
浏览文件 @
0f461e87
...
@@ -235,7 +235,7 @@ int Slider_ctrl_sample(void)
...
@@ -235,7 +235,7 @@ int Slider_ctrl_sample(void)
}
}
else
else
{
{
ret
=
RT_ERROR
;
ret
=
-
RT_ERROR
;
}
}
return
ret
;
return
ret
;
...
...
bsp/Infineon/psoc6-cy8ckit-062S2-43012/board/ports/spi_sample.c
浏览文件 @
0f461e87
...
@@ -32,7 +32,7 @@ static int rt_spi_device_init(void)
...
@@ -32,7 +32,7 @@ static int rt_spi_device_init(void)
if
(
RT_NULL
==
spi_dev
)
if
(
RT_NULL
==
spi_dev
)
{
{
rt_kprintf
(
"spi sample run failed! can't find %s device!
\n
"
,
SPI_NAME
);
rt_kprintf
(
"spi sample run failed! can't find %s device!
\n
"
,
SPI_NAME
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
rt_spi_configure
(
spi_dev
,
&
cfg
);
rt_spi_configure
(
spi_dev
,
&
cfg
);
...
...
bsp/Infineon/psoc6-cy8ckit-062s4/board/ports/slider_sample.c
浏览文件 @
0f461e87
...
@@ -234,7 +234,7 @@ int Slider_ctrl_sample(void)
...
@@ -234,7 +234,7 @@ int Slider_ctrl_sample(void)
}
}
else
else
{
{
ret
=
RT_ERROR
;
ret
=
-
RT_ERROR
;
}
}
return
ret
;
return
ret
;
...
...
bsp/Infineon/psoc6-cy8ckit-062s4/board/ports/spi_sample.c
浏览文件 @
0f461e87
...
@@ -32,7 +32,7 @@ static int rt_spi_device_init(void)
...
@@ -32,7 +32,7 @@ static int rt_spi_device_init(void)
if
(
RT_NULL
==
spi_dev
)
if
(
RT_NULL
==
spi_dev
)
{
{
rt_kprintf
(
"spi sample run failed! can't find %s device!
\n
"
,
SPI_NAME
);
rt_kprintf
(
"spi sample run failed! can't find %s device!
\n
"
,
SPI_NAME
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
rt_spi_configure
(
spi_dev
,
&
cfg
);
rt_spi_configure
(
spi_dev
,
&
cfg
);
...
...
bsp/Infineon/psoc6-cy8cproto-062S3-4343W/board/ports/slider_sample.c
浏览文件 @
0f461e87
...
@@ -235,7 +235,7 @@ int Slider_ctrl_sample(void)
...
@@ -235,7 +235,7 @@ int Slider_ctrl_sample(void)
}
}
else
else
{
{
ret
=
RT_ERROR
;
ret
=
-
RT_ERROR
;
}
}
return
ret
;
return
ret
;
...
...
bsp/Infineon/psoc6-cy8cproto-062S3-4343W/board/ports/spi_sample.c
浏览文件 @
0f461e87
...
@@ -32,7 +32,7 @@ static int rt_spi_device_init(void)
...
@@ -32,7 +32,7 @@ static int rt_spi_device_init(void)
if
(
RT_NULL
==
spi_dev
)
if
(
RT_NULL
==
spi_dev
)
{
{
rt_kprintf
(
"spi sample run failed! can't find %s device!
\n
"
,
SPI_NAME
);
rt_kprintf
(
"spi sample run failed! can't find %s device!
\n
"
,
SPI_NAME
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
rt_spi_configure
(
spi_dev
,
&
cfg
);
rt_spi_configure
(
spi_dev
,
&
cfg
);
...
...
bsp/Infineon/psoc6-evaluationkit-062S2/board/ports/slider_sample.c
浏览文件 @
0f461e87
...
@@ -235,7 +235,7 @@ int Slider_ctrl_sample(void)
...
@@ -235,7 +235,7 @@ int Slider_ctrl_sample(void)
}
}
else
else
{
{
ret
=
RT_ERROR
;
ret
=
-
RT_ERROR
;
}
}
return
ret
;
return
ret
;
...
...
bsp/Infineon/psoc6-evaluationkit-062S2/board/ports/spi_sample.c
浏览文件 @
0f461e87
...
@@ -32,7 +32,7 @@ static int rt_spi_device_init(void)
...
@@ -32,7 +32,7 @@ static int rt_spi_device_init(void)
if
(
RT_NULL
==
spi_dev
)
if
(
RT_NULL
==
spi_dev
)
{
{
rt_kprintf
(
"spi sample run failed! can't find %s device!
\n
"
,
SPI_NAME
);
rt_kprintf
(
"spi sample run failed! can't find %s device!
\n
"
,
SPI_NAME
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
rt_spi_configure
(
spi_dev
,
&
cfg
);
rt_spi_configure
(
spi_dev
,
&
cfg
);
...
...
bsp/airm2m/air105/board/wdt_feed.c
浏览文件 @
0f461e87
...
@@ -30,14 +30,14 @@ static int wdt_feed_init(void)
...
@@ -30,14 +30,14 @@ static int wdt_feed_init(void)
if
(
!
wdg_dev
)
if
(
!
wdg_dev
)
{
{
rt_kprintf
(
"find %s failed!
\n
"
,
device_name
);
rt_kprintf
(
"find %s failed!
\n
"
,
device_name
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
ret
=
rt_device_control
(
wdg_dev
,
RT_DEVICE_CTRL_WDT_SET_TIMEOUT
,
&
timeout
);
ret
=
rt_device_control
(
wdg_dev
,
RT_DEVICE_CTRL_WDT_SET_TIMEOUT
,
&
timeout
);
if
(
ret
!=
RT_EOK
)
if
(
ret
!=
RT_EOK
)
{
{
rt_kprintf
(
"set %s timeout failed!
\n
"
,
device_name
);
rt_kprintf
(
"set %s timeout failed!
\n
"
,
device_name
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
ret
=
rt_device_control
(
wdg_dev
,
RT_DEVICE_CTRL_WDT_START
,
RT_NULL
);
ret
=
rt_device_control
(
wdg_dev
,
RT_DEVICE_CTRL_WDT_START
,
RT_NULL
);
if
(
ret
!=
RT_EOK
)
if
(
ret
!=
RT_EOK
)
...
...
bsp/airm2m/air105/libraries/rt_drivers/drv_i2c.c
浏览文件 @
0f461e87
...
@@ -85,7 +85,7 @@ static rt_ssize_t air105_i2c_slv_xfer(struct rt_i2c_bus_device *bus,
...
@@ -85,7 +85,7 @@ static rt_ssize_t air105_i2c_slv_xfer(struct rt_i2c_bus_device *bus,
struct
rt_i2c_msg
msgs
[],
struct
rt_i2c_msg
msgs
[],
rt_uint32_t
num
)
rt_uint32_t
num
)
{
{
return
RT_ERROR
;
return
-
RT_ENOSYS
;
}
}
static
rt_err_t
air105_i2c_bus_control
(
struct
rt_i2c_bus_device
*
bus
,
static
rt_err_t
air105_i2c_bus_control
(
struct
rt_i2c_bus_device
*
bus
,
rt_uint32_t
cmd
,
rt_uint32_t
cmd
,
...
...
bsp/airm2m/air105/libraries/rt_drivers/drv_usart_v2.c
浏览文件 @
0f461e87
...
@@ -232,7 +232,7 @@ static rt_err_t air105_control(struct rt_serial_device *serial, int cmd, void *a
...
@@ -232,7 +232,7 @@ static rt_err_t air105_control(struct rt_serial_device *serial, int cmd, void *a
}
}
break
;
break
;
default:
default:
return
RT_ERROR
;
return
-
RT_EINVAL
;
}
}
return
RT_EOK
;
return
RT_EOK
;
...
...
bsp/allwinner/libraries/drivers/drv_pin.c
浏览文件 @
0f461e87
...
@@ -51,7 +51,7 @@ static rt_err_t hal_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
...
@@ -51,7 +51,7 @@ static rt_err_t hal_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
rt_kprintf
(
"gpio to irq error, irq num:%lu error num: %d"
,
irq
,
ret
);
rt_kprintf
(
"gpio to irq error, irq num:%lu error num: %d"
,
irq
,
ret
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
level
=
rt_hw_interrupt_disable
();
level
=
rt_hw_interrupt_disable
();
...
@@ -61,7 +61,7 @@ static rt_err_t hal_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
...
@@ -61,7 +61,7 @@ static rt_err_t hal_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
{
{
rt_hw_interrupt_enable
(
level
);
rt_hw_interrupt_enable
(
level
);
rt_kprintf
(
"request irq error, irq num:%lu error num: %d"
,
irq
,
ret
);
rt_kprintf
(
"request irq error, irq num:%lu error num: %d"
,
irq
,
ret
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
rt_hw_interrupt_enable
(
level
);
rt_hw_interrupt_enable
(
level
);
...
@@ -78,7 +78,7 @@ static rt_err_t hal_pin_detach_irq(struct rt_device *device, rt_int32_t pin)
...
@@ -78,7 +78,7 @@ static rt_err_t hal_pin_detach_irq(struct rt_device *device, rt_int32_t pin)
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
rt_kprintf
(
"gpio to irq error, irq num:%lu error num: %d"
,
irq
,
ret
);
rt_kprintf
(
"gpio to irq error, irq num:%lu error num: %d"
,
irq
,
ret
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
level
=
rt_hw_interrupt_disable
();
level
=
rt_hw_interrupt_disable
();
...
@@ -87,7 +87,7 @@ static rt_err_t hal_pin_detach_irq(struct rt_device *device, rt_int32_t pin)
...
@@ -87,7 +87,7 @@ static rt_err_t hal_pin_detach_irq(struct rt_device *device, rt_int32_t pin)
{
{
rt_hw_interrupt_enable
(
level
);
rt_hw_interrupt_enable
(
level
);
rt_kprintf
(
"free irq error, error num: %d"
,
ret
);
rt_kprintf
(
"free irq error, error num: %d"
,
ret
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
RT_EOK
;
return
RT_EOK
;
}
}
...
@@ -101,7 +101,7 @@ static rt_err_t hal_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_u
...
@@ -101,7 +101,7 @@ static rt_err_t hal_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_u
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
rt_kprintf
(
"gpio to irq error, irq num:%lu error num: %d"
,
irq
,
ret
);
rt_kprintf
(
"gpio to irq error, irq num:%lu error num: %d"
,
irq
,
ret
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
if
(
enabled
==
PIN_IRQ_ENABLE
)
if
(
enabled
==
PIN_IRQ_ENABLE
)
...
@@ -110,7 +110,7 @@ static rt_err_t hal_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_u
...
@@ -110,7 +110,7 @@ static rt_err_t hal_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_u
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
rt_kprintf
(
"request irq error, error num: %d"
,
ret
);
rt_kprintf
(
"request irq error, error num: %d"
,
ret
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
}
}
else
else
...
@@ -119,7 +119,7 @@ static rt_err_t hal_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_u
...
@@ -119,7 +119,7 @@ static rt_err_t hal_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_u
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
rt_kprintf
(
"disable irq error, irq num:%lu, error num: %d"
,
irq
,
ret
);
rt_kprintf
(
"disable irq error, irq num:%lu, error num: %d"
,
irq
,
ret
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
}
}
...
...
bsp/allwinner/libraries/sunxi-hal/hal/source/gmac/hal_geth.c
浏览文件 @
0f461e87
...
@@ -262,7 +262,7 @@ int is_enough_desc_available(struct dma_desc *entry)
...
@@ -262,7 +262,7 @@ int is_enough_desc_available(struct dma_desc *entry)
if
(
desc
->
desc0
.
tx
.
own
!=
0
)
if
(
desc
->
desc0
.
tx
.
own
!=
0
)
{
{
printf
(
"desc %08x desc0 %08x desc1 %08x
\n
"
,
desc
,
desc
->
desc0
,
desc
->
desc1
);
printf
(
"desc %08x desc0 %08x desc1 %08x
\n
"
,
desc
,
desc
->
desc0
,
desc
->
desc1
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
RT_EOK
;
return
RT_EOK
;
...
@@ -284,7 +284,7 @@ int wait_tx_completed(struct dma_desc *entry)
...
@@ -284,7 +284,7 @@ int wait_tx_completed(struct dma_desc *entry)
if
(
timeout_cnt
>
1000
)
if
(
timeout_cnt
>
1000
)
{
{
printf
(
"emac send data timeout
\n
"
);
printf
(
"emac send data timeout
\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
}
}
desc_tag_clean
(
desc
);
desc_tag_clean
(
desc
);
...
@@ -307,13 +307,13 @@ static rt_err_t rt_geth_xmit(rt_device_t dev, struct pbuf *p)
...
@@ -307,13 +307,13 @@ static rt_err_t rt_geth_xmit(rt_device_t dev, struct pbuf *p)
unsigned
int
i
=
0
;
unsigned
int
i
=
0
;
unsigned
int
copy_offset
=
0
;
unsigned
int
copy_offset
=
0
;
if
(
!
rt_geth_dev
.
phy_link_status
)
return
RT_ERROR
;
if
(
!
rt_geth_dev
.
phy_link_status
)
return
-
RT_ERROR
;
first
=
rt_geth_dev
.
get_buffer_config
.
dma_desc_tx
+
tx_dirty
;
first
=
rt_geth_dev
.
get_buffer_config
.
dma_desc_tx
+
tx_dirty
;
ret
=
is_enough_desc_available
(
first
);
ret
=
is_enough_desc_available
(
first
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
copy_offset
=
0
;
copy_offset
=
0
;
...
@@ -326,7 +326,7 @@ static rt_err_t rt_geth_xmit(rt_device_t dev, struct pbuf *p)
...
@@ -326,7 +326,7 @@ static rt_err_t rt_geth_xmit(rt_device_t dev, struct pbuf *p)
if
(
copy_offset
>=
((
1
<<
11
)
-
1
))
if
(
copy_offset
>=
((
1
<<
11
)
-
1
))
{
{
printf
(
"send data exceed max len copy_offset %d
\n
"
,
copy_offset
);
printf
(
"send data exceed max len copy_offset %d
\n
"
,
copy_offset
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
}
}
...
...
bsp/allwinner_tina/drivers/drv_clock.c
浏览文件 @
0f461e87
...
@@ -230,7 +230,7 @@ rt_err_t cpu_set_pll_clk(int clk)
...
@@ -230,7 +230,7 @@ rt_err_t cpu_set_pll_clk(int clk)
//PLL1 rate = ((24000000 * n * k) >> 0) / m (p is ignored)
//PLL1 rate = ((24000000 * n * k) >> 0) / m (p is ignored)
CCU
->
pll_cpu_ctrl
=
(
0x1
<<
31
)
|
(
m
<<
0
)
|
(
k
<<
4
)
|
(
n
<<
8
)
|
(
p
<<
16
);
CCU
->
pll_cpu_ctrl
=
(
0x1
<<
31
)
|
(
m
<<
0
)
|
(
k
<<
4
)
|
(
n
<<
8
)
|
(
p
<<
16
);
if
(
wait_pll_stable
((
rt_uint32_t
)(
&
CCU
->
pll_cpu_ctrl
)))
if
(
wait_pll_stable
((
rt_uint32_t
)(
&
CCU
->
pll_cpu_ctrl
)))
return
RT_ERROR
;
return
-
RT_ERROR
;
CCU
->
cpu_clk_src
=
cpu_src
<<
16
;
CCU
->
cpu_clk_src
=
cpu_src
<<
16
;
...
@@ -267,7 +267,7 @@ rt_err_t audio_set_pll_clk(int clk)
...
@@ -267,7 +267,7 @@ rt_err_t audio_set_pll_clk(int clk)
n
=
clk
/
n_temp
;
n
=
clk
/
n_temp
;
m
=
_24MHZ_
*
2
/
m_temp
;
m
=
_24MHZ_
*
2
/
m_temp
;
if
((
n
>
128
)
||
(
m
>
32
)
||
(
clk
!=
(
_24MHZ_
*
n
*
2
)
/
m
))
if
((
n
>
128
)
||
(
m
>
32
)
||
(
clk
!=
(
_24MHZ_
*
n
*
2
)
/
m
))
return
RT_ERROR
;
return
-
RT_ERROR
;
CCU
->
pll_audio_ctrl
&=
~
(
0x1
<<
31
);
CCU
->
pll_audio_ctrl
&=
~
(
0x1
<<
31
);
n
=
(
n
-
1
)
&
0x7f
;
n
=
(
n
-
1
)
&
0x7f
;
...
@@ -276,7 +276,7 @@ rt_err_t audio_set_pll_clk(int clk)
...
@@ -276,7 +276,7 @@ rt_err_t audio_set_pll_clk(int clk)
CCU
->
pll_audio_ctrl
=
(
0x1
<<
31
)
|
(
0x0
<<
24
)
|
(
n
<<
8
)
|
m
;
CCU
->
pll_audio_ctrl
=
(
0x1
<<
31
)
|
(
0x0
<<
24
)
|
(
n
<<
8
)
|
m
;
if
(
wait_pll_stable
((
rt_uint32_t
)(
&
CCU
->
pll_audio_ctrl
)))
if
(
wait_pll_stable
((
rt_uint32_t
)(
&
CCU
->
pll_audio_ctrl
)))
return
RT_ERROR
;
return
-
RT_ERROR
;
else
else
return
RT_EOK
;
return
RT_EOK
;
}
}
...
@@ -312,7 +312,7 @@ rt_err_t video_set_pll_clk(int clk)
...
@@ -312,7 +312,7 @@ rt_err_t video_set_pll_clk(int clk)
m
=
_24MHZ_
/
m_temp
;
m
=
_24MHZ_
/
m_temp
;
if
((
n
>
128
)
||
(
m
>
16
)
||
(
clk
!=
(
_24MHZ_
*
n
)
/
m
))
if
((
n
>
128
)
||
(
m
>
16
)
||
(
clk
!=
(
_24MHZ_
*
n
)
/
m
))
return
RT_ERROR
;
return
-
RT_ERROR
;
CCU
->
pll_video_ctrl
&=
~
(
0x1
<<
31
);
CCU
->
pll_video_ctrl
&=
~
(
0x1
<<
31
);
n
=
(
n
-
1
)
&
0x7f
;
n
=
(
n
-
1
)
&
0x7f
;
...
@@ -321,7 +321,7 @@ rt_err_t video_set_pll_clk(int clk)
...
@@ -321,7 +321,7 @@ rt_err_t video_set_pll_clk(int clk)
CCU
->
pll_video_ctrl
=
(
0x1
<<
31
)
|
(
0x0
<<
30
)
|
(
0x1
<<
24
)
|
(
n
<<
8
)
|
m
;
CCU
->
pll_video_ctrl
=
(
0x1
<<
31
)
|
(
0x0
<<
30
)
|
(
0x1
<<
24
)
|
(
n
<<
8
)
|
m
;
if
(
wait_pll_stable
((
rt_uint32_t
)(
&
CCU
->
pll_video_ctrl
)))
if
(
wait_pll_stable
((
rt_uint32_t
)(
&
CCU
->
pll_video_ctrl
)))
return
RT_ERROR
;
return
-
RT_ERROR
;
else
else
return
RT_EOK
;
return
RT_EOK
;
}
}
...
@@ -357,7 +357,7 @@ rt_err_t ve_set_pll_clk(int clk)
...
@@ -357,7 +357,7 @@ rt_err_t ve_set_pll_clk(int clk)
m
=
_24MHZ_
/
m_temp
;
m
=
_24MHZ_
/
m_temp
;
if
((
n
>
128
)
||
(
m
>
16
)
||
(
clk
!=
(
_24MHZ_
*
n
)
/
m
))
if
((
n
>
128
)
||
(
m
>
16
)
||
(
clk
!=
(
_24MHZ_
*
n
)
/
m
))
return
RT_ERROR
;
return
-
RT_ERROR
;
CCU
->
pll_ve_ctrl
&=
~
(
0x1
<<
31
);
CCU
->
pll_ve_ctrl
&=
~
(
0x1
<<
31
);
n
=
(
n
-
1
)
&
0x7f
;
n
=
(
n
-
1
)
&
0x7f
;
...
@@ -365,7 +365,7 @@ rt_err_t ve_set_pll_clk(int clk)
...
@@ -365,7 +365,7 @@ rt_err_t ve_set_pll_clk(int clk)
//clk = (24 * n) / m
//clk = (24 * n) / m
CCU
->
pll_ve_ctrl
=
(
0x1
<<
31
)
|
(
0x1
<<
24
)
|
(
n
<<
8
)
|
m
;
CCU
->
pll_ve_ctrl
=
(
0x1
<<
31
)
|
(
0x1
<<
24
)
|
(
n
<<
8
)
|
m
;
if
(
wait_pll_stable
((
rt_uint32_t
)(
&
CCU
->
pll_ve_ctrl
)))
if
(
wait_pll_stable
((
rt_uint32_t
)(
&
CCU
->
pll_ve_ctrl
)))
return
RT_ERROR
;
return
-
RT_ERROR
;
else
else
return
RT_EOK
;
return
RT_EOK
;
}
}
...
@@ -388,7 +388,7 @@ rt_err_t periph_set_pll_clk(int clk)
...
@@ -388,7 +388,7 @@ rt_err_t periph_set_pll_clk(int clk)
}
}
if
((
n
>
32
)
||
(
k
>
4
)
||
(
clk
!=
(
_24MHZ_
*
n
*
k
)))
if
((
n
>
32
)
||
(
k
>
4
)
||
(
clk
!=
(
_24MHZ_
*
n
*
k
)))
return
RT_ERROR
;
return
-
RT_ERROR
;
temp_data
=
CCU
->
ahb_apb_hclkc_cfg
;
temp_data
=
CCU
->
ahb_apb_hclkc_cfg
;
clk_src
=
(
temp_data
>>
12
)
&
0x3
;
clk_src
=
(
temp_data
>>
12
)
&
0x3
;
temp_data
&=
~
(
0x3
<<
12
);
temp_data
&=
~
(
0x3
<<
12
);
...
@@ -400,7 +400,7 @@ rt_err_t periph_set_pll_clk(int clk)
...
@@ -400,7 +400,7 @@ rt_err_t periph_set_pll_clk(int clk)
//clk = 24 * n *k
//clk = 24 * n *k
CCU
->
pll_periph_ctrl
=
(
0x1
<<
31
)
|
(
0x1
<<
18
)
|
(
n
<<
8
)
|
(
k
<<
4
)
||
(
0x1
);
CCU
->
pll_periph_ctrl
=
(
0x1
<<
31
)
|
(
0x1
<<
18
)
|
(
n
<<
8
)
|
(
k
<<
4
)
||
(
0x1
);
if
(
wait_pll_stable
((
rt_uint32_t
)(
&
CCU
->
pll_periph_ctrl
)))
if
(
wait_pll_stable
((
rt_uint32_t
)(
&
CCU
->
pll_periph_ctrl
)))
return
RT_ERROR
;
return
-
RT_ERROR
;
temp_data
=
CCU
->
ahb_apb_hclkc_cfg
;
temp_data
=
CCU
->
ahb_apb_hclkc_cfg
;
temp_data
&=
~
(
0x3
<<
12
);
temp_data
&=
~
(
0x3
<<
12
);
...
@@ -423,7 +423,7 @@ rt_err_t cpu_set_clk(int clk)
...
@@ -423,7 +423,7 @@ rt_err_t cpu_set_clk(int clk)
return
RT_EOK
;
return
RT_EOK
;
if
(
cpu_set_pll_clk
(
clk
))
if
(
cpu_set_pll_clk
(
clk
))
return
RT_ERROR
;
return
-
RT_ERROR
;
CCU
->
ahb_apb_hclkc_cfg
&=
~
(
0x3
<<
16
);
CCU
->
ahb_apb_hclkc_cfg
&=
~
(
0x3
<<
16
);
CCU
->
cpu_clk_src
=
CLK_PLL_SRC
<<
16
;
CCU
->
cpu_clk_src
=
CLK_PLL_SRC
<<
16
;
...
...
bsp/allwinner_tina/drivers/drv_gpio.c
浏览文件 @
0f461e87
...
@@ -469,7 +469,7 @@ static rt_err_t pin_attach_irq(struct rt_device *device, rt_int32_t pin, rt_uint
...
@@ -469,7 +469,7 @@ static rt_err_t pin_attach_irq(struct rt_device *device, rt_int32_t pin, rt_uint
if
((
pin
>
PIN_NUM
(
pin_index
))
||
(
pin_index
[
pin
].
magic
!=
PIN_MAGIC
))
if
((
pin
>
PIN_NUM
(
pin_index
))
||
(
pin_index
[
pin
].
magic
!=
PIN_MAGIC
))
{
{
LOG_E
(
"pin:%d value wrongful"
,
pin
);
LOG_E
(
"pin:%d value wrongful"
,
pin
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
gpio_set_irq_callback
(
pin_index
[
pin
].
pin_port
,
pin_index
[
pin
].
pin
,
hdr
,
args
);
gpio_set_irq_callback
(
pin_index
[
pin
].
pin_port
,
pin_index
[
pin
].
pin
,
hdr
,
args
);
...
@@ -481,7 +481,7 @@ static rt_err_t pin_detach_irq(struct rt_device *device, rt_int32_t pin)
...
@@ -481,7 +481,7 @@ static rt_err_t pin_detach_irq(struct rt_device *device, rt_int32_t pin)
if
((
pin
>
PIN_NUM
(
pin_index
))
||
(
pin_index
[
pin
].
magic
!=
PIN_MAGIC
))
if
((
pin
>
PIN_NUM
(
pin_index
))
||
(
pin_index
[
pin
].
magic
!=
PIN_MAGIC
))
{
{
LOG_E
(
"pin:%d value wrongful"
,
pin
);
LOG_E
(
"pin:%d value wrongful"
,
pin
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
gpio_clear_irq_callback
(
pin_index
[
pin
].
pin_port
,
pin_index
[
pin
].
pin
);
gpio_clear_irq_callback
(
pin_index
[
pin
].
pin_port
,
pin_index
[
pin
].
pin
);
...
@@ -494,7 +494,7 @@ rt_err_t pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint32_t ena
...
@@ -494,7 +494,7 @@ rt_err_t pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint32_t ena
if
((
pin
>
PIN_NUM
(
pin_index
))
||
(
pin_index
[
pin
].
magic
!=
PIN_MAGIC
))
if
((
pin
>
PIN_NUM
(
pin_index
))
||
(
pin_index
[
pin
].
magic
!=
PIN_MAGIC
))
{
{
LOG_E
(
"pin:%d value wrongful"
,
pin
);
LOG_E
(
"pin:%d value wrongful"
,
pin
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
if
(
enabled
)
if
(
enabled
)
...
...
bsp/allwinner_tina/drivers/drv_sdio.c
浏览文件 @
0f461e87
...
@@ -774,7 +774,7 @@ err:
...
@@ -774,7 +774,7 @@ err:
rt_free
(
host
);
rt_free
(
host
);
}
}
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
INIT_APP_EXPORT
(
tina_sdio_init
);
INIT_APP_EXPORT
(
tina_sdio_init
);
#endif
#endif
bsp/allwinner_tina/drivers/spi/drv_spi.c
浏览文件 @
0f461e87
...
@@ -680,7 +680,7 @@ rt_err_t tina_spi_bus_register(SPI_T *spi, const char *spi_bus_name)
...
@@ -680,7 +680,7 @@ rt_err_t tina_spi_bus_register(SPI_T *spi, const char *spi_bus_name)
LOG_D
(
"%s -> %d"
,
__FUNCTION__
,
__LINE__
);
LOG_D
(
"%s -> %d"
,
__FUNCTION__
,
__LINE__
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
int
rt_hw_spi_init
(
void
)
int
rt_hw_spi_init
(
void
)
...
...
bsp/allwinner_tina/drivers/spi/drv_spi_flash.c
浏览文件 @
0f461e87
...
@@ -27,12 +27,9 @@
...
@@ -27,12 +27,9 @@
#define DEBUG_PRINTF(...)
#define DEBUG_PRINTF(...)
#endif
#endif
#ifdef TINA_USING_SPI_FLASH
#if defined(TINA_USING_SPI_FLASH) && defined(RT_USING_SFUD)
#include "spi_flash.h"
#include "spi_flash.h"
#include <spi_flash_sfud.h>
#if defined(RT_USING_SFUD)
#include "spi_flash_sfud.h"
rt_spi_flash_device_t
spi_device
;
rt_spi_flash_device_t
spi_device
;
int
rt_hw_spi_flash_with_sfud_init
(
void
)
int
rt_hw_spi_flash_with_sfud_init
(
void
)
{
{
...
@@ -41,14 +38,11 @@ int rt_hw_spi_flash_with_sfud_init(void)
...
@@ -41,14 +38,11 @@ int rt_hw_spi_flash_with_sfud_init(void)
if
(
spi_device
==
NULL
)
if
(
spi_device
==
NULL
)
{
{
DEBUG_PRINTF
(
"%s -> %d
\n
"
,
__FUNCTION__
,
__LINE__
);
DEBUG_PRINTF
(
"%s -> %d
\n
"
,
__FUNCTION__
,
__LINE__
);
return
RT_ERROR
;
return
-
RT_ERROR
;
};
};
DEBUG_PRINTF
(
"%s -> %d
\n
"
,
__FUNCTION__
,
__LINE__
);
DEBUG_PRINTF
(
"%s -> %d
\n
"
,
__FUNCTION__
,
__LINE__
);
return
RT_EOK
;
return
RT_EOK
;
}
}
INIT_PREV_EXPORT
(
rt_hw_spi_flash_with_sfud_init
);
INIT_PREV_EXPORT
(
rt_hw_spi_flash_with_sfud_init
);
#endif
/* defined(TINA_USING_SPI_FLASH) && defined(RT_USING_SFUD) */
#endif
#endif
bsp/apm32/libraries/Drivers/drv_rtc.c
浏览文件 @
0f461e87
...
@@ -301,7 +301,7 @@ static int rt_hw_rtc_init(void)
...
@@ -301,7 +301,7 @@ static int rt_hw_rtc_init(void)
if
(
rt_hw_rtc_register
(
&
apm32_rtc_dev
,
"rtc"
,
RT_DEVICE_FLAG_RDWR
,
RT_NULL
)
!=
RT_EOK
)
if
(
rt_hw_rtc_register
(
&
apm32_rtc_dev
,
"rtc"
,
RT_DEVICE_FLAG_RDWR
,
RT_NULL
)
!=
RT_EOK
)
{
{
LOG_E
(
"rtc init failed"
);
LOG_E
(
"rtc init failed"
);
result
=
RT_ERROR
;
result
=
-
RT_ERROR
;
}
}
else
else
{
{
...
...
bsp/at32/at32f425-start/applications/main.c
浏览文件 @
0f461e87
...
@@ -93,7 +93,7 @@ static int uart_sample(int argc, char *argv[])
...
@@ -93,7 +93,7 @@ static int uart_sample(int argc, char *argv[])
if
(
!
serial
)
if
(
!
serial
)
{
{
rt_kprintf
(
"find %s failed!
\n
"
,
uart_name
);
rt_kprintf
(
"find %s failed!
\n
"
,
uart_name
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
rt_sem_init
(
&
rx_sem
,
"rx_sem"
,
0
,
RT_IPC_FLAG_FIFO
);
rt_sem_init
(
&
rx_sem
,
"rx_sem"
,
0
,
RT_IPC_FLAG_FIFO
);
...
@@ -110,7 +110,7 @@ static int uart_sample(int argc, char *argv[])
...
@@ -110,7 +110,7 @@ static int uart_sample(int argc, char *argv[])
}
}
else
else
{
{
ret
=
RT_ERROR
;
ret
=
-
RT_ERROR
;
}
}
return
ret
;
return
ret
;
...
@@ -253,14 +253,14 @@ static int wdt_sample(int argc, char *argv[])
...
@@ -253,14 +253,14 @@ static int wdt_sample(int argc, char *argv[])
if
(
!
wdt_dev
)
if
(
!
wdt_dev
)
{
{
rt_kprintf
(
"find %s failed!
\n
"
,
device_name
);
rt_kprintf
(
"find %s failed!
\n
"
,
device_name
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
ret
=
rt_device_control
(
wdt_dev
,
RT_DEVICE_CTRL_WDT_SET_TIMEOUT
,
&
timeout
);
ret
=
rt_device_control
(
wdt_dev
,
RT_DEVICE_CTRL_WDT_SET_TIMEOUT
,
&
timeout
);
if
(
ret
!=
RT_EOK
)
if
(
ret
!=
RT_EOK
)
{
{
rt_kprintf
(
"set %s timeout failed!
\n
"
,
device_name
);
rt_kprintf
(
"set %s timeout failed!
\n
"
,
device_name
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
ret
=
rt_device_control
(
wdt_dev
,
RT_DEVICE_CTRL_WDT_START
,
RT_NULL
);
ret
=
rt_device_control
(
wdt_dev
,
RT_DEVICE_CTRL_WDT_START
,
RT_NULL
);
...
@@ -351,7 +351,7 @@ int can_sample(int argc, char *argv[])
...
@@ -351,7 +351,7 @@ int can_sample(int argc, char *argv[])
if
(
!
can_dev
)
if
(
!
can_dev
)
{
{
rt_kprintf
(
"find %s failed!
\n
"
,
can_name
);
rt_kprintf
(
"find %s failed!
\n
"
,
can_name
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
rt_sem_init
(
&
rx_sem
,
"rx_sem"
,
0
,
RT_IPC_FLAG_FIFO
);
rt_sem_init
(
&
rx_sem
,
"rx_sem"
,
0
,
RT_IPC_FLAG_FIFO
);
...
@@ -500,7 +500,7 @@ static int hwtimer_sample(int argc, char *argv[])
...
@@ -500,7 +500,7 @@ static int hwtimer_sample(int argc, char *argv[])
if
(
hw_dev
==
RT_NULL
)
if
(
hw_dev
==
RT_NULL
)
{
{
rt_kprintf
(
"hwtimer sample run failed! can't find %s device!
\n
"
,
HWTIMER_DEV_NAME
);
rt_kprintf
(
"hwtimer sample run failed! can't find %s device!
\n
"
,
HWTIMER_DEV_NAME
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
ret
=
rt_device_open
(
hw_dev
,
RT_DEVICE_OFLAG_RDWR
);
ret
=
rt_device_open
(
hw_dev
,
RT_DEVICE_OFLAG_RDWR
);
...
@@ -526,7 +526,7 @@ static int hwtimer_sample(int argc, char *argv[])
...
@@ -526,7 +526,7 @@ static int hwtimer_sample(int argc, char *argv[])
if
(
rt_device_write
(
hw_dev
,
0
,
&
timeout_s
,
sizeof
(
timeout_s
))
!=
sizeof
(
timeout_s
))
if
(
rt_device_write
(
hw_dev
,
0
,
&
timeout_s
,
sizeof
(
timeout_s
))
!=
sizeof
(
timeout_s
))
{
{
rt_kprintf
(
"set timeout value failed
\n
"
);
rt_kprintf
(
"set timeout value failed
\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
rt_thread_mdelay
(
1000
);
rt_thread_mdelay
(
1000
);
...
...
bsp/at32/libraries/rt_drivers/drv_emac.c
浏览文件 @
0f461e87
...
@@ -455,7 +455,7 @@ static rt_err_t rt_at32_emac_control(rt_device_t dev, int cmd, void *args)
...
@@ -455,7 +455,7 @@ static rt_err_t rt_at32_emac_control(rt_device_t dev, int cmd, void *args)
*/
*/
rt_err_t
rt_at32_emac_tx
(
rt_device_t
dev
,
struct
pbuf
*
p
)
rt_err_t
rt_at32_emac_tx
(
rt_device_t
dev
,
struct
pbuf
*
p
)
{
{
rt_err_t
ret
=
RT_ERROR
;
rt_err_t
ret
=
-
RT_ERROR
;
struct
pbuf
*
q
;
struct
pbuf
*
q
;
rt_uint32_t
offset
;
rt_uint32_t
offset
;
...
...
bsp/efm32/drv_sdcard.c
浏览文件 @
0f461e87
...
@@ -445,7 +445,7 @@ static rt_err_t efm_spiSd_writeBlock(void *buffer, rt_uint8_t token)
...
@@ -445,7 +445,7 @@ static rt_err_t efm_spiSd_writeBlock(void *buffer, rt_uint8_t token)
rt_uint8_t
buf_res
[
8
];
/* Expect a byte for data response */
rt_uint8_t
buf_res
[
8
];
/* Expect a byte for data response */
rt_uint8_t
i
;
rt_uint8_t
i
;
ret
=
RT_ERROR
;
ret
=
-
RT_ERROR
;
sdcard_debug
(
"SPISD: Write block
\n
"
);
sdcard_debug
(
"SPISD: Write block
\n
"
);
do
do
{
{
...
...
bsp/essemi/es32f0654/drivers/drv_i2c.c
浏览文件 @
0f461e87
...
@@ -112,7 +112,7 @@ static rt_ssize_t es32f0_master_xfer(struct rt_i2c_bus_device *bus,
...
@@ -112,7 +112,7 @@ static rt_ssize_t es32f0_master_xfer(struct rt_i2c_bus_device *bus,
{
{
struct
rt_i2c_msg
*
msg
;
struct
rt_i2c_msg
*
msg
;
rt_uint32_t
i
;
rt_uint32_t
i
;
rt_err_t
ret
=
RT_ERROR
;
rt_err_t
ret
=
-
RT_ERROR
;
for
(
i
=
0
;
i
<
num
;
i
++
)
for
(
i
=
0
;
i
<
num
;
i
++
)
{
{
...
...
bsp/essemi/es32f0654/drivers/drv_spi.c
浏览文件 @
0f461e87
...
@@ -162,7 +162,7 @@ rt_err_t spi_configure(struct rt_spi_device *device,
...
@@ -162,7 +162,7 @@ rt_err_t spi_configure(struct rt_spi_device *device,
return
RT_EOK
;
return
RT_EOK
;
}
}
static
rt_
uint32
_t
spixfer
(
struct
rt_spi_device
*
device
,
struct
rt_spi_message
*
message
)
static
rt_
ssize
_t
spixfer
(
struct
rt_spi_device
*
device
,
struct
rt_spi_message
*
message
)
{
{
rt_err_t
res
;
rt_err_t
res
;
spi_handle_t
*
hspi
;
spi_handle_t
*
hspi
;
...
@@ -208,7 +208,7 @@ static rt_uint32_t spixfer(struct rt_spi_device *device, struct rt_spi_message *
...
@@ -208,7 +208,7 @@ static rt_uint32_t spixfer(struct rt_spi_device *device, struct rt_spi_message *
}
}
if
(
res
!=
RT_EOK
)
if
(
res
!=
RT_EOK
)
return
RT_ERROR
;
return
-
RT_ERROR
;
else
else
return
message
->
length
;
return
message
->
length
;
...
...
bsp/essemi/es32f369x/drivers/drv_i2c.c
浏览文件 @
0f461e87
...
@@ -271,7 +271,7 @@ static rt_ssize_t es32f3_master_xfer(struct rt_i2c_bus_device *bus,
...
@@ -271,7 +271,7 @@ static rt_ssize_t es32f3_master_xfer(struct rt_i2c_bus_device *bus,
{
{
struct
rt_i2c_msg
*
msg
;
struct
rt_i2c_msg
*
msg
;
rt_uint32_t
i
;
rt_uint32_t
i
;
rt_err_t
ret
=
RT_ERROR
;
rt_err_t
ret
=
-
RT_ERROR
;
for
(
i
=
0
;
i
<
num
;
i
++
)
for
(
i
=
0
;
i
<
num
;
i
++
)
{
{
...
...
bsp/essemi/es32f369x/drivers/drv_spi.c
浏览文件 @
0f461e87
...
@@ -162,7 +162,7 @@ rt_err_t spi_configure(struct rt_spi_device *device,
...
@@ -162,7 +162,7 @@ rt_err_t spi_configure(struct rt_spi_device *device,
return
RT_EOK
;
return
RT_EOK
;
}
}
static
rt_
uint32
_t
spixfer
(
struct
rt_spi_device
*
device
,
struct
rt_spi_message
*
message
)
static
rt_
ssize
_t
spixfer
(
struct
rt_spi_device
*
device
,
struct
rt_spi_message
*
message
)
{
{
rt_err_t
res
;
rt_err_t
res
;
spi_handle_t
*
hspi
;
spi_handle_t
*
hspi
;
...
@@ -208,7 +208,7 @@ static rt_uint32_t spixfer(struct rt_spi_device *device, struct rt_spi_message *
...
@@ -208,7 +208,7 @@ static rt_uint32_t spixfer(struct rt_spi_device *device, struct rt_spi_message *
}
}
if
(
res
!=
RT_EOK
)
if
(
res
!=
RT_EOK
)
return
RT_ERROR
;
return
-
RT_ERROR
;
else
else
return
message
->
length
;
return
message
->
length
;
...
...
bsp/ft2004/drivers/drv_qspi.c
浏览文件 @
0f461e87
...
@@ -62,7 +62,7 @@ static rt_err_t ft2004_cmdOperation(struct ft2004_qspi_bus *qspi_bus_p, struct r
...
@@ -62,7 +62,7 @@ static rt_err_t ft2004_cmdOperation(struct ft2004_qspi_bus *qspi_bus_p, struct r
if
(
qspi_message
->
instruction
.
qspi_lines
==
0
)
if
(
qspi_message
->
instruction
.
qspi_lines
==
0
)
{
{
LOG_E
(
"instruction is not valid"
);
LOG_E
(
"instruction is not valid"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
cmd_pack
.
cmd
=
qspi_message
->
instruction
.
content
;
cmd_pack
.
cmd
=
qspi_message
->
instruction
.
content
;
...
@@ -130,13 +130,13 @@ static rt_err_t ft2004_cmdOperation(struct ft2004_qspi_bus *qspi_bus_p, struct r
...
@@ -130,13 +130,13 @@ static rt_err_t ft2004_cmdOperation(struct ft2004_qspi_bus *qspi_bus_p, struct r
}
}
#endif
#endif
return
(
ret
==
FQSPI_SUCCESS
)
?
RT_EOK
:
RT_ERROR
;
return
(
ret
==
FQSPI_SUCCESS
)
?
RT_EOK
:
-
RT_ERROR
;
}
}
static
rt_
uint32
_t
ft2004_qspi_xfer
(
struct
ft2004_qspi_bus
*
qspi_bus_p
,
struct
rt_spi_message
*
message
)
static
rt_
ssize
_t
ft2004_qspi_xfer
(
struct
ft2004_qspi_bus
*
qspi_bus_p
,
struct
rt_spi_message
*
message
)
{
{
struct
rt_qspi_message
*
qspi_message
=
(
struct
rt_qspi_message
*
)
message
;
struct
rt_qspi_message
*
qspi_message
=
(
struct
rt_qspi_message
*
)
message
;
rt_
uint32
_t
ret_length
=
0
;
rt_
ssize
_t
ret_length
=
0
;
const
rt_uint8_t
*
sndb
=
message
->
send_buf
;
const
rt_uint8_t
*
sndb
=
message
->
send_buf
;
rt_uint8_t
*
rcvb
=
message
->
recv_buf
;
rt_uint8_t
*
rcvb
=
message
->
recv_buf
;
rt_int32_t
length
=
message
->
length
;
rt_int32_t
length
=
message
->
length
;
...
@@ -159,7 +159,7 @@ static rt_uint32_t ft2004_qspi_xfer(struct ft2004_qspi_bus *qspi_bus_p, struct r
...
@@ -159,7 +159,7 @@ static rt_uint32_t ft2004_qspi_xfer(struct ft2004_qspi_bus *qspi_bus_p, struct r
if
(
qspi_config_p
->
channel
>=
FT_QSPI_MAX_CS_NUM
)
if
(
qspi_config_p
->
channel
>=
FT_QSPI_MAX_CS_NUM
)
{
{
LOG_E
(
"invalid channel[%x] "
,
qspi_config_p
->
channel
);
LOG_E
(
"invalid channel[%x] "
,
qspi_config_p
->
channel
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
switch
(
cmd
)
switch
(
cmd
)
{
{
...
...
bsp/ft2004/drivers/drv_sdcard.c
浏览文件 @
0f461e87
...
@@ -38,7 +38,7 @@ static rt_err_t _sdcard_mount(void)
...
@@ -38,7 +38,7 @@ static rt_err_t _sdcard_mount(void)
if
(
mmcsd_wait_cd_changed
(
rt_tick_from_millisecond
(
5000
))
==
-
RT_ETIMEOUT
)
if
(
mmcsd_wait_cd_changed
(
rt_tick_from_millisecond
(
5000
))
==
-
RT_ETIMEOUT
)
{
{
rt_kprintf
(
"timeout
\r\n
"
);
rt_kprintf
(
"timeout
\r\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
device
=
rt_device_find
(
"sd0"
);
device
=
rt_device_find
(
"sd0"
);
}
}
...
@@ -54,7 +54,7 @@ static rt_err_t _sdcard_mount(void)
...
@@ -54,7 +54,7 @@ static rt_err_t _sdcard_mount(void)
else
else
{
{
LOG_W
(
"sd card mount to '/' failed!"
);
LOG_W
(
"sd card mount to '/' failed!"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
}
}
...
...
bsp/fujitsu/mb9x/mb9bf506r/drivers/fm3_uart.c
浏览文件 @
0f461e87
...
@@ -408,7 +408,7 @@ static rt_err_t uart03_configure(struct rt_serial_device *serial, struct serial_
...
@@ -408,7 +408,7 @@ static rt_err_t uart03_configure(struct rt_serial_device *serial, struct serial_
uart
->
uart_regs
->
ESCR_f
.
ESBL
=
1
;
uart
->
uart_regs
->
ESCR_f
.
ESBL
=
1
;
break
;
break
;
default:
default:
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
/* set data bits */
/* set data bits */
...
@@ -440,7 +440,7 @@ static rt_err_t uart03_configure(struct rt_serial_device *serial, struct serial_
...
@@ -440,7 +440,7 @@ static rt_err_t uart03_configure(struct rt_serial_device *serial, struct serial_
uart
->
uart_regs
->
ESCR_f
.
L2
=
1
;
uart
->
uart_regs
->
ESCR_f
.
L2
=
1
;
break
;
break
;
default:
default:
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
/* set parity */
/* set parity */
...
@@ -458,7 +458,7 @@ static rt_err_t uart03_configure(struct rt_serial_device *serial, struct serial_
...
@@ -458,7 +458,7 @@ static rt_err_t uart03_configure(struct rt_serial_device *serial, struct serial_
uart
->
uart_regs
->
ESCR_f
.
P
=
1
;
uart
->
uart_regs
->
ESCR_f
.
P
=
1
;
break
;
break
;
default:
default:
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
/* set bit order */
/* set bit order */
...
@@ -471,7 +471,7 @@ static rt_err_t uart03_configure(struct rt_serial_device *serial, struct serial_
...
@@ -471,7 +471,7 @@ static rt_err_t uart03_configure(struct rt_serial_device *serial, struct serial_
uart
->
uart_regs
->
SMR_f
.
BDS
=
1
;
uart
->
uart_regs
->
SMR_f
.
BDS
=
1
;
break
;
break
;
default:
default:
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
/* set NRZ mode */
/* set NRZ mode */
...
@@ -484,7 +484,7 @@ static rt_err_t uart03_configure(struct rt_serial_device *serial, struct serial_
...
@@ -484,7 +484,7 @@ static rt_err_t uart03_configure(struct rt_serial_device *serial, struct serial_
uart
->
uart_regs
->
ESCR_f
.
INV
=
1
;
uart
->
uart_regs
->
ESCR_f
.
INV
=
1
;
break
;
break
;
default:
default:
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
uart
->
uart_regs
->
SCR
=
SCR_RXE
|
SCR_TXE
|
SCR_RIE
;
uart
->
uart_regs
->
SCR
=
SCR_RXE
|
SCR_TXE
|
SCR_RIE
;
...
@@ -588,7 +588,7 @@ static rt_err_t uart47_configure(struct rt_serial_device *serial, struct serial_
...
@@ -588,7 +588,7 @@ static rt_err_t uart47_configure(struct rt_serial_device *serial, struct serial_
uart
->
uart_regs
->
ESCR_f
.
ESBL
=
1
;
uart
->
uart_regs
->
ESCR_f
.
ESBL
=
1
;
break
;
break
;
default:
default:
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
/* set data bits */
/* set data bits */
...
@@ -620,7 +620,7 @@ static rt_err_t uart47_configure(struct rt_serial_device *serial, struct serial_
...
@@ -620,7 +620,7 @@ static rt_err_t uart47_configure(struct rt_serial_device *serial, struct serial_
uart
->
uart_regs
->
ESCR_f
.
L2
=
1
;
uart
->
uart_regs
->
ESCR_f
.
L2
=
1
;
break
;
break
;
default:
default:
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
/* set parity */
/* set parity */
...
@@ -638,7 +638,7 @@ static rt_err_t uart47_configure(struct rt_serial_device *serial, struct serial_
...
@@ -638,7 +638,7 @@ static rt_err_t uart47_configure(struct rt_serial_device *serial, struct serial_
uart
->
uart_regs
->
ESCR_f
.
P
=
1
;
uart
->
uart_regs
->
ESCR_f
.
P
=
1
;
break
;
break
;
default:
default:
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
/* set bit order */
/* set bit order */
...
@@ -651,7 +651,7 @@ static rt_err_t uart47_configure(struct rt_serial_device *serial, struct serial_
...
@@ -651,7 +651,7 @@ static rt_err_t uart47_configure(struct rt_serial_device *serial, struct serial_
uart
->
uart_regs
->
SMR_f
.
BDS
=
1
;
uart
->
uart_regs
->
SMR_f
.
BDS
=
1
;
break
;
break
;
default:
default:
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
/* set NRZ mode */
/* set NRZ mode */
...
@@ -664,7 +664,7 @@ static rt_err_t uart47_configure(struct rt_serial_device *serial, struct serial_
...
@@ -664,7 +664,7 @@ static rt_err_t uart47_configure(struct rt_serial_device *serial, struct serial_
uart
->
uart_regs
->
ESCR_f
.
INV
=
1
;
uart
->
uart_regs
->
ESCR_f
.
INV
=
1
;
break
;
break
;
default:
default:
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
/* configure fifo */
/* configure fifo */
...
...
bsp/gd32/arm/libraries/gd32_drivers/drv_spi_flash.c
浏览文件 @
0f461e87
...
@@ -59,7 +59,7 @@ static int rt_hw_spi_flash_with_sfud_init(void)
...
@@ -59,7 +59,7 @@ static int rt_hw_spi_flash_with_sfud_init(void)
{
{
if
(
RT_NULL
==
rt_sfud_flash_probe
(
SPI_FLASH_CHIP
,
SPI_FLASH_DEVICE_NAME
))
if
(
RT_NULL
==
rt_sfud_flash_probe
(
SPI_FLASH_CHIP
,
SPI_FLASH_DEVICE_NAME
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
};
};
return
RT_EOK
;
return
RT_EOK
;
...
...
bsp/gd32105c-eval/drivers/drv_i2c.c
浏览文件 @
0f461e87
...
@@ -229,7 +229,7 @@ static rt_ssize_t gd32_i2c_xfer(struct rt_i2c_bus_device *bus, struct rt_i2c_msg
...
@@ -229,7 +229,7 @@ static rt_ssize_t gd32_i2c_xfer(struct rt_i2c_bus_device *bus, struct rt_i2c_msg
{
{
struct
rt_i2c_msg
*
msg
;
struct
rt_i2c_msg
*
msg
;
rt_uint32_t
i
;
rt_uint32_t
i
;
rt_err_t
ret
=
RT_ERROR
;
rt_err_t
ret
=
-
RT_ERROR
;
struct
gd32_i2c_bus
*
gd32_i2c
=
(
struct
gd32_i2c_bus
*
)
bus
;
struct
gd32_i2c_bus
*
gd32_i2c
=
(
struct
gd32_i2c_bus
*
)
bus
;
...
...
bsp/gd32105c-eval/drivers/drv_spi_flash.c
浏览文件 @
0f461e87
...
@@ -43,7 +43,7 @@ static int rt_hw_spi_flash_with_sfud_init(void)
...
@@ -43,7 +43,7 @@ static int rt_hw_spi_flash_with_sfud_init(void)
{
{
if
(
RT_NULL
==
rt_sfud_flash_probe
(
SPI_FLASH_DEVICE_NAME
,
SPI_DEVICE_NAME
))
if
(
RT_NULL
==
rt_sfud_flash_probe
(
SPI_FLASH_DEVICE_NAME
,
SPI_DEVICE_NAME
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
RT_EOK
;
return
RT_EOK
;
...
...
bsp/gd32107c-eval/drivers/drv_i2c.c
浏览文件 @
0f461e87
...
@@ -229,7 +229,7 @@ static rt_ssize_t gd32_i2c_xfer(struct rt_i2c_bus_device *bus, struct rt_i2c_msg
...
@@ -229,7 +229,7 @@ static rt_ssize_t gd32_i2c_xfer(struct rt_i2c_bus_device *bus, struct rt_i2c_msg
{
{
struct
rt_i2c_msg
*
msg
;
struct
rt_i2c_msg
*
msg
;
rt_uint32_t
i
;
rt_uint32_t
i
;
rt_err_t
ret
=
RT_ERROR
;
rt_err_t
ret
=
-
RT_ERROR
;
struct
gd32_i2c_bus
*
gd32_i2c
=
(
struct
gd32_i2c_bus
*
)
bus
;
struct
gd32_i2c_bus
*
gd32_i2c
=
(
struct
gd32_i2c_bus
*
)
bus
;
...
...
bsp/gd32107c-eval/drivers/drv_spi_flash.c
浏览文件 @
0f461e87
...
@@ -43,7 +43,7 @@ static int rt_hw_spi_flash_with_sfud_init(void)
...
@@ -43,7 +43,7 @@ static int rt_hw_spi_flash_with_sfud_init(void)
{
{
if
(
RT_NULL
==
rt_sfud_flash_probe
(
SPI_FLASH_DEVICE_NAME
,
SPI_DEVICE_NAME
))
if
(
RT_NULL
==
rt_sfud_flash_probe
(
SPI_FLASH_DEVICE_NAME
,
SPI_DEVICE_NAME
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
RT_EOK
;
return
RT_EOK
;
...
...
bsp/gd32303e-eval/drivers/drv_i2c.c
浏览文件 @
0f461e87
...
@@ -230,7 +230,7 @@ static rt_ssize_t gd32_i2c_xfer(struct rt_i2c_bus_device *bus, struct rt_i2c_msg
...
@@ -230,7 +230,7 @@ static rt_ssize_t gd32_i2c_xfer(struct rt_i2c_bus_device *bus, struct rt_i2c_msg
{
{
struct
rt_i2c_msg
*
msg
;
struct
rt_i2c_msg
*
msg
;
rt_uint32_t
i
;
rt_uint32_t
i
;
rt_err_t
ret
=
RT_ERROR
;
rt_err_t
ret
=
-
RT_ERROR
;
struct
gd32_i2c_bus
*
gd32_i2c
=
(
struct
gd32_i2c_bus
*
)
bus
;
struct
gd32_i2c_bus
*
gd32_i2c
=
(
struct
gd32_i2c_bus
*
)
bus
;
...
...
bsp/gd32303e-eval/drivers/drv_spi_flash.c
浏览文件 @
0f461e87
...
@@ -44,7 +44,7 @@ static int rt_hw_spi_flash_with_sfud_init(void)
...
@@ -44,7 +44,7 @@ static int rt_hw_spi_flash_with_sfud_init(void)
{
{
if
(
RT_NULL
==
rt_sfud_flash_probe
(
SPI_FLASH_DEVICE_NAME
,
SPI_DEVICE_NAME
))
if
(
RT_NULL
==
rt_sfud_flash_probe
(
SPI_FLASH_DEVICE_NAME
,
SPI_DEVICE_NAME
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
RT_EOK
;
return
RT_EOK
;
...
...
bsp/gd32450z-eval/drivers/drv_spi.c
浏览文件 @
0f461e87
...
@@ -320,6 +320,6 @@ rt_err_t gd32_spi_bus_register(uint32_t spi_periph,
...
@@ -320,6 +320,6 @@ rt_err_t gd32_spi_bus_register(uint32_t spi_periph,
}
}
}
}
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
#endif
#endif
bsp/gd32450z-eval/drivers/drv_spi_flash.c
浏览文件 @
0f461e87
...
@@ -76,7 +76,7 @@ static int rt_hw_spi_flash_with_sfud_init(void)
...
@@ -76,7 +76,7 @@ static int rt_hw_spi_flash_with_sfud_init(void)
{
{
if
(
RT_NULL
==
rt_sfud_flash_probe
(
SPI_FLASH_CHIP
,
SPI_FLASH_DEVICE_NAME
))
if
(
RT_NULL
==
rt_sfud_flash_probe
(
SPI_FLASH_CHIP
,
SPI_FLASH_DEVICE_NAME
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
};
};
return
RT_EOK
;
return
RT_EOK
;
...
...
bsp/gd32e230k-start/drivers/drv_i2c.c
浏览文件 @
0f461e87
...
@@ -231,7 +231,7 @@ static rt_ssize_t gd32_i2c_xfer(struct rt_i2c_bus_device *bus, struct rt_i2c_msg
...
@@ -231,7 +231,7 @@ static rt_ssize_t gd32_i2c_xfer(struct rt_i2c_bus_device *bus, struct rt_i2c_msg
{
{
struct
rt_i2c_msg
*
msg
;
struct
rt_i2c_msg
*
msg
;
rt_uint32_t
i
;
rt_uint32_t
i
;
rt_err_t
ret
=
RT_ERROR
;
rt_err_t
ret
=
-
RT_ERROR
;
struct
gd32_i2c_bus
*
gd32_i2c
=
(
struct
gd32_i2c_bus
*
)
bus
;
struct
gd32_i2c_bus
*
gd32_i2c
=
(
struct
gd32_i2c_bus
*
)
bus
;
...
...
bsp/hc32/ev_hc32f4a0_lqfp176/board/ports/tca9539.c
浏览文件 @
0f461e87
...
@@ -156,7 +156,7 @@ rt_err_t TCA9539_WritePin(uint8_t u8Port, uint8_t u8Pin, uint8_t u8PinState)
...
@@ -156,7 +156,7 @@ rt_err_t TCA9539_WritePin(uint8_t u8Port, uint8_t u8Pin, uint8_t u8PinState)
u8TempData
[
0
]
=
u8Port
+
TCA9539_REG_OUTPUT_PORT0
;
u8TempData
[
0
]
=
u8Port
+
TCA9539_REG_OUTPUT_PORT0
;
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Read
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Read
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
if
(
0U
==
u8PinState
)
if
(
0U
==
u8PinState
)
{
{
...
@@ -168,7 +168,7 @@ rt_err_t TCA9539_WritePin(uint8_t u8Port, uint8_t u8Pin, uint8_t u8PinState)
...
@@ -168,7 +168,7 @@ rt_err_t TCA9539_WritePin(uint8_t u8Port, uint8_t u8Pin, uint8_t u8PinState)
}
}
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Write
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Write
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
RT_EOK
;
return
RT_EOK
;
...
@@ -196,7 +196,7 @@ rt_err_t TCA9539_ReadPin(uint8_t u8Port, uint8_t u8Pin, uint8_t *pu8PinState)
...
@@ -196,7 +196,7 @@ rt_err_t TCA9539_ReadPin(uint8_t u8Port, uint8_t u8Pin, uint8_t *pu8PinState)
u8TempData
[
0
]
=
u8Port
+
TCA9539_REG_INPUT_PORT0
;
u8TempData
[
0
]
=
u8Port
+
TCA9539_REG_INPUT_PORT0
;
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Read
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Read
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
if
(
0U
!=
(
u8TempData
[
1
]
&
u8Pin
))
if
(
0U
!=
(
u8TempData
[
1
]
&
u8Pin
))
{
{
...
@@ -219,7 +219,7 @@ rt_err_t TCA9539_ReadPin(uint8_t u8Port, uint8_t u8Pin, uint8_t *pu8PinState)
...
@@ -219,7 +219,7 @@ rt_err_t TCA9539_ReadPin(uint8_t u8Port, uint8_t u8Pin, uint8_t *pu8PinState)
* This parameter can be one or any combination of the following values:
* This parameter can be one or any combination of the following values:
* @arg @ref TCA9539_Pin_Definition
* @arg @ref TCA9539_Pin_Definition
* @retval rt_err_t:
* @retval rt_err_t:
* - RT_ERROR
* -
-
RT_ERROR
* - RT_EOK
* - RT_EOK
*/
*/
rt_err_t
TCA9539_TogglePin
(
uint8_t
u8Port
,
uint8_t
u8Pin
)
rt_err_t
TCA9539_TogglePin
(
uint8_t
u8Port
,
uint8_t
u8Pin
)
...
@@ -229,12 +229,12 @@ rt_err_t TCA9539_TogglePin(uint8_t u8Port, uint8_t u8Pin)
...
@@ -229,12 +229,12 @@ rt_err_t TCA9539_TogglePin(uint8_t u8Port, uint8_t u8Pin)
u8TempData
[
0
]
=
u8Port
+
TCA9539_REG_OUTPUT_PORT0
;
u8TempData
[
0
]
=
u8Port
+
TCA9539_REG_OUTPUT_PORT0
;
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Read
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Read
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
u8TempData
[
1
]
^=
u8Pin
;
u8TempData
[
1
]
^=
u8Pin
;
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Write
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Write
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
RT_EOK
;
return
RT_EOK
;
...
@@ -252,7 +252,7 @@ rt_err_t TCA9539_TogglePin(uint8_t u8Port, uint8_t u8Pin)
...
@@ -252,7 +252,7 @@ rt_err_t TCA9539_TogglePin(uint8_t u8Port, uint8_t u8Pin)
* This parameter can be one of the following values:
* This parameter can be one of the following values:
* @arg @ref TCA9539_Direction_Definition
* @arg @ref TCA9539_Direction_Definition
* @retval rt_err_t:
* @retval rt_err_t:
* - RT_ERROR
* -
-
RT_ERROR
* - RT_EOK
* - RT_EOK
*/
*/
rt_err_t
TCA9539_ConfigPin
(
uint8_t
u8Port
,
uint8_t
u8Pin
,
uint8_t
u8Dir
)
rt_err_t
TCA9539_ConfigPin
(
uint8_t
u8Port
,
uint8_t
u8Pin
,
uint8_t
u8Dir
)
...
@@ -262,7 +262,7 @@ rt_err_t TCA9539_ConfigPin(uint8_t u8Port, uint8_t u8Pin, uint8_t u8Dir)
...
@@ -262,7 +262,7 @@ rt_err_t TCA9539_ConfigPin(uint8_t u8Port, uint8_t u8Pin, uint8_t u8Dir)
u8TempData
[
0
]
=
u8Port
+
TCA9539_REG_CONFIG_PORT0
;
u8TempData
[
0
]
=
u8Port
+
TCA9539_REG_CONFIG_PORT0
;
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Read
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Read
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
if
(
TCA9539_DIR_OUT
==
u8Dir
)
if
(
TCA9539_DIR_OUT
==
u8Dir
)
{
{
...
@@ -274,7 +274,7 @@ rt_err_t TCA9539_ConfigPin(uint8_t u8Port, uint8_t u8Pin, uint8_t u8Dir)
...
@@ -274,7 +274,7 @@ rt_err_t TCA9539_ConfigPin(uint8_t u8Port, uint8_t u8Pin, uint8_t u8Dir)
}
}
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Write
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Write
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
RT_EOK
;
return
RT_EOK
;
...
@@ -284,7 +284,7 @@ rt_err_t TCA9539_ConfigPin(uint8_t u8Port, uint8_t u8Pin, uint8_t u8Dir)
...
@@ -284,7 +284,7 @@ rt_err_t TCA9539_ConfigPin(uint8_t u8Port, uint8_t u8Pin, uint8_t u8Dir)
* @brief Initialize TCA9539.
* @brief Initialize TCA9539.
* @param [in] None
* @param [in] None
* @retval rt_err_t:
* @retval rt_err_t:
* - RT_ERROR
* -
-
RT_ERROR
* - RT_EOK
* - RT_EOK
*/
*/
int
TCA9539_Init
(
void
)
int
TCA9539_Init
(
void
)
...
@@ -298,19 +298,19 @@ int TCA9539_Init(void)
...
@@ -298,19 +298,19 @@ int TCA9539_Init(void)
if
(
i2c_bus
==
RT_NULL
)
if
(
i2c_bus
==
RT_NULL
)
{
{
rt_kprintf
(
"can't find %s device!
\n
"
,
BSP_TCA9539_I2C_BUS_NAME
);
rt_kprintf
(
"can't find %s device!
\n
"
,
BSP_TCA9539_I2C_BUS_NAME
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
/* All Pins are input as default */
/* All Pins are input as default */
u8TempData
[
0
]
=
TCA9539_REG_CONFIG_PORT0
;
u8TempData
[
0
]
=
TCA9539_REG_CONFIG_PORT0
;
u8TempData
[
1
]
=
0xFFU
;
u8TempData
[
1
]
=
0xFFU
;
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Write
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Write
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
u8TempData
[
0
]
=
TCA9539_REG_CONFIG_PORT1
;
u8TempData
[
0
]
=
TCA9539_REG_CONFIG_PORT1
;
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Write
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
if
(
RT_EOK
!=
BSP_TCA9539_I2C_Write
(
i2c_bus
,
u8TempData
[
0
],
&
u8TempData
[
1
],
1U
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
RT_EOK
;
return
RT_EOK
;
...
...
bsp/hc32/libraries/hc32_drivers/drv_adc.c
浏览文件 @
0f461e87
...
@@ -160,7 +160,7 @@ static rt_err_t _adc_enable(struct rt_adc_device *device, rt_uint32_t channel, r
...
@@ -160,7 +160,7 @@ static rt_err_t _adc_enable(struct rt_adc_device *device, rt_uint32_t channel, r
static
rt_err_t
_adc_convert
(
struct
rt_adc_device
*
device
,
rt_uint32_t
channel
,
rt_uint32_t
*
value
)
static
rt_err_t
_adc_convert
(
struct
rt_adc_device
*
device
,
rt_uint32_t
channel
,
rt_uint32_t
*
value
)
{
{
rt_err_t
rt_ret
=
RT_ERROR
;
rt_err_t
rt_ret
=
-
RT_ERROR
;
if
(
!
value
)
if
(
!
value
)
{
{
...
...
bsp/hc32/libraries/hc32_drivers/drv_can.c
浏览文件 @
0f461e87
...
@@ -390,7 +390,7 @@ static int _can_sendmsg(struct rt_can_device *can, const void *buf, rt_uint32_t
...
@@ -390,7 +390,7 @@ static int _can_sendmsg(struct rt_can_device *can, const void *buf, rt_uint32_t
ll_ret
=
CAN_FillTxFrame
(
p_can_dev
->
instance
,
CAN_TX_BUF_PTB
,
&
stc_tx_frame
);
ll_ret
=
CAN_FillTxFrame
(
p_can_dev
->
instance
,
CAN_TX_BUF_PTB
,
&
stc_tx_frame
);
if
(
ll_ret
!=
LL_OK
)
if
(
ll_ret
!=
LL_OK
)
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
/* Request transmission */
/* Request transmission */
CAN_StartTx
(
p_can_dev
->
instance
,
CAN_TX_REQ_PTB
);
CAN_StartTx
(
p_can_dev
->
instance
,
CAN_TX_REQ_PTB
);
...
...
bsp/hc32/libraries/hc32_drivers/drv_eth.c
浏览文件 @
0f461e87
...
@@ -219,7 +219,7 @@ static rt_err_t rt_hc32_eth_control(rt_device_t dev, int cmd, void *args)
...
@@ -219,7 +219,7 @@ static rt_err_t rt_hc32_eth_control(rt_device_t dev, int cmd, void *args)
/* transmit data*/
/* transmit data*/
rt_err_t
rt_hc32_eth_tx
(
rt_device_t
dev
,
struct
pbuf
*
p
)
rt_err_t
rt_hc32_eth_tx
(
rt_device_t
dev
,
struct
pbuf
*
p
)
{
{
rt_err_t
errval
=
RT_ERROR
;
rt_err_t
errval
=
-
RT_ERROR
;
struct
pbuf
*
q
;
struct
pbuf
*
q
;
uint8_t
*
txBuffer
;
uint8_t
*
txBuffer
;
__IO
stc_eth_dma_desc_t
*
DmaTxDesc
;
__IO
stc_eth_dma_desc_t
*
DmaTxDesc
;
...
...
bsp/hc32/libraries/hc32_drivers/drv_pwm_tmra.c
浏览文件 @
0f461e87
...
@@ -176,7 +176,7 @@ static rt_err_t drv_pwm_set(CM_TMRA_TypeDef *TMRAx, struct rt_pwm_configuration
...
@@ -176,7 +176,7 @@ static rt_err_t drv_pwm_set(CM_TMRA_TypeDef *TMRAx, struct rt_pwm_configuration
if
(
u64val
<
0xFFFF
)
break
;
if
(
u64val
<
0xFFFF
)
break
;
u64val
/=
2
;
u64val
/=
2
;
}
}
if
(
div_bit
>
10
)
return
RT_ERROR
;
if
(
div_bit
>
10
)
return
-
RT_ERROR
;
//
//
TMRA_SetClockDiv
(
TMRAx
,
div_bit
<<
TMRA_BCSTR_CKDIV_POS
);
TMRA_SetClockDiv
(
TMRAx
,
div_bit
<<
TMRA_BCSTR_CKDIV_POS
);
u32clkFreq
=
get_tmra_clk_freq
(
TMRAx
);
u32clkFreq
=
get_tmra_clk_freq
(
TMRAx
);
...
...
bsp/hpmicro/hpm6750evk/board/eth_phy_port.c
浏览文件 @
0f461e87
...
@@ -272,7 +272,7 @@ static void phy_monitor_thread_entry(void *args)
...
@@ -272,7 +272,7 @@ static void phy_monitor_thread_entry(void *args)
int
phy_device_register
(
void
)
int
phy_device_register
(
void
)
{
{
rt_err_t
err
=
RT_ERROR
;
rt_err_t
err
=
-
RT_ERROR
;
rt_thread_t
thread_phy_monitor
;
rt_thread_t
thread_phy_monitor
;
/* Set ops for PHY */
/* Set ops for PHY */
...
@@ -308,7 +308,7 @@ int phy_device_register(void)
...
@@ -308,7 +308,7 @@ int phy_device_register(void)
}
}
else
else
{
{
err
=
RT_ERROR
;
err
=
-
RT_ERROR
;
}
}
return
err
;
return
err
;
...
...
bsp/hpmicro/hpm6750evkmini/board/eth_phy_port.c
浏览文件 @
0f461e87
...
@@ -251,7 +251,7 @@ static void phy_monitor_thread_entry(void *args)
...
@@ -251,7 +251,7 @@ static void phy_monitor_thread_entry(void *args)
int
phy_device_register
(
void
)
int
phy_device_register
(
void
)
{
{
rt_err_t
err
=
RT_ERROR
;
rt_err_t
err
=
-
RT_ERROR
;
rt_thread_t
thread_phy_monitor
;
rt_thread_t
thread_phy_monitor
;
/* Set ops for PHY */
/* Set ops for PHY */
...
@@ -287,7 +287,7 @@ int phy_device_register(void)
...
@@ -287,7 +287,7 @@ int phy_device_register(void)
}
}
else
else
{
{
err
=
RT_ERROR
;
err
=
-
RT_ERROR
;
}
}
return
err
;
return
err
;
...
...
bsp/hpmicro/libraries/drivers/drv_adc.c
浏览文件 @
0f461e87
...
@@ -99,7 +99,7 @@ static rt_err_t init_adc_config(hpm_rtt_adc *adc)
...
@@ -99,7 +99,7 @@ static rt_err_t init_adc_config(hpm_rtt_adc *adc)
cfg
.
adc_clk_div
=
1
;
cfg
.
adc_clk_div
=
1
;
ret
=
adc12_init
(
adc
->
adc_base
,
&
cfg
);
ret
=
adc12_init
(
adc
->
adc_base
,
&
cfg
);
if
(
ret
!=
status_success
)
{
if
(
ret
!=
status_success
)
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
#endif
#endif
...
@@ -113,7 +113,7 @@ static rt_err_t init_adc_config(hpm_rtt_adc *adc)
...
@@ -113,7 +113,7 @@ static rt_err_t init_adc_config(hpm_rtt_adc *adc)
cfg
.
sel_sync_ahb
=
true
;
cfg
.
sel_sync_ahb
=
true
;
ret
=
adc16_init
(
adc
->
adc_base
,
&
cfg
);
ret
=
adc16_init
(
adc
->
adc_base
,
&
cfg
);
if
(
ret
!=
status_success
)
{
if
(
ret
!=
status_success
)
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
#endif
#endif
return
RT_EOK
;
return
RT_EOK
;
...
@@ -131,7 +131,7 @@ static rt_err_t init_channel_config(hpm_rtt_adc *adc)
...
@@ -131,7 +131,7 @@ static rt_err_t init_channel_config(hpm_rtt_adc *adc)
ret
=
adc12_init_channel
(
adc
->
adc_base
,
&
ch_cfg
);
ret
=
adc12_init_channel
(
adc
->
adc_base
,
&
ch_cfg
);
if
(
ret
!=
status_success
)
{
if
(
ret
!=
status_success
)
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
#endif
#endif
...
@@ -145,7 +145,7 @@ static rt_err_t init_channel_config(hpm_rtt_adc *adc)
...
@@ -145,7 +145,7 @@ static rt_err_t init_channel_config(hpm_rtt_adc *adc)
ret
=
adc16_init_channel
(
adc
->
adc_base
,
&
ch_cfg
);
ret
=
adc16_init_channel
(
adc
->
adc_base
,
&
ch_cfg
);
if
(
ret
!=
status_success
)
{
if
(
ret
!=
status_success
)
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
#endif
#endif
return
RT_EOK
;
return
RT_EOK
;
...
@@ -160,12 +160,12 @@ static rt_err_t hpm_adc_enabled(struct rt_adc_device *device, rt_uint32_t channe
...
@@ -160,12 +160,12 @@ static rt_err_t hpm_adc_enabled(struct rt_adc_device *device, rt_uint32_t channe
hpm_adc_handler
=
(
hpm_rtt_adc
*
)
device
->
parent
.
user_data
;
hpm_adc_handler
=
(
hpm_rtt_adc
*
)
device
->
parent
.
user_data
;
ret
=
init_adc_config
(
hpm_adc_handler
);
ret
=
init_adc_config
(
hpm_adc_handler
);
if
(
ret
!=
RT_EOK
)
{
if
(
ret
!=
RT_EOK
)
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
hpm_adc_handler
->
channel
=
channel
;
hpm_adc_handler
->
channel
=
channel
;
ret
=
init_channel_config
(
hpm_adc_handler
);
ret
=
init_channel_config
(
hpm_adc_handler
);
if
(
ret
!=
RT_EOK
)
{
if
(
ret
!=
RT_EOK
)
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
RT_EOK
;
return
RT_EOK
;
...
@@ -208,7 +208,7 @@ int rt_hw_adc_init(void)
...
@@ -208,7 +208,7 @@ int rt_hw_adc_init(void)
for
(
uint32_t
i
=
0
;
i
<
adc_nums
;
i
++
)
{
for
(
uint32_t
i
=
0
;
i
<
adc_nums
;
i
++
)
{
ret
=
rt_hw_adc_register
(
&
hpm_adc_config_tbl
[
i
].
hpm_adc_device
,
hpm_adc_config_tbl
[
i
].
adc_name
,
&
hpm_adc_ops
,
&
hpm_adc_config_tbl
[
i
]);
ret
=
rt_hw_adc_register
(
&
hpm_adc_config_tbl
[
i
].
hpm_adc_device
,
hpm_adc_config_tbl
[
i
].
adc_name
,
&
hpm_adc_ops
,
&
hpm_adc_config_tbl
[
i
]);
if
(
ret
!=
RT_EOK
)
{
if
(
ret
!=
RT_EOK
)
{
ret
=
RT_ERROR
;
ret
=
-
RT_ERROR
;
break
;
break
;
}
}
}
}
...
...
bsp/hpmicro/libraries/drivers/drv_enet.c
浏览文件 @
0f461e87
...
@@ -239,7 +239,7 @@ static rt_err_t rt_hpm_eth_control(rt_device_t dev, int cmd, void * args)
...
@@ -239,7 +239,7 @@ static rt_err_t rt_hpm_eth_control(rt_device_t dev, int cmd, void * args)
static
rt_err_t
rt_hpm_eth_tx
(
rt_device_t
dev
,
struct
pbuf
*
p
)
static
rt_err_t
rt_hpm_eth_tx
(
rt_device_t
dev
,
struct
pbuf
*
p
)
{
{
rt_err_t
ret
=
RT_ERROR
;
rt_err_t
ret
=
-
RT_ERROR
;
uint32_t
status
;
uint32_t
status
;
enet_device
*
enet_dev
=
(
enet_device
*
)
dev
->
user_data
;
enet_device
*
enet_dev
=
(
enet_device
*
)
dev
->
user_data
;
uint32_t
tx_buff_size
=
enet_dev
->
desc
.
tx_buff_cfg
.
size
;
uint32_t
tx_buff_size
=
enet_dev
->
desc
.
tx_buff_cfg
.
size
;
...
@@ -436,7 +436,7 @@ SDK_DECLARE_EXT_ISR_M(IRQn_ENET1, isr_enet1)
...
@@ -436,7 +436,7 @@ SDK_DECLARE_EXT_ISR_M(IRQn_ENET1, isr_enet1)
int
rt_hw_eth_init
(
void
)
int
rt_hw_eth_init
(
void
)
{
{
rt_err_t
err
=
RT_ERROR
;
rt_err_t
err
=
-
RT_ERROR
;
for
(
uint32_t
i
=
0
;
i
<
ARRAY_SIZE
(
s_geths
);
i
++
)
for
(
uint32_t
i
=
0
;
i
<
ARRAY_SIZE
(
s_geths
);
i
++
)
{
{
...
...
bsp/hpmicro/libraries/drivers/drv_i2c.c
浏览文件 @
0f461e87
...
@@ -74,7 +74,7 @@ static rt_ssize_t hpm_i2c_master_transfer(struct rt_i2c_bus_device *bus, struct
...
@@ -74,7 +74,7 @@ static rt_ssize_t hpm_i2c_master_transfer(struct rt_i2c_bus_device *bus, struct
struct
hpm_i2c
*
i2c_info
=
(
struct
hpm_i2c
*
)
bus
;
struct
hpm_i2c
*
i2c_info
=
(
struct
hpm_i2c
*
)
bus
;
hpm_stat_t
i2c_stat
=
status_success
;
hpm_stat_t
i2c_stat
=
status_success
;
rt_err_t
ret
=
RT_ERROR
;
rt_err_t
ret
=
-
RT_ERROR
;
rt_uint32_t
i
;
rt_uint32_t
i
;
for
(
i
=
0
;
i
<
num
;
i
++
)
for
(
i
=
0
;
i
<
num
;
i
++
)
...
...
bsp/hpmicro/libraries/drivers/drv_i2s.c
浏览文件 @
0f461e87
...
@@ -434,7 +434,7 @@ static rt_err_t hpm_i2s_start(struct rt_audio_device* audio, int stream)
...
@@ -434,7 +434,7 @@ static rt_err_t hpm_i2s_start(struct rt_audio_device* audio, int stream)
}
}
if
(
RT_EOK
!=
hpm_i2s_transmit
(
&
hpm_audio
->
audio
,
NULL
,
hpm_audio
->
rx_buff
,
I2S_FIFO_SIZE
))
{
if
(
RT_EOK
!=
hpm_i2s_transmit
(
&
hpm_audio
->
audio
,
NULL
,
hpm_audio
->
rx_buff
,
I2S_FIFO_SIZE
))
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
}
else
{
}
else
{
return
-
RT_ERROR
;
return
-
RT_ERROR
;
...
...
bsp/hpmicro/libraries/drivers/drv_pdm.c
浏览文件 @
0f461e87
...
@@ -217,7 +217,7 @@ static rt_err_t hpm_pdm_start(struct rt_audio_device* audio, int stream)
...
@@ -217,7 +217,7 @@ static rt_err_t hpm_pdm_start(struct rt_audio_device* audio, int stream)
}
}
if
(
RT_EOK
!=
hpm_pdm_dma_transmit
())
{
if
(
RT_EOK
!=
hpm_pdm_dma_transmit
())
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
}
}
...
@@ -254,7 +254,7 @@ static rt_err_t hpm_pdm_dma_transmit()
...
@@ -254,7 +254,7 @@ static rt_err_t hpm_pdm_dma_transmit()
if
(
status_success
!=
dma_setup_channel
(
dma_resource
.
base
,
dma_resource
.
channel
,
&
ch_config
))
{
if
(
status_success
!=
dma_setup_channel
(
dma_resource
.
base
,
dma_resource
.
channel
,
&
ch_config
))
{
LOG_E
(
"dma setup channel failed
\n
"
);
LOG_E
(
"dma setup channel failed
\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
if
(
l1c_dc_is_enabled
())
{
if
(
l1c_dc_is_enabled
())
{
...
...
bsp/hpmicro/libraries/drivers/drv_uart_v2.c
浏览文件 @
0f461e87
...
@@ -704,7 +704,7 @@ hpm_stat_t hpm_uart_dma_tx_init(struct hpm_uart *uart_ctx)
...
@@ -704,7 +704,7 @@ hpm_stat_t hpm_uart_dma_tx_init(struct hpm_uart *uart_ctx)
return
status
;
return
status
;
}
}
static
in
t
hpm_uart_dma_config
(
struct
rt_serial_device
*
serial
,
void
*
arg
)
static
rt_err_
t
hpm_uart_dma_config
(
struct
rt_serial_device
*
serial
,
void
*
arg
)
{
{
rt_ubase_t
ctrl_arg
=
(
rt_ubase_t
)
arg
;
rt_ubase_t
ctrl_arg
=
(
rt_ubase_t
)
arg
;
struct
hpm_uart
*
uart
=
(
struct
hpm_uart
*
)
serial
->
parent
.
user_data
;
struct
hpm_uart
*
uart
=
(
struct
hpm_uart
*
)
serial
->
parent
.
user_data
;
...
@@ -720,7 +720,7 @@ static int hpm_uart_dma_config(struct rt_serial_device *serial, void *arg)
...
@@ -720,7 +720,7 @@ static int hpm_uart_dma_config(struct rt_serial_device *serial, void *arg)
config
.
src_fixed
=
true
;
config
.
src_fixed
=
true
;
config
.
size_in_byte
=
serial
->
config
.
rx_bufsz
;
config
.
size_in_byte
=
serial
->
config
.
rx_bufsz
;
if
(
status_success
!=
dma_setup_handshake
(
uart
->
rx_chn_ctx
.
resource
.
base
,
&
config
))
{
if
(
status_success
!=
dma_setup_handshake
(
uart
->
rx_chn_ctx
.
resource
.
base
,
&
config
))
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
uint32_t
mux
=
DMA_SOC_CHN_TO_DMAMUX_CHN
(
uart
->
rx_chn_ctx
.
resource
.
base
,
uart
->
rx_dma_mux
);
uint32_t
mux
=
DMA_SOC_CHN_TO_DMAMUX_CHN
(
uart
->
rx_chn_ctx
.
resource
.
base
,
uart
->
rx_dma_mux
);
dmamux_config
(
BOARD_UART_DMAMUX
,
uart
->
rx_chn_ctx
.
resource
.
channel
,
mux
,
true
);
dmamux_config
(
BOARD_UART_DMAMUX
,
uart
->
rx_chn_ctx
.
resource
.
channel
,
mux
,
true
);
...
@@ -1288,7 +1288,7 @@ int rt_hw_uart_init(void)
...
@@ -1288,7 +1288,7 @@ int rt_hw_uart_init(void)
}
}
if
(
RT_EOK
!=
hpm_uart_config
())
{
if
(
RT_EOK
!=
hpm_uart_config
())
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
for
(
uint32_t
i
=
0
;
i
<
sizeof
(
uarts
)
/
sizeof
(
uarts
[
0
]);
i
++
)
{
for
(
uint32_t
i
=
0
;
i
<
sizeof
(
uarts
)
/
sizeof
(
uarts
[
0
]);
i
++
)
{
...
...
bsp/imxrt/libraries/drivers/drv_can.c
浏览文件 @
0f461e87
...
@@ -263,7 +263,7 @@ static rt_err_t can_control(struct rt_can_device *can_dev, int cmd, void *arg)
...
@@ -263,7 +263,7 @@ static rt_err_t can_control(struct rt_can_device *can_dev, int cmd, void *arg)
if
(
filter_mask
==
0xffffffff
)
if
(
filter_mask
==
0xffffffff
)
{
{
LOG_E
(
"%s filter is full!
\n
"
,
can
->
name
);
LOG_E
(
"%s filter is full!
\n
"
,
can
->
name
);
res
=
RT_ERROR
;
res
=
-
RT_ERROR
;
break
;
break
;
}
}
else
if
(
filter_mask
==
0
)
else
if
(
filter_mask
==
0
)
...
@@ -316,7 +316,7 @@ static rt_err_t can_control(struct rt_can_device *can_dev, int cmd, void *arg)
...
@@ -316,7 +316,7 @@ static rt_err_t can_control(struct rt_can_device *can_dev, int cmd, void *arg)
{
{
if
(
filter_mask
&
(
1
<<
item
->
hdr_bank
))
if
(
filter_mask
&
(
1
<<
item
->
hdr_bank
))
{
{
res
=
RT_ERROR
;
res
=
-
RT_ERROR
;
LOG_E
(
"%s hdr%d filter already set!
\n
"
,
can
->
name
,
item
->
hdr_bank
);
LOG_E
(
"%s hdr%d filter already set!
\n
"
,
can
->
name
,
item
->
hdr_bank
);
break
;
break
;
}
}
...
@@ -338,28 +338,28 @@ static rt_err_t can_control(struct rt_can_device *can_dev, int cmd, void *arg)
...
@@ -338,28 +338,28 @@ static rt_err_t can_control(struct rt_can_device *can_dev, int cmd, void *arg)
break
;
break
;
case
RT_CAN_CMD_SET_BAUD
:
case
RT_CAN_CMD_SET_BAUD
:
res
=
RT_ERROR
;
res
=
-
RT_ERROR
;
break
;
break
;
case
RT_CAN_CMD_SET_MODE
:
case
RT_CAN_CMD_SET_MODE
:
res
=
RT_ERROR
;
res
=
-
RT_ERROR
;
break
;
break
;
case
RT_CAN_CMD_SET_PRIV
:
case
RT_CAN_CMD_SET_PRIV
:
res
=
RT_ERROR
;
res
=
-
RT_ERROR
;
break
;
break
;
case
RT_CAN_CMD_GET_STATUS
:
case
RT_CAN_CMD_GET_STATUS
:
FLEXCAN_GetBusErrCount
(
can
->
base
,
(
rt_uint8_t
*
)(
&
can
->
can_dev
.
status
.
snderrcnt
),
(
rt_uint8_t
*
)(
&
can
->
can_dev
.
status
.
rcverrcnt
));
FLEXCAN_GetBusErrCount
(
can
->
base
,
(
rt_uint8_t
*
)(
&
can
->
can_dev
.
status
.
snderrcnt
),
(
rt_uint8_t
*
)(
&
can
->
can_dev
.
status
.
rcverrcnt
));
rt_memcpy
(
arg
,
&
can
->
can_dev
.
status
,
sizeof
(
can
->
can_dev
.
status
));
rt_memcpy
(
arg
,
&
can
->
can_dev
.
status
,
sizeof
(
can
->
can_dev
.
status
));
break
;
break
;
default:
default:
res
=
RT_ERROR
;
res
=
-
RT_ERROR
;
break
;
break
;
}
}
return
res
;
return
res
;
}
}
static
in
t
can_send
(
struct
rt_can_device
*
can_dev
,
const
void
*
buf
,
rt_uint32_t
boxno
)
static
rt_ssize_
t
can_send
(
struct
rt_can_device
*
can_dev
,
const
void
*
buf
,
rt_uint32_t
boxno
)
{
{
struct
imxrt_can
*
can
;
struct
imxrt_can
*
can
;
struct
rt_can_msg
*
msg
;
struct
rt_can_msg
*
msg
;
...
@@ -420,14 +420,14 @@ static int can_send(struct rt_can_device *can_dev, const void *buf, rt_uint32_t
...
@@ -420,14 +420,14 @@ static int can_send(struct rt_can_device *can_dev, const void *buf, rt_uint32_t
ret
=
RT_EOK
;
ret
=
RT_EOK
;
break
;
break
;
case
kStatus_Fail
:
case
kStatus_Fail
:
ret
=
RT_ERROR
;
ret
=
-
RT_ERROR
;
break
;
break
;
case
kStatus_FLEXCAN_TxBusy
:
case
kStatus_FLEXCAN_TxBusy
:
ret
=
RT_EBUSY
;
ret
=
-
RT_EBUSY
;
break
;
break
;
}
}
return
ret
;
return
(
rt_ssize_t
)
ret
;
}
}
static
int
can_recv
(
struct
rt_can_device
*
can_dev
,
void
*
buf
,
rt_uint32_t
boxno
)
static
int
can_recv
(
struct
rt_can_device
*
can_dev
,
void
*
buf
,
rt_uint32_t
boxno
)
...
...
bsp/imxrt/libraries/drivers/drv_i2c.c
浏览文件 @
0f461e87
...
@@ -375,7 +375,7 @@ static rt_err_t imxrt_i2c_bus_control(struct rt_i2c_bus_device *bus,
...
@@ -375,7 +375,7 @@ static rt_err_t imxrt_i2c_bus_control(struct rt_i2c_bus_device *bus,
rt_uint32_t
cmd
,
rt_uint32_t
cmd
,
rt_uint32_t
arg
)
rt_uint32_t
arg
)
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
#endif
#endif
...
...
bsp/imxrt/libraries/drivers/drv_rtc.c
浏览文件 @
0f461e87
...
@@ -183,7 +183,7 @@ static int rtc_sample(int argc, char *argv[])
...
@@ -183,7 +183,7 @@ static int rtc_sample(int argc, char *argv[])
if
(
!
device
)
if
(
!
device
)
{
{
LOG_E
(
"find %s failed!"
,
RTC_NAME
);
LOG_E
(
"find %s failed!"
,
RTC_NAME
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
if
(
rt_device_open
(
device
,
0
)
!=
RT_EOK
)
if
(
rt_device_open
(
device
,
0
)
!=
RT_EOK
)
...
...
bsp/imxrt/libraries/drivers/drv_usbd.c
浏览文件 @
0f461e87
...
@@ -220,7 +220,7 @@ static rt_err_t drv_ehci0_usbd_init(rt_device_t device)
...
@@ -220,7 +220,7 @@ static rt_err_t drv_ehci0_usbd_init(rt_device_t device)
else
else
{
{
rt_kprintf
(
"USB_DeviceInit ehci0 error
\r\n
"
);
rt_kprintf
(
"USB_DeviceInit ehci0 error
\r\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
RT_EOK
;
return
RT_EOK
;
}
}
...
...
bsp/k210/drivers/drv_lcd.c
浏览文件 @
0f461e87
...
@@ -390,7 +390,7 @@ static rt_err_t drv_lcd_init(rt_device_t dev)
...
@@ -390,7 +390,7 @@ static rt_err_t drv_lcd_init(rt_device_t dev)
if
(
!
lcd
)
if
(
!
lcd
)
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
drv_lcd_hw_init
(
lcd
);
drv_lcd_hw_init
(
lcd
);
/* reset LCD */
/* reset LCD */
...
...
bsp/loongson/ls1cdev/drivers/display_controller.c
浏览文件 @
0f461e87
...
@@ -134,7 +134,7 @@ static rt_err_t rt_dc_init(rt_device_t dev)
...
@@ -134,7 +134,7 @@ static rt_err_t rt_dc_init(rt_device_t dev)
if
(
mode
<
0
)
if
(
mode
<
0
)
{
{
rt_kprintf
(
"
\n\n\n
unsupported framebuffer resolution
\n\n\n
"
);
rt_kprintf
(
"
\n\n\n
unsupported framebuffer resolution
\n\n\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
DC_FB_CONFIG
=
0x0
;
DC_FB_CONFIG
=
0x0
;
...
...
bsp/loongson/ls1cdev/drivers/drv_can.c
浏览文件 @
0f461e87
...
@@ -276,7 +276,7 @@ static rt_err_t control(struct rt_can_device *can, int cmd, void *arg)
...
@@ -276,7 +276,7 @@ static rt_err_t control(struct rt_can_device *can, int cmd, void *arg)
argval
!=
RT_CAN_MODE_LOOPBACK
||
argval
!=
RT_CAN_MODE_LOOPBACK
||
argval
!=
RT_CAN_MODE_LOOPBACKANLISTEN
)
argval
!=
RT_CAN_MODE_LOOPBACKANLISTEN
)
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
if
(
argval
!=
can
->
config
.
mode
)
if
(
argval
!=
can
->
config
.
mode
)
{
{
...
@@ -294,7 +294,7 @@ static rt_err_t control(struct rt_can_device *can, int cmd, void *arg)
...
@@ -294,7 +294,7 @@ static rt_err_t control(struct rt_can_device *can, int cmd, void *arg)
argval
!=
CAN100kBaud
&&
argval
!=
CAN100kBaud
&&
argval
!=
CAN50kBaud
)
argval
!=
CAN50kBaud
)
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
if
(
argval
!=
can
->
config
.
baud_rate
)
if
(
argval
!=
can
->
config
.
baud_rate
)
{
{
...
...
bsp/loongson/ls1cdev/drivers/drv_touch.c
浏览文件 @
0f461e87
...
@@ -229,7 +229,7 @@ static int rt_touch_init(void)
...
@@ -229,7 +229,7 @@ static int rt_touch_init(void)
return
rt_thread_startup
(
thread
);
return
rt_thread_startup
(
thread
);
}
}
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
INIT_APP_EXPORT
(
rt_touch_init
);
INIT_APP_EXPORT
(
rt_touch_init
);
...
...
bsp/loongson/ls1cdev/drivers/drv_wdt.c
浏览文件 @
0f461e87
...
@@ -36,7 +36,7 @@ static rt_err_t wdt_stop(void)
...
@@ -36,7 +36,7 @@ static rt_err_t wdt_stop(void)
if
(
ret
!=
RT_EOK
)
if
(
ret
!=
RT_EOK
)
{
{
rt_kprintf
(
"Wdog_Disable error!
\n
"
);
rt_kprintf
(
"Wdog_Disable error!
\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
ret
;
return
ret
;
}
}
...
@@ -50,7 +50,7 @@ static rt_err_t wdt_start(int mode)
...
@@ -50,7 +50,7 @@ static rt_err_t wdt_start(int mode)
if
(
ret
!=
RT_EOK
)
if
(
ret
!=
RT_EOK
)
{
{
rt_kprintf
(
"Wdog_Disable error!
\n
"
);
rt_kprintf
(
"Wdog_Disable error!
\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
if
((
mode
==
RESTENABLE
)
||
(
mode
==
INTERRUPTENABLE
))
if
((
mode
==
RESTENABLE
)
||
(
mode
==
INTERRUPTENABLE
))
...
@@ -62,7 +62,7 @@ static rt_err_t wdt_start(int mode)
...
@@ -62,7 +62,7 @@ static rt_err_t wdt_start(int mode)
if
(
ret
!=
RT_EOK
)
if
(
ret
!=
RT_EOK
)
{
{
rt_kprintf
(
"Wdog_Enable error!
\n
"
);
rt_kprintf
(
"Wdog_Enable error!
\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
ret
;
return
ret
;
...
@@ -79,7 +79,7 @@ static rt_err_t wdt_keepalive(void)
...
@@ -79,7 +79,7 @@ static rt_err_t wdt_keepalive(void)
if
(
ret
!=
0
)
if
(
ret
!=
0
)
{
{
rt_kprintf
(
"LS1C_Wdog_ClrTimeout error!
\n
"
);
rt_kprintf
(
"LS1C_Wdog_ClrTimeout error!
\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
ret
;
return
ret
;
...
@@ -106,7 +106,7 @@ static rt_err_t wdt_set_timeout(rt_uint32_t second)
...
@@ -106,7 +106,7 @@ static rt_err_t wdt_set_timeout(rt_uint32_t second)
if
(
ret
!=
RT_EOK
)
if
(
ret
!=
RT_EOK
)
{
{
rt_kprintf
(
"Wdog_LoadValue error!
\n
"
);
rt_kprintf
(
"Wdog_LoadValue error!
\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
ret
;
return
ret
;
}
}
...
...
bsp/loongson/ls2kdev/drivers/drv_uart.c
浏览文件 @
0f461e87
...
@@ -44,7 +44,7 @@ static rt_err_t ls2k_uart_set_buad(struct rt_serial_device *serial, struct seria
...
@@ -44,7 +44,7 @@ static rt_err_t ls2k_uart_set_buad(struct rt_serial_device *serial, struct seria
UART_LCR
(
uart_dev
->
base
)
=
0x80
;
// Activate buadcfg
UART_LCR
(
uart_dev
->
base
)
=
0x80
;
// Activate buadcfg
UART_LSB
(
uart_dev
->
base
)
=
brtc
&
0xff
;
UART_LSB
(
uart_dev
->
base
)
=
brtc
&
0xff
;
UART_MSB
(
uart_dev
->
base
)
=
brtc
>>
8
;
UART_MSB
(
uart_dev
->
base
)
=
brtc
>>
8
;
if
(((((
short
)
UART_MSB
(
uart_dev
->
base
))
<<
8
)
|
UART_LSB
(
uart_dev
->
base
))
!=
brtc
)
ret
=
RT_ERROR
;
if
(((((
short
)
UART_MSB
(
uart_dev
->
base
))
<<
8
)
|
UART_LSB
(
uart_dev
->
base
))
!=
brtc
)
ret
=
-
RT_ERROR
;
UART_LCR
(
uart_dev
->
base
)
=
CFCR_8BITS
;
// Back to normal
UART_LCR
(
uart_dev
->
base
)
=
CFCR_8BITS
;
// Back to normal
UART_MCR
(
uart_dev
->
base
)
=
MCR_IENABLE
/* | MCR_DTR | MCR_RTS*/
;
UART_MCR
(
uart_dev
->
base
)
=
MCR_IENABLE
/* | MCR_DTR | MCR_RTS*/
;
UART_IER
(
uart_dev
->
base
)
=
0
;
UART_IER
(
uart_dev
->
base
)
=
0
;
...
...
bsp/lpc54114-lite/drivers/drv_gpio.c
浏览文件 @
0f461e87
...
@@ -146,7 +146,7 @@ static int lpc_pin_read(rt_device_t dev, rt_base_t pin)
...
@@ -146,7 +146,7 @@ static int lpc_pin_read(rt_device_t dev, rt_base_t pin)
int
portx
,
piny
,
value
;
int
portx
,
piny
,
value
;
if
(
pin
>
PIN_MAX_VAL
)
if
(
pin
>
PIN_MAX_VAL
)
return
RT_ERROR
;
return
-
RT_ERROR
;
portx
=
get_port
(
pin
);
portx
=
get_port
(
pin
);
piny
=
get_pin
(
pin
);
piny
=
get_pin
(
pin
);
...
@@ -187,7 +187,7 @@ static rt_err_t lpc_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
...
@@ -187,7 +187,7 @@ static rt_err_t lpc_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
int
portx
,
piny
,
trigger_mode
,
pin_initx
,
pintsel
,
pin_cfg
,
i
;
int
portx
,
piny
,
trigger_mode
,
pin_initx
,
pintsel
,
pin_cfg
,
i
;
if
(
pin
>
PIN_MAX_VAL
)
if
(
pin
>
PIN_MAX_VAL
)
return
RT_ERROR
;
return
-
RT_ERROR
;
portx
=
get_port
(
pin
);
portx
=
get_port
(
pin
);
piny
=
get_pin
(
pin
);
piny
=
get_pin
(
pin
);
...
@@ -228,7 +228,7 @@ static rt_err_t lpc_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
...
@@ -228,7 +228,7 @@ static rt_err_t lpc_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
}
}
if
(
i
>=
IRQ_MAX_VAL
)
if
(
i
>=
IRQ_MAX_VAL
)
return
RT_ERROR
;
return
-
RT_ERROR
;
/* open clk */
/* open clk */
CLOCK_EnableClock
(
kCLOCK_InputMux
);
CLOCK_EnableClock
(
kCLOCK_InputMux
);
...
@@ -258,7 +258,7 @@ static rt_err_t lpc_pin_detach_irq(struct rt_device *device, rt_int32_t pin)
...
@@ -258,7 +258,7 @@ static rt_err_t lpc_pin_detach_irq(struct rt_device *device, rt_int32_t pin)
int
i
;
int
i
;
if
(
pin
>
PIN_MAX_VAL
)
if
(
pin
>
PIN_MAX_VAL
)
return
RT_ERROR
;
return
-
RT_ERROR
;
for
(
i
=
0
;
i
<
IRQ_MAX_VAL
;
i
++
)
for
(
i
=
0
;
i
<
IRQ_MAX_VAL
;
i
++
)
{
{
...
@@ -280,7 +280,7 @@ static rt_err_t lpc_pin_irq_enable(struct rt_device *device, rt_base_t pin,
...
@@ -280,7 +280,7 @@ static rt_err_t lpc_pin_irq_enable(struct rt_device *device, rt_base_t pin,
int
irqn_type
,
i
;
int
irqn_type
,
i
;
if
(
pin
>
PIN_MAX_VAL
)
if
(
pin
>
PIN_MAX_VAL
)
return
RT_ERROR
;
return
-
RT_ERROR
;
for
(
i
=
0
;
i
<
IRQ_MAX_VAL
;
i
++
)
for
(
i
=
0
;
i
<
IRQ_MAX_VAL
;
i
++
)
{
{
...
@@ -318,7 +318,7 @@ static rt_err_t lpc_pin_irq_enable(struct rt_device *device, rt_base_t pin,
...
@@ -318,7 +318,7 @@ static rt_err_t lpc_pin_irq_enable(struct rt_device *device, rt_base_t pin,
}
}
if
(
i
>=
IRQ_MAX_VAL
)
if
(
i
>=
IRQ_MAX_VAL
)
return
RT_ERROR
;
return
-
RT_ERROR
;
return
RT_EOK
;
return
RT_EOK
;
}
}
...
...
bsp/lpc54114-lite/drivers/drv_spi_flash.c
浏览文件 @
0f461e87
...
@@ -26,7 +26,7 @@ int rt_hw_flash_init(void)
...
@@ -26,7 +26,7 @@ int rt_hw_flash_init(void)
if
(
rt_sfud_flash_probe
(
"flash0"
,
"spi20"
)
==
RT_NULL
)
if
(
rt_sfud_flash_probe
(
"flash0"
,
"spi20"
)
==
RT_NULL
)
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
RT_EOK
;
return
RT_EOK
;
...
...
bsp/lpc54608-LPCXpresso/drivers/drv_emac.c
浏览文件 @
0f461e87
...
@@ -288,7 +288,7 @@ static rt_err_t lpc_emac_phy_init(phy_speed_t * speed, phy_duplex_t * duplex)
...
@@ -288,7 +288,7 @@ static rt_err_t lpc_emac_phy_init(phy_speed_t * speed, phy_duplex_t * duplex)
eth_device_linkchange
(
&
lpc_emac_device
.
parent
,
RT_FALSE
);
eth_device_linkchange
(
&
lpc_emac_device
.
parent
,
RT_FALSE
);
ETH_PRINTF
(
"PHY_Init failed!
\n
"
);
ETH_PRINTF
(
"PHY_Init failed!
\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
/* Wait for link up and get the actual PHY link speed. */
/* Wait for link up and get the actual PHY link speed. */
...
@@ -428,7 +428,7 @@ rt_err_t lpc_emac_tx(rt_device_t dev, struct pbuf *p)
...
@@ -428,7 +428,7 @@ rt_err_t lpc_emac_tx(rt_device_t dev, struct pbuf *p)
if
(
p
->
tot_len
>
ENET_TXBUFF_SIZE
)
if
(
p
->
tot_len
>
ENET_TXBUFF_SIZE
)
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
packet_dump
(
"TX dump"
,
p
);
packet_dump
(
"TX dump"
,
p
);
...
@@ -439,7 +439,7 @@ rt_err_t lpc_emac_tx(rt_device_t dev, struct pbuf *p)
...
@@ -439,7 +439,7 @@ rt_err_t lpc_emac_tx(rt_device_t dev, struct pbuf *p)
result
=
rt_sem_take
(
&
lpc_emac_device
.
tx_wait
,
RT_TICK_PER_SECOND
/
10
);
result
=
rt_sem_take
(
&
lpc_emac_device
.
tx_wait
,
RT_TICK_PER_SECOND
/
10
);
if
(
result
!=
RT_EOK
)
if
(
result
!=
RT_EOK
)
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
}
}
...
@@ -453,7 +453,7 @@ rt_err_t lpc_emac_tx(rt_device_t dev, struct pbuf *p)
...
@@ -453,7 +453,7 @@ rt_err_t lpc_emac_tx(rt_device_t dev, struct pbuf *p)
if
((
result
==
kStatus_ENET_TxFrameFail
)
||
(
result
==
kStatus_ENET_TxFrameOverLen
)
||
(
result
==
kStatus_ENET_TxFrameBusy
))
if
((
result
==
kStatus_ENET_TxFrameFail
)
||
(
result
==
kStatus_ENET_TxFrameOverLen
)
||
(
result
==
kStatus_ENET_TxFrameBusy
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
RT_EOK
;
return
RT_EOK
;
...
...
bsp/lpc54608-LPCXpresso/drivers/drv_i2c.c
浏览文件 @
0f461e87
...
@@ -149,7 +149,7 @@ static rt_ssize_t lpc_i2c_xfer(struct rt_i2c_bus_device *bus,
...
@@ -149,7 +149,7 @@ static rt_ssize_t lpc_i2c_xfer(struct rt_i2c_bus_device *bus,
struct
rt_i2c_msg
*
msg
;
struct
rt_i2c_msg
*
msg
;
i2c_master_transfer_t
xfer
=
{
0
};
i2c_master_transfer_t
xfer
=
{
0
};
rt_uint32_t
i
;
rt_uint32_t
i
;
rt_err_t
ret
=
RT_ERROR
;
rt_err_t
ret
=
-
RT_ERROR
;
struct
lpc_i2c_bus
*
lpc_i2c
=
(
struct
lpc_i2c_bus
*
)
bus
;
struct
lpc_i2c_bus
*
lpc_i2c
=
(
struct
lpc_i2c_bus
*
)
bus
;
...
...
bsp/lpc55sxx/Libraries/drivers/drv_i2c.c
浏览文件 @
0f461e87
...
@@ -89,7 +89,7 @@ static rt_ssize_t lpc_i2c_xfer(struct rt_i2c_bus_device *bus,
...
@@ -89,7 +89,7 @@ static rt_ssize_t lpc_i2c_xfer(struct rt_i2c_bus_device *bus,
struct
rt_i2c_msg
*
msg
;
struct
rt_i2c_msg
*
msg
;
i2c_master_transfer_t
xfer
=
{
0
};
i2c_master_transfer_t
xfer
=
{
0
};
rt_uint32_t
i
;
rt_uint32_t
i
;
rt_err_t
ret
=
RT_ERROR
;
rt_err_t
ret
=
-
RT_ERROR
;
struct
lpc_i2c_bus
*
lpc_i2c
=
(
struct
lpc_i2c_bus
*
)
bus
;
struct
lpc_i2c_bus
*
lpc_i2c
=
(
struct
lpc_i2c_bus
*
)
bus
;
...
...
bsp/lpc55sxx/Libraries/drivers/drv_mma8562.c
浏览文件 @
0f461e87
...
@@ -118,7 +118,7 @@ int mma8562_hw_init(void)
...
@@ -118,7 +118,7 @@ int mma8562_hw_init(void)
if
(
val
!=
kMMA8562_WHO_AM_I_Device_ID
)
if
(
val
!=
kMMA8562_WHO_AM_I_Device_ID
)
{
{
rt_kprintf
(
"MMA8562: Unexpected result from WHO_AM_I (0x%02x)
\n
"
,
val
);
rt_kprintf
(
"MMA8562: Unexpected result from WHO_AM_I (0x%02x)
\n
"
,
val
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
/* please refer to the "example FXOS8700CQ Driver Code" in FXOS8700 datasheet. */
/* please refer to the "example FXOS8700CQ Driver Code" in FXOS8700 datasheet. */
...
...
bsp/lpc55sxx/Libraries/drivers/drv_pin.c
浏览文件 @
0f461e87
...
@@ -206,7 +206,7 @@ static rt_int8_t lpc_pin_read(rt_device_t dev, rt_base_t pin)
...
@@ -206,7 +206,7 @@ static rt_int8_t lpc_pin_read(rt_device_t dev, rt_base_t pin)
int
value
;
int
value
;
if
((
pin
>
__ARRAY_LEN
(
lpc_pin_map
))
||
(
pin
==
0
))
if
((
pin
>
__ARRAY_LEN
(
lpc_pin_map
))
||
(
pin
==
0
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
value
=
GPIO_PinRead
(
lpc_pin_map
[
pin
].
gpio
,
lpc_pin_map
[
pin
].
gpio_port
,
lpc_pin_map
[
pin
].
gpio_pin
);
value
=
GPIO_PinRead
(
lpc_pin_map
[
pin
].
gpio
,
lpc_pin_map
[
pin
].
gpio_port
,
lpc_pin_map
[
pin
].
gpio_pin
);
...
@@ -268,7 +268,7 @@ static rt_err_t lpc_pin_attach_irq(struct rt_device *device,
...
@@ -268,7 +268,7 @@ static rt_err_t lpc_pin_attach_irq(struct rt_device *device,
if
((
pin
>
__ARRAY_LEN
(
lpc_pin_map
))
||
(
pin
==
0
))
if
((
pin
>
__ARRAY_LEN
(
lpc_pin_map
))
||
(
pin
==
0
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
switch
(
mode
)
switch
(
mode
)
...
@@ -307,7 +307,7 @@ static rt_err_t lpc_pin_attach_irq(struct rt_device *device,
...
@@ -307,7 +307,7 @@ static rt_err_t lpc_pin_attach_irq(struct rt_device *device,
}
}
if
(
i
>=
IRQ_MAX_VAL
)
if
(
i
>=
IRQ_MAX_VAL
)
return
RT_ERROR
;
return
-
RT_ERROR
;
/* Initialize PINT */
/* Initialize PINT */
PINT_Init
(
PINT
);
PINT_Init
(
PINT
);
...
@@ -342,7 +342,7 @@ static rt_err_t lpc_pin_detach_irq(struct rt_device *device, rt_base_t pin)
...
@@ -342,7 +342,7 @@ static rt_err_t lpc_pin_detach_irq(struct rt_device *device, rt_base_t pin)
if
((
pin
>
__ARRAY_LEN
(
lpc_pin_map
))
||
(
pin
==
0
))
if
((
pin
>
__ARRAY_LEN
(
lpc_pin_map
))
||
(
pin
==
0
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
for
(
i
=
0
;
i
<
IRQ_MAX_VAL
;
i
++
)
for
(
i
=
0
;
i
<
IRQ_MAX_VAL
;
i
++
)
...
@@ -365,7 +365,7 @@ static rt_err_t lpc_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_u
...
@@ -365,7 +365,7 @@ static rt_err_t lpc_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_u
if
((
pin
>
__ARRAY_LEN
(
lpc_pin_map
))
||
(
pin
==
0
))
if
((
pin
>
__ARRAY_LEN
(
lpc_pin_map
))
||
(
pin
==
0
))
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
for
(
i
=
0
;
i
<
IRQ_MAX_VAL
;
i
++
)
for
(
i
=
0
;
i
<
IRQ_MAX_VAL
;
i
++
)
...
@@ -404,7 +404,7 @@ static rt_err_t lpc_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_u
...
@@ -404,7 +404,7 @@ static rt_err_t lpc_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_u
}
}
if
(
i
>=
IRQ_MAX_VAL
)
if
(
i
>=
IRQ_MAX_VAL
)
return
RT_ERROR
;
return
-
RT_ERROR
;
return
RT_EOK
;
return
RT_EOK
;
}
}
...
...
bsp/maxim/libraries/HAL_Drivers/drv_spi.c
浏览文件 @
0f461e87
...
@@ -38,7 +38,7 @@ static struct mcu_drv_spi spi_bus_obj[sizeof(spi_config) / sizeof(spi_config[0])
...
@@ -38,7 +38,7 @@ static struct mcu_drv_spi spi_bus_obj[sizeof(spi_config) / sizeof(spi_config[0])
* @brief This function config spi bus
* @brief This function config spi bus
* @param device
* @param device
* @param configuration
* @param configuration
* @retval RT_EOK / RT_ERROR
* @retval RT_EOK /
-
RT_ERROR
*/
*/
static
rt_err_t
spi_configure
(
struct
rt_spi_device
*
device
,
static
rt_err_t
spi_configure
(
struct
rt_spi_device
*
device
,
struct
rt_spi_configuration
*
configuration
)
struct
rt_spi_configuration
*
configuration
)
...
@@ -63,7 +63,7 @@ static rt_err_t spi_configure(struct rt_spi_device *device,
...
@@ -63,7 +63,7 @@ static rt_err_t spi_configure(struct rt_spi_device *device,
break
;
break
;
default:
default:
LOG_E
(
"spi_configure mode error %x
\n
"
,
configuration
->
mode
);
LOG_E
(
"spi_configure mode error %x
\n
"
,
configuration
->
mode
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
tmp_spi
->
spixfer_req
.
width
=
SPI17Y_WIDTH_1
;
tmp_spi
->
spixfer_req
.
width
=
SPI17Y_WIDTH_1
;
...
@@ -119,7 +119,7 @@ static const struct rt_spi_ops nrfx_spi_ops =
...
@@ -119,7 +119,7 @@ static const struct rt_spi_ops nrfx_spi_ops =
/*spi bus init*/
/*spi bus init*/
static
int
rt_hw_spi_bus_init
(
void
)
static
int
rt_hw_spi_bus_init
(
void
)
{
{
rt_err_t
result
=
RT_ERROR
;
rt_err_t
result
=
-
RT_ERROR
;
for
(
int
i
=
0
;
i
<
sizeof
(
spi_config
)
/
sizeof
(
spi_config
[
0
]);
i
++
)
for
(
int
i
=
0
;
i
<
sizeof
(
spi_config
)
/
sizeof
(
spi_config
[
0
]);
i
++
)
{
{
spi_bus_obj
[
i
].
spi_instance
=
spi_config
[
i
].
spi_instance
;
spi_bus_obj
[
i
].
spi_instance
=
spi_config
[
i
].
spi_instance
;
...
@@ -155,7 +155,7 @@ rt_err_t rt_hw_spi_device_attach(const char *bus_name, const char *device_name,
...
@@ -155,7 +155,7 @@ rt_err_t rt_hw_spi_device_attach(const char *bus_name, const char *device_name,
if
(
result
!=
RT_EOK
)
if
(
result
!=
RT_EOK
)
{
{
LOG_E
(
"%s attach to %s faild, %d"
,
device_name
,
bus_name
,
result
);
LOG_E
(
"%s attach to %s faild, %d"
,
device_name
,
bus_name
,
result
);
result
=
RT_ERROR
;
result
=
-
RT_ERROR
;
}
}
/* TODO: SET THE GPIO */
/* TODO: SET THE GPIO */
...
...
bsp/maxim/libraries/HAL_Drivers/drv_spi.h
浏览文件 @
0f461e87
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
* @param bus_name spi bus name "spi0"/"spi1"/"spi2"
* @param bus_name spi bus name "spi0"/"spi1"/"spi2"
* @param device_name spi device name "spi0x"/"spi1x"/"spi2x"
* @param device_name spi device name "spi0x"/"spi1x"/"spi2x"
* @param ss_pin spi ss pin number
* @param ss_pin spi ss pin number
* @retval RT_ERROR / RT_EOK
* @retval
-
RT_ERROR / RT_EOK
*/
*/
rt_err_t
rt_hw_spi_device_attach
(
const
char
*
bus_name
,
const
char
*
device_name
,
rt_uint32_t
ss_pin
);
rt_err_t
rt_hw_spi_device_attach
(
const
char
*
bus_name
,
const
char
*
device_name
,
rt_uint32_t
ss_pin
);
...
...
bsp/microchip/common/applications/can_demo.c
浏览文件 @
0f461e87
...
@@ -266,7 +266,7 @@ static void can_thread_entry(void* parameter)
...
@@ -266,7 +266,7 @@ static void can_thread_entry(void* parameter)
*
*
* @param msg - message to be sent, timeouts - wait timeouts for Tx completion.
* @param msg - message to be sent, timeouts - wait timeouts for Tx completion.
*
*
* @return RT_OK or RT_ERROR.
* @return RT_OK or
-
RT_ERROR.
*/
*/
rt_err_t
can_send_message
(
struct
can_message
*
msg
,
rt_uint32_t
timeouts
)
rt_err_t
can_send_message
(
struct
can_message
*
msg
,
rt_uint32_t
timeouts
)
...
@@ -276,7 +276,7 @@ rt_err_t can_send_message(struct can_message *msg, rt_uint32_t timeouts)
...
@@ -276,7 +276,7 @@ rt_err_t can_send_message(struct can_message *msg, rt_uint32_t timeouts)
if
(
RT_NULL
==
msg
)
if
(
RT_NULL
==
msg
)
{
{
rt_kprintf
(
"can_send_message input message error
\r\n
"
);
rt_kprintf
(
"can_send_message input message error
\r\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
can_async_write
(
&
CAN_0
,
msg
);
can_async_write
(
&
CAN_0
,
msg
);
...
...
bsp/microchip/common/board/sam_gmac.c
浏览文件 @
0f461e87
...
@@ -332,7 +332,7 @@ static void rt_sam_eth_monitor(void *parameter)
...
@@ -332,7 +332,7 @@ static void rt_sam_eth_monitor(void *parameter)
*
*
* @param
* @param
*
*
* @return RT_OK or RT_ERROR.
* @return RT_OK or
-
RT_ERROR.
*/
*/
static
int
rt_hw_sam_eth_init
(
void
)
static
int
rt_hw_sam_eth_init
(
void
)
...
...
bsp/microchip/common/board/sam_i2c.c
浏览文件 @
0f461e87
...
@@ -93,7 +93,7 @@ static rt_err_t sam_i2c_bus_control(struct rt_i2c_bus_device *bus,
...
@@ -93,7 +93,7 @@ static rt_err_t sam_i2c_bus_control(struct rt_i2c_bus_device *bus,
rt_uint32_t
cmd
,
rt_uint32_t
cmd
,
rt_uint32_t
arg
)
rt_uint32_t
arg
)
{
{
return
RT_ERROR
;
return
-
RT_ERROR
;
struct
sam_i2c_bus
*
sam_i2c
=
(
struct
sam_i2c_bus
*
)
bus
;
struct
sam_i2c_bus
*
sam_i2c
=
(
struct
sam_i2c_bus
*
)
bus
;
RT_ASSERT
(
bus
!=
RT_NULL
);
RT_ASSERT
(
bus
!=
RT_NULL
);
...
...
bsp/n32/libraries/n32_drivers/drv_i2c.c
浏览文件 @
0f461e87
...
@@ -340,7 +340,7 @@ static rt_ssize_t rt_i2c_xfer(struct rt_i2c_bus_device *bus, struct rt_i2c_msg m
...
@@ -340,7 +340,7 @@ static rt_ssize_t rt_i2c_xfer(struct rt_i2c_bus_device *bus, struct rt_i2c_msg m
{
{
struct
rt_i2c_msg
*
msg
;
struct
rt_i2c_msg
*
msg
;
rt_uint32_t
i
;
rt_uint32_t
i
;
rt_err_t
ret
=
RT_ERROR
;
rt_err_t
ret
=
-
RT_ERROR
;
struct
rt_i2c_bus
*
rt_i2c
=
(
struct
rt_i2c_bus
*
)
bus
;
struct
rt_i2c_bus
*
rt_i2c
=
(
struct
rt_i2c_bus
*
)
bus
;
...
...
bsp/n32g452xx/Libraries/rt_drivers/drv_spi.c
浏览文件 @
0f461e87
...
@@ -103,7 +103,7 @@ static rt_err_t n32_spi_init(struct n32_spi *spi_drv, struct rt_spi_configuratio
...
@@ -103,7 +103,7 @@ static rt_err_t n32_spi_init(struct n32_spi *spi_drv, struct rt_spi_configuratio
if
(
cfg
->
mode
&
RT_SPI_SLAVE
)
if
(
cfg
->
mode
&
RT_SPI_SLAVE
)
{
{
/* SPI_InitStructure->SpiMode = SPI_MODE_SLAVE; */
/* SPI_InitStructure->SpiMode = SPI_MODE_SLAVE; */
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
else
else
{
{
...
...
bsp/n32g452xx/n32g452xx-mini-system/board/msp/n32_msp.c
浏览文件 @
0f461e87
...
@@ -864,7 +864,7 @@ static int adc_vol_sample(int argc, char *argv[])
...
@@ -864,7 +864,7 @@ static int adc_vol_sample(int argc, char *argv[])
if
(
adc_dev
==
RT_NULL
)
if
(
adc_dev
==
RT_NULL
)
{
{
rt_kprintf
(
"adc sample run failed! can't find %s device!
\n
"
,
ADC_DEV_NAME
);
rt_kprintf
(
"adc sample run failed! can't find %s device!
\n
"
,
ADC_DEV_NAME
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
for
(
int
i
=
1
;
i
<=
18
;
++
i
)
for
(
int
i
=
1
;
i
<=
18
;
++
i
)
...
@@ -900,7 +900,7 @@ static int hwtimer_init(const char *name)
...
@@ -900,7 +900,7 @@ static int hwtimer_init(const char *name)
if
(
hw_dev
==
RT_NULL
)
if
(
hw_dev
==
RT_NULL
)
{
{
rt_kprintf
(
"hwtimer sample run failed! can't find %s device!
\n
"
,
name
);
rt_kprintf
(
"hwtimer sample run failed! can't find %s device!
\n
"
,
name
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
ret
=
rt_device_open
(
hw_dev
,
RT_DEVICE_OFLAG_RDWR
);
ret
=
rt_device_open
(
hw_dev
,
RT_DEVICE_OFLAG_RDWR
);
if
(
ret
!=
RT_EOK
)
if
(
ret
!=
RT_EOK
)
...
@@ -921,7 +921,7 @@ static int hwtimer_init(const char *name)
...
@@ -921,7 +921,7 @@ static int hwtimer_init(const char *name)
if
(
rt_device_write
(
hw_dev
,
0
,
&
timeout_s
,
sizeof
(
timeout_s
))
!=
sizeof
(
timeout_s
))
if
(
rt_device_write
(
hw_dev
,
0
,
&
timeout_s
,
sizeof
(
timeout_s
))
!=
sizeof
(
timeout_s
))
{
{
rt_kprintf
(
"set timeout value failed
\n
"
);
rt_kprintf
(
"set timeout value failed
\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
rt_thread_mdelay
(
3500
);
rt_thread_mdelay
(
3500
);
...
...
bsp/nrf5x/libraries/drivers/drv_gpio.c
浏览文件 @
0f461e87
...
@@ -266,7 +266,7 @@ static rt_err_t nrf5x_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
...
@@ -266,7 +266,7 @@ static rt_err_t nrf5x_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
case
NRFX_ERROR_NO_MEM
:
case
NRFX_ERROR_NO_MEM
:
return
RT_ENOMEM
;
return
RT_ENOMEM
;
default:
default:
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
}
}
...
...
bsp/nrf5x/libraries/drivers/drv_pwm.c
浏览文件 @
0f461e87
...
@@ -397,7 +397,7 @@ static int pwm_led_sample(int argc, char *argv[])
...
@@ -397,7 +397,7 @@ static int pwm_led_sample(int argc, char *argv[])
if
(
pwm_dev
==
RT_NULL
)
if
(
pwm_dev
==
RT_NULL
)
{
{
rt_kprintf
(
"pwm sample run failed! can't find %s device!
\n
"
,
PWM_DEV_NAME
);
rt_kprintf
(
"pwm sample run failed! can't find %s device!
\n
"
,
PWM_DEV_NAME
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
rt_pwm_set
(
pwm_dev
,
PWM_DEV_CHANNEL
,
period
,
pulse
);
rt_pwm_set
(
pwm_dev
,
PWM_DEV_CHANNEL
,
period
,
pulse
);
...
...
bsp/nrf5x/libraries/drivers/drv_spi.c
浏览文件 @
0f461e87
...
@@ -143,7 +143,7 @@ nrfx_spim_evt_handler_t spi_handler[] = {spi0_handler, spi1_handler, spi2_handle
...
@@ -143,7 +143,7 @@ nrfx_spim_evt_handler_t spi_handler[] = {spi0_handler, spi1_handler, spi2_handle
* @brief This function config spi bus
* @brief This function config spi bus
* @param device
* @param device
* @param configuration
* @param configuration
* @retval RT_EOK / RT_ERROR
* @retval RT_EOK /
-
RT_ERROR
*/
*/
static
rt_err_t
spi_configure
(
struct
rt_spi_device
*
device
,
static
rt_err_t
spi_configure
(
struct
rt_spi_device
*
device
,
struct
rt_spi_configuration
*
configuration
)
struct
rt_spi_configuration
*
configuration
)
...
@@ -191,7 +191,7 @@ static rt_err_t spi_configure(struct rt_spi_device *device,
...
@@ -191,7 +191,7 @@ static rt_err_t spi_configure(struct rt_spi_device *device,
break
;
break
;
default:
default:
LOG_E
(
"spi_configure mode error %x
\n
"
,
configuration
->
mode
);
LOG_E
(
"spi_configure mode error %x
\n
"
,
configuration
->
mode
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
/* spi frequency config */
/* spi frequency config */
switch
(
configuration
->
max_hz
/
1000
)
switch
(
configuration
->
max_hz
/
1000
)
...
@@ -229,7 +229,7 @@ static rt_err_t spi_configure(struct rt_spi_device *device,
...
@@ -229,7 +229,7 @@ static rt_err_t spi_configure(struct rt_spi_device *device,
if
(
NRFX_SUCCESS
==
nrf_ret
)
if
(
NRFX_SUCCESS
==
nrf_ret
)
return
RT_EOK
;
return
RT_EOK
;
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
static
rt_uint32_t
spixfer
(
struct
rt_spi_device
*
device
,
struct
rt_spi_message
*
message
)
static
rt_uint32_t
spixfer
(
struct
rt_spi_device
*
device
,
struct
rt_spi_message
*
message
)
...
@@ -288,7 +288,7 @@ static const struct rt_spi_ops nrfx_spi_ops =
...
@@ -288,7 +288,7 @@ static const struct rt_spi_ops nrfx_spi_ops =
/*spi bus init*/
/*spi bus init*/
static
int
rt_hw_spi_bus_init
(
void
)
static
int
rt_hw_spi_bus_init
(
void
)
{
{
rt_err_t
result
=
RT_ERROR
;
rt_err_t
result
=
-
RT_ERROR
;
for
(
int
i
=
0
;
i
<
sizeof
(
spi_config
)
/
sizeof
(
spi_config
[
0
]);
i
++
)
for
(
int
i
=
0
;
i
<
sizeof
(
spi_config
)
/
sizeof
(
spi_config
[
0
]);
i
++
)
{
{
spi_bus_obj
[
i
].
spi
=
spi_config
[
i
].
spi
;
spi_bus_obj
[
i
].
spi
=
spi_config
[
i
].
spi
;
...
@@ -324,7 +324,7 @@ rt_err_t rt_hw_spi_device_attach(const char *bus_name, const char *device_name,
...
@@ -324,7 +324,7 @@ rt_err_t rt_hw_spi_device_attach(const char *bus_name, const char *device_name,
if
(
result
!=
RT_EOK
)
if
(
result
!=
RT_EOK
)
{
{
LOG_E
(
"%s attach to %s faild, %d"
,
device_name
,
bus_name
,
result
);
LOG_E
(
"%s attach to %s faild, %d"
,
device_name
,
bus_name
,
result
);
result
=
RT_ERROR
;
result
=
-
RT_ERROR
;
}
}
RT_ASSERT
(
result
==
RT_EOK
);
RT_ASSERT
(
result
==
RT_EOK
);
return
result
;
return
result
;
...
@@ -453,7 +453,7 @@ nrfx_spi_evt_handler_t spi_handler[] = {spi0_handler, spi1_handler, spi2_handler
...
@@ -453,7 +453,7 @@ nrfx_spi_evt_handler_t spi_handler[] = {spi0_handler, spi1_handler, spi2_handler
* @brief This function config spi bus
* @brief This function config spi bus
* @param device
* @param device
* @param configuration
* @param configuration
* @retval RT_EOK / RT_ERROR
* @retval RT_EOK /
-
RT_ERROR
*/
*/
static
rt_err_t
spi_configure
(
struct
rt_spi_device
*
device
,
static
rt_err_t
spi_configure
(
struct
rt_spi_device
*
device
,
struct
rt_spi_configuration
*
configuration
)
struct
rt_spi_configuration
*
configuration
)
...
@@ -501,7 +501,7 @@ static rt_err_t spi_configure(struct rt_spi_device *device,
...
@@ -501,7 +501,7 @@ static rt_err_t spi_configure(struct rt_spi_device *device,
break
;
break
;
default:
default:
LOG_E
(
"spi_configure mode error %x
\n
"
,
configuration
->
mode
);
LOG_E
(
"spi_configure mode error %x
\n
"
,
configuration
->
mode
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
/* spi frequency config */
/* spi frequency config */
switch
(
configuration
->
max_hz
/
1000
)
switch
(
configuration
->
max_hz
/
1000
)
...
@@ -539,7 +539,7 @@ static rt_err_t spi_configure(struct rt_spi_device *device,
...
@@ -539,7 +539,7 @@ static rt_err_t spi_configure(struct rt_spi_device *device,
if
(
NRFX_SUCCESS
==
nrf_ret
)
if
(
NRFX_SUCCESS
==
nrf_ret
)
return
RT_EOK
;
return
RT_EOK
;
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
static
rt_uint32_t
spixfer
(
struct
rt_spi_device
*
device
,
struct
rt_spi_message
*
message
)
static
rt_uint32_t
spixfer
(
struct
rt_spi_device
*
device
,
struct
rt_spi_message
*
message
)
...
@@ -598,7 +598,7 @@ static const struct rt_spi_ops nrfx_spi_ops =
...
@@ -598,7 +598,7 @@ static const struct rt_spi_ops nrfx_spi_ops =
/*spi bus init*/
/*spi bus init*/
static
int
rt_hw_spi_bus_init
(
void
)
static
int
rt_hw_spi_bus_init
(
void
)
{
{
rt_err_t
result
=
RT_ERROR
;
rt_err_t
result
=
-
RT_ERROR
;
for
(
int
i
=
0
;
i
<
sizeof
(
spi_config
)
/
sizeof
(
spi_config
[
0
]);
i
++
)
for
(
int
i
=
0
;
i
<
sizeof
(
spi_config
)
/
sizeof
(
spi_config
[
0
]);
i
++
)
{
{
spi_bus_obj
[
i
].
spi
=
spi_config
[
i
].
spi
;
spi_bus_obj
[
i
].
spi
=
spi_config
[
i
].
spi
;
...
@@ -634,7 +634,7 @@ rt_err_t rt_hw_spi_device_attach(const char *bus_name, const char *device_name,
...
@@ -634,7 +634,7 @@ rt_err_t rt_hw_spi_device_attach(const char *bus_name, const char *device_name,
if
(
result
!=
RT_EOK
)
if
(
result
!=
RT_EOK
)
{
{
LOG_E
(
"%s attach to %s faild, %d"
,
device_name
,
bus_name
,
result
);
LOG_E
(
"%s attach to %s faild, %d"
,
device_name
,
bus_name
,
result
);
result
=
RT_ERROR
;
result
=
-
RT_ERROR
;
}
}
RT_ASSERT
(
result
==
RT_EOK
);
RT_ASSERT
(
result
==
RT_EOK
);
return
result
;
return
result
;
...
...
bsp/nrf5x/libraries/drivers/drv_spi.h
浏览文件 @
0f461e87
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
* @param bus_name spi bus name "spi0"/"spi1"/"spi2"
* @param bus_name spi bus name "spi0"/"spi1"/"spi2"
* @param device_name spi device name "spi0x"/"spi1x"/"spi2x"
* @param device_name spi device name "spi0x"/"spi1x"/"spi2x"
* @param ss_pin spi ss pin number
* @param ss_pin spi ss pin number
* @retval RT_ERROR / RT_EOK
* @retval
-
RT_ERROR / RT_EOK
*/
*/
rt_err_t
rt_hw_spi_device_attach
(
const
char
*
bus_name
,
const
char
*
device_name
,
rt_uint32_t
ss_pin
);
rt_err_t
rt_hw_spi_device_attach
(
const
char
*
bus_name
,
const
char
*
device_name
,
rt_uint32_t
ss_pin
);
...
@@ -97,7 +97,7 @@ struct nrfx_drv_spi_pin_config
...
@@ -97,7 +97,7 @@ struct nrfx_drv_spi_pin_config
* @param bus_name spi bus name "spi0"/"spi1"/"spi2"
* @param bus_name spi bus name "spi0"/"spi1"/"spi2"
* @param device_name spi device name "spi0x"/"spi1x"/"spi2x"
* @param device_name spi device name "spi0x"/"spi1x"/"spi2x"
* @param ss_pin spi ss pin number
* @param ss_pin spi ss pin number
* @retval RT_ERROR / RT_EOK
* @retval
-
RT_ERROR / RT_EOK
*/
*/
rt_err_t
rt_hw_spi_device_attach
(
const
char
*
bus_name
,
const
char
*
device_name
,
rt_uint32_t
ss_pin
);
rt_err_t
rt_hw_spi_device_attach
(
const
char
*
bus_name
,
const
char
*
device_name
,
rt_uint32_t
ss_pin
);
...
...
bsp/nrf5x/libraries/drivers/drv_uart.c
浏览文件 @
0f461e87
...
@@ -161,7 +161,7 @@ static rt_err_t _uart_ctrl(struct rt_serial_device *serial, int cmd, void *arg)
...
@@ -161,7 +161,7 @@ static rt_err_t _uart_ctrl(struct rt_serial_device *serial, int cmd, void *arg)
break
;
break
;
default:
default:
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
return
RT_EOK
;
return
RT_EOK
;
...
...
bsp/nuclei/libraries/gd32vf103/HAL_Drivers/drv_i2c.c
浏览文件 @
0f461e87
...
@@ -123,7 +123,7 @@ static rt_ssize_t gd32_i2c_xfer(struct rt_i2c_bus_device *device, struct rt_i2c_
...
@@ -123,7 +123,7 @@ static rt_ssize_t gd32_i2c_xfer(struct rt_i2c_bus_device *device, struct rt_i2c_
{
{
struct
rt_i2c_msg
*
msg
;
struct
rt_i2c_msg
*
msg
;
rt_uint32_t
i
;
rt_uint32_t
i
;
rt_err_t
ret
=
RT_ERROR
;
rt_err_t
ret
=
-
RT_ERROR
;
rt_uint16_t
last_flags
;
rt_uint16_t
last_flags
;
RT_ASSERT
(
device
!=
RT_NULL
);
RT_ASSERT
(
device
!=
RT_NULL
);
...
...
bsp/nuvoton/libraries/m031/rtt_port/drv_adc.c
浏览文件 @
0f461e87
...
@@ -134,7 +134,7 @@ static rt_err_t nu_get_adc_value(struct rt_adc_device *device, rt_uint32_t chann
...
@@ -134,7 +134,7 @@ static rt_err_t nu_get_adc_value(struct rt_adc_device *device, rt_uint32_t chann
int
rt_hw_adc_init
(
void
)
int
rt_hw_adc_init
(
void
)
{
{
rt_err_t
result
=
RT_ERROR
;
rt_err_t
result
=
-
RT_ERROR
;
int
nu_sel
=
0
;
int
nu_sel
=
0
;
while
(
nu_adc_arr
[
nu_sel
].
name
!=
0
)
while
(
nu_adc_arr
[
nu_sel
].
name
!=
0
)
...
...
bsp/nuvoton/libraries/m031/rtt_port/drv_bpwm_capture.c
浏览文件 @
0f461e87
...
@@ -179,7 +179,7 @@ static rt_err_t nu_capture_get_pulsewidth(struct rt_inputcapture_device *inputca
...
@@ -179,7 +179,7 @@ static rt_err_t nu_capture_get_pulsewidth(struct rt_inputcapture_device *inputca
}
}
else
else
{
{
ret
=
RT_ERROR
;
ret
=
-
RT_ERROR
;
}
}
return
-
(
ret
);
return
-
(
ret
);
}
}
...
@@ -201,7 +201,7 @@ static void bpwm_config(nu_capture_t *nu_capture)
...
@@ -201,7 +201,7 @@ static void bpwm_config(nu_capture_t *nu_capture)
static
rt_err_t
nu_bpwm_init
(
nu_capture_t
*
nu_capture
)
static
rt_err_t
nu_bpwm_init
(
nu_capture_t
*
nu_capture
)
{
{
rt_err_t
ret
=
RT_ERROR
;
rt_err_t
ret
=
-
RT_ERROR
;
static
rt_bool_t
bBPWM0Inited
=
RT_FALSE
;
static
rt_bool_t
bBPWM0Inited
=
RT_FALSE
;
static
rt_bool_t
bBPWM1Inited
=
RT_FALSE
;
static
rt_bool_t
bBPWM1Inited
=
RT_FALSE
;
...
@@ -249,7 +249,7 @@ static rt_err_t nu_capture_init(struct rt_inputcapture_device *inputcapture)
...
@@ -249,7 +249,7 @@ static rt_err_t nu_capture_init(struct rt_inputcapture_device *inputcapture)
if
(
nu_bpwm_init
(
nu_capture
)
!=
RT_EOK
)
if
(
nu_bpwm_init
(
nu_capture
)
!=
RT_EOK
)
{
{
rt_kprintf
(
"Failed to initialize BPWM.
\n
"
);
rt_kprintf
(
"Failed to initialize BPWM.
\n
"
);
ret
=
RT_ERROR
;
ret
=
-
RT_ERROR
;
}
}
return
-
(
ret
);
return
-
(
ret
);
...
...
bsp/nuvoton/libraries/m031/rtt_port/drv_gpio.c
浏览文件 @
0f461e87
...
@@ -239,7 +239,7 @@ static rt_err_t nu_gpio_irq_enable(struct rt_device *device, rt_base_t pin, rt_u
...
@@ -239,7 +239,7 @@ static rt_err_t nu_gpio_irq_enable(struct rt_device *device, rt_base_t pin, rt_u
irqindex
=
nu_find_irqindex
(
pin
);
irqindex
=
nu_find_irqindex
(
pin
);
if
(
irqindex
==
-
(
RT_ERROR
))
if
(
irqindex
==
-
(
RT_ERROR
))
{
{
ret
=
RT_ERROR
;
ret
=
-
RT_ERROR
;
goto
exit_nu_gpio_irq_enable
;
goto
exit_nu_gpio_irq_enable
;
}
}
...
...
bsp/nuvoton/libraries/m031/rtt_port/drv_i2c.c
浏览文件 @
0f461e87
...
@@ -301,7 +301,7 @@ static rt_ssize_t nu_i2c_mst_xfer(struct rt_i2c_bus_device *bus,
...
@@ -301,7 +301,7 @@ static rt_ssize_t nu_i2c_mst_xfer(struct rt_i2c_bus_device *bus,
/* Public functions -------------------------------------------------------------*/
/* Public functions -------------------------------------------------------------*/
int
rt_hw_i2c_init
(
void
)
int
rt_hw_i2c_init
(
void
)
{
{
rt_err_t
ret
=
RT_ERROR
;
rt_err_t
ret
=
-
RT_ERROR
;
SYS_UnlockReg
();
SYS_UnlockReg
();
...
...
bsp/nuvoton/libraries/m031/rtt_port/drv_pdma.c
浏览文件 @
0f461e87
...
@@ -681,7 +681,7 @@ static rt_err_t nu_pdma_sgtbls_valid(nu_pdma_desc_t head)
...
@@ -681,7 +681,7 @@ static rt_err_t nu_pdma_sgtbls_valid(nu_pdma_desc_t head)
{
{
rt_kprintf
(
"The distance is over %d between 0x%08x and 0x%08x.
\n
"
,
NU_PDMA_SG_LIMITED_DISTANCE
,
PDMA
->
SCATBA
,
node
);
rt_kprintf
(
"The distance is over %d between 0x%08x and 0x%08x.
\n
"
,
NU_PDMA_SG_LIMITED_DISTANCE
,
PDMA
->
SCATBA
,
node
);
rt_kprintf
(
"Please use nu_pdma_sgtbl_allocate to allocate valid sg-table.
\n
"
);
rt_kprintf
(
"Please use nu_pdma_sgtbl_allocate to allocate valid sg-table.
\n
"
);
return
RT_ERROR
;
return
-
RT_ERROR
;
}
}
node
=
(
nu_pdma_desc_t
)(
node
->
NEXT
+
PDMA
->
SCATBA
);
node
=
(
nu_pdma_desc_t
)(
node
->
NEXT
+
PDMA
->
SCATBA
);
...
...
bsp/nuvoton/libraries/m031/rtt_port/drv_pwm_capture.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m031/rtt_port/drv_timer.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m031/rtt_port/drv_timer_capture.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m031/rtt_port/drv_uart.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m031/rtt_port/drv_ui2c.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m031/rtt_port/drv_uuart.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m031/rtt_port/drv_wdt.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m2354/rtt_port/drv_bpwm_capture.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m2354/rtt_port/drv_eadc.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m2354/rtt_port/drv_ecap.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m2354/rtt_port/drv_epwm_capture.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m2354/rtt_port/drv_gpio.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m2354/rtt_port/drv_i2c.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m2354/rtt_port/drv_pdma.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m2354/rtt_port/drv_qei.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m2354/rtt_port/drv_sdh.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m2354/rtt_port/drv_timer.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m2354/rtt_port/drv_timer_capture.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m2354/rtt_port/drv_uart.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m2354/rtt_port/drv_ui2c.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m2354/rtt_port/drv_uuart.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m2354/rtt_port/drv_wdt.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m460/rtt_port/drv_bpwm_capture.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m460/rtt_port/drv_dac.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m460/rtt_port/drv_eadc.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m460/rtt_port/drv_ecap.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m460/rtt_port/drv_epwm_capture.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m460/rtt_port/drv_gpio.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m460/rtt_port/drv_pdma.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m460/rtt_port/drv_sdh.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m460/rtt_port/drv_uart.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m460/rtt_port/drv_uuart.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m460/rtt_port/drv_wdt.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m480/rtt_port/drv_bpwm_capture.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m480/rtt_port/drv_eadc.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m480/rtt_port/drv_ecap.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m480/rtt_port/drv_emac.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m480/rtt_port/drv_epwm_capture.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m480/rtt_port/drv_gpio.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m480/rtt_port/drv_i2c.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m480/rtt_port/drv_pdma.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m480/rtt_port/drv_qei.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m480/rtt_port/drv_sdh.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m480/rtt_port/drv_timer.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m480/rtt_port/drv_timer_capture.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m480/rtt_port/drv_uart.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m480/rtt_port/drv_ui2c.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m480/rtt_port/drv_uuart.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/m480/rtt_port/drv_wdt.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/ma35/rtt_port/drv_adc.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/ma35/rtt_port/drv_ecap.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/ma35/rtt_port/drv_epwm_capture.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/ma35/rtt_port/drv_gpio.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/ma35/rtt_port/drv_pdma.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/ma35/rtt_port/drv_uart.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/ma35/rtt_port/drv_wdt.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/n9h30/rtt_port/drv_adc.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/n9h30/rtt_port/drv_emac.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/n9h30/rtt_port/drv_gpio.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/n9h30/rtt_port/drv_sdh.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/n9h30/rtt_port/drv_wdt.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nu_packages/ADC_TOUCH/touch_sw.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nu_packages/Demo/usbd_cdc_vcom_echo.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nu_packages/MAX31875/sensor_max31875.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nuc980/rtt_port/drv_adc.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nuc980/rtt_port/drv_emac.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nuc980/rtt_port/drv_gpio.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nuc980/rtt_port/drv_pdma.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nuc980/rtt_port/drv_sdh.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nuc980/rtt_port/drv_uart.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/nuvoton/libraries/nuc980/rtt_port/drv_wdt.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/qemu-vexpress-a9/drivers/drv_keyboard.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/qemu-vexpress-a9/drivers/drv_mouse.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/raspberry-pi/raspi3-32/applications/test_device.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/raspberry-pi/raspi3-32/driver/drv_sdio.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/raspberry-pi/raspi3-32/driver/drv_spi.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/raspberry-pi/raspi3-64/driver/drv_sdio.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/raspberry-pi/raspi3-64/driver/drv_spi.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/raspberry-pi/raspi4-32/driver/drv_bluetooth.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/raspberry-pi/raspi4-32/driver/drv_dma.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/raspberry-pi/raspi4-32/driver/drv_eth.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/raspberry-pi/raspi4-32/driver/drv_sdio.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/raspberry-pi/raspi4-32/driver/drv_spi.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/raspberry-pi/raspi4-64/driver/drv_eth.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/raspberry-pi/raspi4-64/driver/drv_sdio.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/renesas/libraries/HAL_Drivers/drv_can.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/renesas/libraries/HAL_Drivers/drv_sdhi.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/renesas/libraries/HAL_Drivers/drv_usart_v2.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/renesas/ra6m3-ek/board/ports/ili9341/lcd_ili9341.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/renesas/ra6m4-cpk/board/ports/ili9341/lcd_ili9341.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/rx/drivers/uart.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/samd21/board/uart.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/simulator/drivers/sd_sim.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/libraries/HAL_Drivers/drv_adc.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/libraries/HAL_Drivers/drv_crypto.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/libraries/HAL_Drivers/drv_eth.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/libraries/HAL_Drivers/drv_nand.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32f407-atk-explorer/board/ports/touch/drv_touch_ft.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32h743-atk-apollo/board/ports/drv_dcmi.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32h743-atk-apollo/board/ports/drv_ov2640.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32h743-openmv-h7plus/board/ports/drv_dcmi.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32h743-openmv-h7plus/board/ports/drv_ov5640.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32h750-artpi/board/port/drv_eth.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32l4r9-st-eval/board/ports/drv_touch_ft.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-discovery/board/ports/OpenAMP/drv_openamp.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-discovery/board/ports/audio/drv_cs42l51.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-discovery/board/ports/audio/drv_mic.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-discovery/board/ports/audio/drv_sound.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-discovery/board/ports/crypto/crypto_sample.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_eth.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_pmic.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_pwr.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_rs485.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_sdio.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-discovery/board/ports/spi_sample.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-discovery/board/ports/timer_sample.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/OpenAMP/drv_openamp.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/crypto_sample.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/dma_sample.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_dcmi.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_dfsdm.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_emmc.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_fdcan.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_mfx.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_nand.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_ov5640.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_pmic.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_pwr.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_rs485.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_sdcard.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_sound.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_spdifrx.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_wm8994.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/eth/drv_eth.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/spi_sample.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/stm32/stm32mp157a-st-ev1/board/ports/timer_sample.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/synopsys/boards/drivers/rt_board.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/synwit/swm320/applications/main.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/synwit/swm320/drivers/drv_spi.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/synwit/swm341/applications/main.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/synwit/swm341/drivers/drv_spi.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/w60x/drivers/drv_adc.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/w60x/drivers/drv_i2c.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/w60x/drivers/drv_pwm.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
bsp/w60x/drivers/drv_wifi.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
components/drivers/include/drivers/usb_host.h
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
components/drivers/ipc/dataqueue.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
components/drivers/misc/rt_drv_pwm.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
components/drivers/rtc/alarm.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
components/drivers/spi/spi_msd.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
components/drivers/tty/console.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
components/drivers/usb/usbdevice/class/cdc_vcom.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
components/drivers/usb/usbdevice/core/usbdevice.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
components/drivers/usb/usbdevice/core/usbdevice_core.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
components/drivers/usb/usbhost/core/hub.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
components/drivers/usb/usbhost/core/usbhost_core.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
components/utilities/rt-link/src/rtlink_dev.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
components/utilities/zmodem/rz.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
components/utilities/zmodem/sz.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
components/vbus/prio_queue.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
documentation/device/adc/adc.md
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
documentation/device/device.md
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
documentation/device/hwtimer/hwtimer.md
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
documentation/device/pwm/pwm.md
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
documentation/device/uart/uart.md
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
documentation/device/watchdog/watchdog.md
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
examples/rt-link/rtlink_dev_example.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
examples/test/device_test.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
examples/test/rtc_test.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
examples/utest/testcases/kernel/thread_tc.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
src/mempool.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
src/timer.c
浏览文件 @
0f461e87
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录