mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-22 03:09:16 +08:00
[errno code]fix that use RT_ENOSYS without - (#7084)
* [errno code]fix that use RT_ENOSYS without - * Update bsp/airm2m/air32f103/libraries/rt_drivers/drv_hwtimer.c --------- Co-authored-by: Man, Jianting (Meco) <920369182@qq.com>
This commit is contained in:
co-authored by
Man, Jianting (Meco) <920369182@qq.com>
parent
e15adf5e45
commit
4ed9bc11f7
@@ -233,7 +233,7 @@ static rt_err_t v85xx_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
||||
irqindex = bit2bitno(PIN_V85XXPIN(pin));
|
||||
if (irqindex < 0 || irqindex >= ITEM_NUM(pin_irq_map))
|
||||
{
|
||||
return RT_ENOSYS;
|
||||
return -RT_ENOSYS;
|
||||
}
|
||||
|
||||
level = rt_hw_interrupt_disable();
|
||||
@@ -271,7 +271,7 @@ static rt_err_t v85xx_pin_detach_irq(struct rt_device *device, rt_int32_t pin)
|
||||
irqindex = bit2bitno(PIN_V85XXPIN(pin));
|
||||
if (irqindex < 0 || irqindex >= ITEM_NUM(pin_irq_map))
|
||||
{
|
||||
return RT_ENOSYS;
|
||||
return -RT_ENOSYS;
|
||||
}
|
||||
|
||||
level = rt_hw_interrupt_disable();
|
||||
@@ -306,7 +306,7 @@ static rt_err_t v85xx_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt
|
||||
irqindex = bit2bitno(PIN_V85XXPIN(pin));
|
||||
if (irqindex < 0 || irqindex >= ITEM_NUM(pin_irq_map))
|
||||
{
|
||||
return RT_ENOSYS;
|
||||
return -RT_ENOSYS;
|
||||
}
|
||||
|
||||
level = rt_hw_interrupt_disable();
|
||||
@@ -314,7 +314,7 @@ static rt_err_t v85xx_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt
|
||||
if (pin_irq_hdr_tab[irqindex].pin == -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_ENOSYS;
|
||||
return -RT_ENOSYS;
|
||||
}
|
||||
|
||||
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_INPUT;
|
||||
|
||||
@@ -234,7 +234,7 @@ static rt_err_t V85XXP_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
||||
irqindex = bit2bitno(PIN_V85XXPPIN(pin));
|
||||
if (irqindex < 0 || irqindex >= ITEM_NUM(pin_irq_map))
|
||||
{
|
||||
return RT_ENOSYS;
|
||||
return -RT_ENOSYS;
|
||||
}
|
||||
|
||||
level = rt_hw_interrupt_disable();
|
||||
@@ -272,7 +272,7 @@ static rt_err_t V85XXP_pin_detach_irq(struct rt_device *device, rt_int32_t pin)
|
||||
irqindex = bit2bitno(PIN_V85XXPPIN(pin));
|
||||
if (irqindex < 0 || irqindex >= ITEM_NUM(pin_irq_map))
|
||||
{
|
||||
return RT_ENOSYS;
|
||||
return -RT_ENOSYS;
|
||||
}
|
||||
|
||||
level = rt_hw_interrupt_disable();
|
||||
@@ -307,7 +307,7 @@ static rt_err_t V85XXP_pin_irq_enable(struct rt_device *device, rt_base_t pin, r
|
||||
irqindex = bit2bitno(PIN_V85XXPPIN(pin));
|
||||
if (irqindex < 0 || irqindex >= ITEM_NUM(pin_irq_map))
|
||||
{
|
||||
return RT_ENOSYS;
|
||||
return -RT_ENOSYS;
|
||||
}
|
||||
|
||||
level = rt_hw_interrupt_disable();
|
||||
@@ -315,7 +315,7 @@ static rt_err_t V85XXP_pin_irq_enable(struct rt_device *device, rt_base_t pin, r
|
||||
if (pin_irq_hdr_tab[irqindex].pin == -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_ENOSYS;
|
||||
return -RT_ENOSYS;
|
||||
}
|
||||
|
||||
GPIO_InitStruct.GPIO_Mode = GPIO_MODE_INPUT;
|
||||
|
||||
Reference in New Issue
Block a user