From 315c25883cecbbf6014fc1718597093b5d4723d3 Mon Sep 17 00:00:00 2001 From: linshire <1127384500@qq.com> Date: Sun, 30 Oct 2022 14:14:05 +0800 Subject: [PATCH] [bsp] fix the return of the function(drv_pwm_control) in stm32 drv_pwm --- bsp/stm32/libraries/HAL_Drivers/drv_pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_pwm.c b/bsp/stm32/libraries/HAL_Drivers/drv_pwm.c index abcffa7288..ec9bf701ed 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_pwm.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_pwm.c @@ -396,7 +396,7 @@ static rt_err_t drv_pwm_control(struct rt_device_pwm *device, int cmd, void *arg case PWM_CMD_GET: return drv_pwm_get(htim, configuration); default: - return RT_EINVAL; + return -RT_EINVAL; } }