summaryrefslogtreecommitdiff
path: root/bsp/synwit
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2023-03-16 00:44:05 -0400
committerMan, Jianting (Meco) <[email protected]>2023-03-16 20:21:43 -0400
commitdfddd79b2453ab13d12b69c7db14e2f685175af7 (patch)
tree2f59da3e3389e54872609473f21c1904167822d8 /bsp/synwit
parente4e88b2f3eff319105a34ec7827c2ee135c9e8b7 (diff)
[errno code][-RT_EINVAL] fix that use RT_EINVAL without -
Diffstat (limited to 'bsp/synwit')
-rw-r--r--bsp/synwit/swm320/drivers/drv_gpio.c2
-rw-r--r--bsp/synwit/swm320/drivers/drv_pwm.c2
-rw-r--r--bsp/synwit/swm320/drivers/drv_spi.c2
-rw-r--r--bsp/synwit/swm341/drivers/drv_gpio.c2
-rw-r--r--bsp/synwit/swm341/drivers/drv_pwm.c2
-rw-r--r--bsp/synwit/swm341/drivers/drv_spi.c2
6 files changed, 6 insertions, 6 deletions
diff --git a/bsp/synwit/swm320/drivers/drv_gpio.c b/bsp/synwit/swm320/drivers/drv_gpio.c
index d22dd8be2a..0c040b5aa4 100644
--- a/bsp/synwit/swm320/drivers/drv_gpio.c
+++ b/bsp/synwit/swm320/drivers/drv_gpio.c
@@ -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();
diff --git a/bsp/synwit/swm320/drivers/drv_pwm.c b/bsp/synwit/swm320/drivers/drv_pwm.c
index 6495340deb..546d4cddc4 100644
--- a/bsp/synwit/swm320/drivers/drv_pwm.c
+++ b/bsp/synwit/swm320/drivers/drv_pwm.c
@@ -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;
}
}
diff --git a/bsp/synwit/swm320/drivers/drv_spi.c b/bsp/synwit/swm320/drivers/drv_spi.c
index 64eec472af..df8120d436 100644
--- a/bsp/synwit/swm320/drivers/drv_spi.c
+++ b/bsp/synwit/swm320/drivers/drv_spi.c
@@ -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)
diff --git a/bsp/synwit/swm341/drivers/drv_gpio.c b/bsp/synwit/swm341/drivers/drv_gpio.c
index c0abfe10c4..d38a80eede 100644
--- a/bsp/synwit/swm341/drivers/drv_gpio.c
+++ b/bsp/synwit/swm341/drivers/drv_gpio.c
@@ -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();
diff --git a/bsp/synwit/swm341/drivers/drv_pwm.c b/bsp/synwit/swm341/drivers/drv_pwm.c
index 6306fa7312..2e9c9837d8 100644
--- a/bsp/synwit/swm341/drivers/drv_pwm.c
+++ b/bsp/synwit/swm341/drivers/drv_pwm.c
@@ -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;
}
}
diff --git a/bsp/synwit/swm341/drivers/drv_spi.c b/bsp/synwit/swm341/drivers/drv_spi.c
index 5cff92936e..3a1ad69848 100644
--- a/bsp/synwit/swm341/drivers/drv_spi.c
+++ b/bsp/synwit/swm341/drivers/drv_spi.c
@@ -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)