format pin.c

This commit is contained in:
Meco Man 2021-04-17 18:01:20 +08:00
parent a1d4a2586c
commit 8ca492e996

View File

@ -47,7 +47,7 @@ static rt_size_t _pin_write(rt_device_t dev, rt_off_t pos, const void *buffer, r
return size; return size;
} }
static rt_err_t _pin_control(rt_device_t dev, int cmd, void *args) static rt_err_t _pin_control(rt_device_t dev, int cmd, void *args)
{ {
struct rt_device_pin_mode *mode; struct rt_device_pin_mode *mode;
struct rt_device_pin *pin = (struct rt_device_pin *)dev; struct rt_device_pin *pin = (struct rt_device_pin *)dev;
@ -111,6 +111,7 @@ rt_err_t rt_pin_attach_irq(rt_int32_t pin, rt_uint32_t mode,
} }
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)
{ {
RT_ASSERT(_hw_pin.ops != RT_NULL); RT_ASSERT(_hw_pin.ops != RT_NULL);
@ -166,4 +167,3 @@ rt_base_t rt_pin_get(const char *name)
return _hw_pin.ops->pin_get(name); return _hw_pin.ops->pin_get(name);
} }
FINSH_FUNCTION_EXPORT_ALIAS(rt_pin_get, pinGet, get pin number from hardware pin); FINSH_FUNCTION_EXPORT_ALIAS(rt_pin_get, pinGet, get pin number from hardware pin);