From 765c2ec5f92e82596e1edc2cab6b1a741fd1cc3e Mon Sep 17 00:00:00 2001 From: Zxy <1308465141@qq.com> Date: Thu, 23 Mar 2023 12:38:44 +0800 Subject: [PATCH] [errno code]fix that use RT_EFULL without - --- bsp/gd32105c-eval/drivers/drv_gpio.c | 2 +- bsp/gd32107c-eval/drivers/drv_gpio.c | 2 +- bsp/gd32303e-eval/drivers/drv_gpio.c | 2 +- bsp/gd32350r-eval/drivers/drv_gpio.c | 2 +- bsp/gd32e230k-start/drivers/drv_gpio.c | 2 +- bsp/wch/arm/Libraries/ch32_drivers/drv_gpio_ch32f10x.c | 2 +- bsp/wch/arm/Libraries/ch32_drivers/drv_gpio_ch32f20x.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bsp/gd32105c-eval/drivers/drv_gpio.c b/bsp/gd32105c-eval/drivers/drv_gpio.c index 2c64de1c8e..e56b8824ad 100644 --- a/bsp/gd32105c-eval/drivers/drv_gpio.c +++ b/bsp/gd32105c-eval/drivers/drv_gpio.c @@ -345,7 +345,7 @@ static rt_err_t _pin_attach_irq(struct rt_device *device, rt_int32_t pin, if (pin_irq_hdr_tab[hdr_index].pin != -1) { rt_hw_interrupt_enable(level); - return RT_EFULL; + return -RT_EFULL; } pin_irq_hdr_tab[hdr_index].pin = pin; pin_irq_hdr_tab[hdr_index].hdr = hdr; diff --git a/bsp/gd32107c-eval/drivers/drv_gpio.c b/bsp/gd32107c-eval/drivers/drv_gpio.c index 2c64de1c8e..e56b8824ad 100644 --- a/bsp/gd32107c-eval/drivers/drv_gpio.c +++ b/bsp/gd32107c-eval/drivers/drv_gpio.c @@ -345,7 +345,7 @@ static rt_err_t _pin_attach_irq(struct rt_device *device, rt_int32_t pin, if (pin_irq_hdr_tab[hdr_index].pin != -1) { rt_hw_interrupt_enable(level); - return RT_EFULL; + return -RT_EFULL; } pin_irq_hdr_tab[hdr_index].pin = pin; pin_irq_hdr_tab[hdr_index].hdr = hdr; diff --git a/bsp/gd32303e-eval/drivers/drv_gpio.c b/bsp/gd32303e-eval/drivers/drv_gpio.c index b3b34b25bd..8e883efad8 100644 --- a/bsp/gd32303e-eval/drivers/drv_gpio.c +++ b/bsp/gd32303e-eval/drivers/drv_gpio.c @@ -370,7 +370,7 @@ rt_err_t gd32_pin_attach_irq(struct rt_device *device, rt_int32_t pin, if (pin_irq_hdr_tab[hdr_index].pin != -1) { rt_hw_interrupt_enable(level); - return RT_EFULL; + return -RT_EFULL; } pin_irq_hdr_tab[hdr_index].pin = pin; pin_irq_hdr_tab[hdr_index].hdr = hdr; diff --git a/bsp/gd32350r-eval/drivers/drv_gpio.c b/bsp/gd32350r-eval/drivers/drv_gpio.c index e22b94645c..8bcf4c065c 100644 --- a/bsp/gd32350r-eval/drivers/drv_gpio.c +++ b/bsp/gd32350r-eval/drivers/drv_gpio.c @@ -293,7 +293,7 @@ rt_err_t gd32_pin_attach_irq(struct rt_device *device, rt_int32_t pin, if (pin_irq_hdr_tab[hdr_index].pin != -1) { rt_hw_interrupt_enable(level); - return RT_EFULL; + return -RT_EFULL; } pin_irq_hdr_tab[hdr_index].pin = pin; pin_irq_hdr_tab[hdr_index].hdr = hdr; diff --git a/bsp/gd32e230k-start/drivers/drv_gpio.c b/bsp/gd32e230k-start/drivers/drv_gpio.c index a9475c8c9b..ff9ee18f69 100644 --- a/bsp/gd32e230k-start/drivers/drv_gpio.c +++ b/bsp/gd32e230k-start/drivers/drv_gpio.c @@ -265,7 +265,7 @@ rt_err_t gd32_pin_attach_irq(struct rt_device *device, rt_int32_t pin, if (pin_irq_hdr_tab[hdr_index].pin != -1) { rt_hw_interrupt_enable(level); - return RT_EFULL; + return -RT_EFULL; } pin_irq_hdr_tab[hdr_index].pin = pin; pin_irq_hdr_tab[hdr_index].hdr = hdr; diff --git a/bsp/wch/arm/Libraries/ch32_drivers/drv_gpio_ch32f10x.c b/bsp/wch/arm/Libraries/ch32_drivers/drv_gpio_ch32f10x.c index b10f96d14f..1454731693 100644 --- a/bsp/wch/arm/Libraries/ch32_drivers/drv_gpio_ch32f10x.c +++ b/bsp/wch/arm/Libraries/ch32_drivers/drv_gpio_ch32f10x.c @@ -218,7 +218,7 @@ static struct exti_line_irq *exti_line_irq_list_find(rt_int16_t pin) static rt_err_t exti_line_irq_list_bind(struct rt_pin_irq_hdr *irq_hdr) { - rt_err_t ret = RT_EFULL; + rt_err_t ret = -RT_EFULL; rt_base_t level; struct exti_line_irq *item; int index; diff --git a/bsp/wch/arm/Libraries/ch32_drivers/drv_gpio_ch32f20x.c b/bsp/wch/arm/Libraries/ch32_drivers/drv_gpio_ch32f20x.c index 1e6714a638..1bcf843961 100644 --- a/bsp/wch/arm/Libraries/ch32_drivers/drv_gpio_ch32f20x.c +++ b/bsp/wch/arm/Libraries/ch32_drivers/drv_gpio_ch32f20x.c @@ -249,7 +249,7 @@ static struct exti_line_irq *exti_line_irq_list_find(rt_int16_t pin) static rt_err_t exti_line_irq_list_bind(struct rt_pin_irq_hdr *irq_hdr) { - rt_err_t ret = RT_EFULL; + rt_err_t ret = -RT_EFULL; rt_base_t level; struct exti_line_irq *item; int index;