use PIN_IRQ_PIN_NONE to replace RT_PIN_NONE

This commit is contained in:
Meco Man
2022-12-26 02:10:30 -05:00
committed by Man, Jianting (Meco)
parent 2570fab0e1
commit 20a6f14e89
10 changed files with 15 additions and 18 deletions
+2 -2
View File
@@ -96,7 +96,7 @@ static void _irq_callback(void *args)
/* Sensor interrupt initialization function */
static rt_err_t _sensor_irq_init(rt_sensor_t sensor)
{
if (sensor->config.irq_pin.pin == RT_PIN_NONE)
if (sensor->config.irq_pin.pin == PIN_IRQ_PIN_NONE)
{
return -RT_EINVAL;
}
@@ -269,7 +269,7 @@ static rt_err_t _sensor_close(rt_device_t dev)
if (RT_SENSOR_MODE_GET_FETCH(sensor->info.mode) != RT_SENSOR_MODE_FETCH_POLLING)
{
/* Sensor disable interrupt */
if (sensor->config.irq_pin.pin != RT_PIN_NONE)
if (sensor->config.irq_pin.pin != PIN_IRQ_PIN_NONE)
{
rt_pin_irq_enable(sensor->config.irq_pin.pin, RT_FALSE);
}