mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-23 12:15:32 +08:00
[errno code][-RT_EINVAL] fix that use RT_EINVAL without -
This commit is contained in:
committed by
Man, Jianting (Meco)
parent
e4e88b2f3e
commit
dfddd79b24
@@ -412,7 +412,7 @@ static rt_err_t swm_pin_irq_enable(struct rt_device *device,
|
||||
EXTI_Init(gpio_obj->gpio, gpio_obj->pin, EXTI_LOW_LEVEL);
|
||||
break;
|
||||
default:
|
||||
return RT_EINVAL;
|
||||
return -RT_EINVAL;
|
||||
}
|
||||
|
||||
level = rt_hw_interrupt_disable();
|
||||
|
||||
@@ -291,7 +291,7 @@ static rt_err_t swm_pwm_control(struct rt_device_pwm *pwm_device, int cmd, void
|
||||
case PWM_CMD_GET:
|
||||
return swm_pwm_get(pwm_device, configuration);
|
||||
default:
|
||||
return RT_EINVAL;
|
||||
return -RT_EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ static rt_err_t swm_spi_configure(struct rt_spi_device *device,
|
||||
|
||||
if (configure->mode & RT_SPI_3WIRE)
|
||||
{
|
||||
return RT_EINVAL;
|
||||
return -RT_EINVAL;
|
||||
}
|
||||
|
||||
if (configure->data_width == 8)
|
||||
|
||||
@@ -434,7 +434,7 @@ static rt_err_t swm_pin_irq_enable(struct rt_device *device,
|
||||
EXTI_Init(gpio_obj->gpio, gpio_obj->pin, EXTI_LOW_LEVEL);
|
||||
break;
|
||||
default:
|
||||
return RT_EINVAL;
|
||||
return -RT_EINVAL;
|
||||
}
|
||||
|
||||
level = rt_hw_interrupt_disable();
|
||||
|
||||
@@ -295,7 +295,7 @@ static rt_err_t swm_pwm_control(struct rt_device_pwm *pwm_device, int cmd, void
|
||||
case PWM_CMD_GET:
|
||||
return swm_pwm_get(pwm_device, configuration);
|
||||
default:
|
||||
return RT_EINVAL;
|
||||
return -RT_EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ static rt_err_t swm_spi_configure(struct rt_spi_device *device,
|
||||
|
||||
if (configure->mode & RT_SPI_3WIRE)
|
||||
{
|
||||
return RT_EINVAL;
|
||||
return -RT_EINVAL;
|
||||
}
|
||||
|
||||
if (configure->data_width == 8)
|
||||
|
||||
Reference in New Issue
Block a user