mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-23 12:15:32 +08:00
use PIN_IRQ_PIN_NONE to replace RT_PIN_NONE
This commit is contained in:
committed by
Man, Jianting (Meco)
parent
2570fab0e1
commit
20a6f14e89
@@ -25,7 +25,6 @@ extern "C" {
|
||||
#define rt_sensor_get_ts() rt_tick_get() /* API for the sensor to get the timestamp */
|
||||
#endif
|
||||
|
||||
#define RT_PIN_NONE 0xFFFF /* RT PIN NONE */
|
||||
#define RT_DEVICE_FLAG_FIFO_RX 0x200 /* Flag to use when the sensor is open by fifo mode */
|
||||
|
||||
#define RT_SENSOR_MODULE_MAX (3) /* The maximum number of members of a sensor module */
|
||||
|
||||
@@ -24,8 +24,6 @@ extern "C" {
|
||||
#define rt_touch_get_ts() rt_tick_get() /* API for the touch to get the timestamp */
|
||||
#endif
|
||||
|
||||
#define RT_PIN_NONE 0xFFFF /* RT PIN NONE */
|
||||
|
||||
/* Touch vendor types */
|
||||
#define RT_TOUCH_VENDOR_UNKNOWN (0) /* unknown */
|
||||
#define RT_TOUCH_VENDOR_GT (1) /* GTxx series */
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ static void touch_irq_callback(void *param)
|
||||
static rt_err_t rt_touch_irq_init(rt_touch_t touch)
|
||||
{
|
||||
#ifdef RT_TOUCH_PIN_IRQ
|
||||
if (touch->config.irq_pin.pin == RT_PIN_NONE)
|
||||
if (touch->config.irq_pin.pin == PIN_IRQ_PIN_NONE)
|
||||
{
|
||||
return -RT_EINVAL;
|
||||
}
|
||||
@@ -73,7 +73,7 @@ static rt_err_t rt_touch_irq_init(rt_touch_t touch)
|
||||
static void rt_touch_irq_enable(rt_touch_t touch)
|
||||
{
|
||||
#ifdef RT_TOUCH_PIN_IRQ
|
||||
if (touch->config.irq_pin.pin != RT_PIN_NONE)
|
||||
if (touch->config.irq_pin.pin != PIN_IRQ_PIN_NONE)
|
||||
{
|
||||
rt_pin_irq_enable(touch->config.irq_pin.pin, RT_TRUE);
|
||||
}
|
||||
@@ -86,7 +86,7 @@ static void rt_touch_irq_enable(rt_touch_t touch)
|
||||
static void rt_touch_irq_disable(rt_touch_t touch)
|
||||
{
|
||||
#ifdef RT_TOUCH_PIN_IRQ
|
||||
if (touch->config.irq_pin.pin != RT_PIN_NONE)
|
||||
if (touch->config.irq_pin.pin != PIN_IRQ_PIN_NONE)
|
||||
{
|
||||
rt_pin_irq_enable(touch->config.irq_pin.pin, RT_FALSE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user