mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-31 11:20:27 +08:00
commit
9345ebfa12
@ -6,6 +6,7 @@
|
|||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2015-01-20 Bernard the first version
|
* 2015-01-20 Bernard the first version
|
||||||
|
* 2021-02-06 Meco Man fix RT_ENOSYS code in negative
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <drivers/pin.h>
|
#include <drivers/pin.h>
|
||||||
@ -108,7 +109,7 @@ rt_err_t rt_pin_attach_irq(rt_int32_t pin, rt_uint32_t mode,
|
|||||||
{
|
{
|
||||||
return _hw_pin.ops->pin_attach_irq(&_hw_pin.parent, pin, mode, hdr, args);
|
return _hw_pin.ops->pin_attach_irq(&_hw_pin.parent, pin, mode, hdr, args);
|
||||||
}
|
}
|
||||||
return RT_ENOSYS;
|
return -RT_ENOSYS;
|
||||||
}
|
}
|
||||||
rt_err_t rt_pin_detach_irq(rt_int32_t pin)
|
rt_err_t rt_pin_detach_irq(rt_int32_t pin)
|
||||||
{
|
{
|
||||||
@ -117,7 +118,7 @@ rt_err_t rt_pin_detach_irq(rt_int32_t pin)
|
|||||||
{
|
{
|
||||||
return _hw_pin.ops->pin_detach_irq(&_hw_pin.parent, pin);
|
return _hw_pin.ops->pin_detach_irq(&_hw_pin.parent, pin);
|
||||||
}
|
}
|
||||||
return RT_ENOSYS;
|
return -RT_ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
rt_err_t rt_pin_irq_enable(rt_base_t pin, rt_uint32_t enabled)
|
rt_err_t rt_pin_irq_enable(rt_base_t pin, rt_uint32_t enabled)
|
||||||
@ -127,7 +128,7 @@ rt_err_t rt_pin_irq_enable(rt_base_t pin, rt_uint32_t enabled)
|
|||||||
{
|
{
|
||||||
return _hw_pin.ops->pin_irq_enable(&_hw_pin.parent, pin, enabled);
|
return _hw_pin.ops->pin_irq_enable(&_hw_pin.parent, pin, enabled);
|
||||||
}
|
}
|
||||||
return RT_ENOSYS;
|
return -RT_ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* RT-Thread Hardware PIN APIs */
|
/* RT-Thread Hardware PIN APIs */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user