RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
|
结构体 | |
struct | rt_touch_info |
struct | rt_touch_config |
struct | rt_touch_device |
struct | rt_touch_data |
struct | rt_touch_ops |
宏定义 | |
#define | rt_touch_get_ts() |
#define | RT_TOUCH_VENDOR_UNKNOWN (0) /* unknown */ |
#define | RT_TOUCH_VENDOR_GT (1) /* GTxx series */ |
#define | RT_TOUCH_VENDOR_FT (2) /* FTxx series */ |
#define | RT_TOUCH_TYPE_NONE (0) /* touch ic none */ |
#define | RT_TOUCH_TYPE_CAPACITANCE (1) /* capacitance ic */ |
#define | RT_TOUCH_TYPE_RESISTANCE (2) /* resistance ic */ |
#define | RT_TOUCH_CTRL_GET_ID (RT_DEVICE_CTRL_BASE(Touch) + 0) /* Get device id */ |
#define | RT_TOUCH_CTRL_GET_INFO (RT_DEVICE_CTRL_BASE(Touch) + 1) /* Get touch info */ |
#define | RT_TOUCH_CTRL_SET_MODE (RT_DEVICE_CTRL_BASE(Touch) + 2) /* Set touch's work mode. ex. RT_TOUCH_MODE_POLLING,RT_TOUCH_MODE_INT */ |
#define | RT_TOUCH_CTRL_SET_X_RANGE (RT_DEVICE_CTRL_BASE(Touch) + 3) /* Set x coordinate range */ |
#define | RT_TOUCH_CTRL_SET_Y_RANGE (RT_DEVICE_CTRL_BASE(Touch) + 4) /* Set y coordinate range */ |
#define | RT_TOUCH_CTRL_SET_X_TO_Y (RT_DEVICE_CTRL_BASE(Touch) + 5) /* Set X Y coordinate exchange */ |
#define | RT_TOUCH_CTRL_DISABLE_INT (RT_DEVICE_CTRL_BASE(Touch) + 6) /* Disable interrupt */ |
#define | RT_TOUCH_CTRL_ENABLE_INT (RT_DEVICE_CTRL_BASE(Touch) + 7) /* Enable interrupt */ |
#define | RT_TOUCH_CTRL_POWER_ON (RT_DEVICE_CTRL_BASE(Touch) + 8) /* Touch Power On */ |
#define | RT_TOUCH_CTRL_POWER_OFF (RT_DEVICE_CTRL_BASE(Touch) + 9) /* Touch Power Off */ |
#define | RT_TOUCH_CTRL_GET_STATUS (RT_DEVICE_CTRL_BASE(Touch) + 10) /* Get Touch Power Status */ |
#define | RT_TOUCH_EVENT_NONE (0) /* Touch none */ |
#define | RT_TOUCH_EVENT_UP (1) /* Touch up event */ |
#define | RT_TOUCH_EVENT_DOWN (2) /* Touch down event */ |
#define | RT_TOUCH_EVENT_MOVE (3) /* Touch move event */ |
类型定义 | |
typedef struct rt_touch_device * | rt_touch_t |
函数 | |
int | rt_hw_touch_register (rt_touch_t touch, const char *name, rt_uint32_t flag, void *data) |
void | rt_hw_touch_isr (rt_touch_t touch) |
Touch driver api
Example
#define rt_touch_get_ts | ( | ) |
在文件 dev_touch.h 第 129 行定义.
#define RT_TOUCH_VENDOR_UNKNOWN (0) /* unknown */ |
在文件 dev_touch.h 第 133 行定义.
#define RT_TOUCH_VENDOR_GT (1) /* GTxx series */ |
在文件 dev_touch.h 第 134 行定义.
#define RT_TOUCH_VENDOR_FT (2) /* FTxx series */ |
在文件 dev_touch.h 第 135 行定义.
#define RT_TOUCH_TYPE_NONE (0) /* touch ic none */ |
在文件 dev_touch.h 第 138 行定义.
#define RT_TOUCH_TYPE_CAPACITANCE (1) /* capacitance ic */ |
在文件 dev_touch.h 第 139 行定义.
#define RT_TOUCH_TYPE_RESISTANCE (2) /* resistance ic */ |
在文件 dev_touch.h 第 140 行定义.
#define RT_TOUCH_CTRL_GET_ID (RT_DEVICE_CTRL_BASE(Touch) + 0) /* Get device id */ |
在文件 dev_touch.h 第 143 行定义.
#define RT_TOUCH_CTRL_GET_INFO (RT_DEVICE_CTRL_BASE(Touch) + 1) /* Get touch info */ |
在文件 dev_touch.h 第 144 行定义.
#define RT_TOUCH_CTRL_SET_MODE (RT_DEVICE_CTRL_BASE(Touch) + 2) /* Set touch's work mode. ex. RT_TOUCH_MODE_POLLING,RT_TOUCH_MODE_INT */ |
在文件 dev_touch.h 第 145 行定义.
#define RT_TOUCH_CTRL_SET_X_RANGE (RT_DEVICE_CTRL_BASE(Touch) + 3) /* Set x coordinate range */ |
在文件 dev_touch.h 第 146 行定义.
#define RT_TOUCH_CTRL_SET_Y_RANGE (RT_DEVICE_CTRL_BASE(Touch) + 4) /* Set y coordinate range */ |
在文件 dev_touch.h 第 147 行定义.
#define RT_TOUCH_CTRL_SET_X_TO_Y (RT_DEVICE_CTRL_BASE(Touch) + 5) /* Set X Y coordinate exchange */ |
在文件 dev_touch.h 第 148 行定义.
#define RT_TOUCH_CTRL_DISABLE_INT (RT_DEVICE_CTRL_BASE(Touch) + 6) /* Disable interrupt */ |
在文件 dev_touch.h 第 149 行定义.
#define RT_TOUCH_CTRL_ENABLE_INT (RT_DEVICE_CTRL_BASE(Touch) + 7) /* Enable interrupt */ |
在文件 dev_touch.h 第 150 行定义.
#define RT_TOUCH_CTRL_POWER_ON (RT_DEVICE_CTRL_BASE(Touch) + 8) /* Touch Power On */ |
在文件 dev_touch.h 第 151 行定义.
#define RT_TOUCH_CTRL_POWER_OFF (RT_DEVICE_CTRL_BASE(Touch) + 9) /* Touch Power Off */ |
在文件 dev_touch.h 第 152 行定义.
#define RT_TOUCH_CTRL_GET_STATUS (RT_DEVICE_CTRL_BASE(Touch) + 10) /* Get Touch Power Status */ |
在文件 dev_touch.h 第 153 行定义.
#define RT_TOUCH_EVENT_NONE (0) /* Touch none */ |
在文件 dev_touch.h 第 156 行定义.
#define RT_TOUCH_EVENT_UP (1) /* Touch up event */ |
在文件 dev_touch.h 第 157 行定义.
#define RT_TOUCH_EVENT_DOWN (2) /* Touch down event */ |
在文件 dev_touch.h 第 158 行定义.
#define RT_TOUCH_EVENT_MOVE (3) /* Touch move event */ |
在文件 dev_touch.h 第 159 行定义.
typedef struct rt_touch_device* rt_touch_t |
在文件 dev_touch.h 第 185 行定义.
int rt_hw_touch_register | ( | rt_touch_t | touch, |
const char * | name, | ||
rt_uint32_t | flag, | ||
void * | data ) |
register a touch device
touch | the touch device |
name | the name of touch device |
flag | the flag of touch device |
data | the user data of touch device |
void rt_hw_touch_isr | ( | rt_touch_t | touch | ) |
Touch irq handle
touch | the touch device |