1.修改pin中断传入参数,改为传入中断源gpio编号。

This commit is contained in:
MacRsh
2023-06-07 22:51:57 +08:00
parent 6c6ab4a41e
commit b1bc3fa817
2 changed files with 3 additions and 3 deletions

View File

@@ -119,14 +119,14 @@ mr_err_t mr_pin_device_add(mr_pin_t pin, const char *name, struct mr_pin_ops *op
return MR_ERR_OK;
}
void mr_pin_device_isr(mr_pin_t pin, mr_uint32_t Line)
void mr_pin_device_isr(mr_pin_t pin, mr_int32_t number)
{
MR_ASSERT(pin != MR_NULL);
/* Invoke the rx-cb function */
if (pin->device.rx_cb != MR_NULL)
{
pin->device.rx_cb(&pin->device, &Line);
pin->device.rx_cb(&pin->device, &number);
}
}

View File

@@ -51,7 +51,7 @@ struct mr_pin
};
mr_err_t mr_pin_device_add(mr_pin_t pin, const char *name, struct mr_pin_ops *ops, void *data);
void mr_pin_device_isr(mr_pin_t pin, mr_uint32_t Line);
void mr_pin_device_isr(mr_pin_t pin, mr_int32_t number);
#endif