![]() |
MCUXpresso SDK API Reference Manual
Rev 2.16.000
NXP Semiconductors
|
Data Structures | |
struct | _touch_point |
Touch point information. More... | |
struct | _ft6x06_handle |
FT6X06 driver handle. More... | |
Macros | |
#define | FT6X06_I2C_ADDRESS (0x38) |
FT6X06 I2C address. More... | |
#define | FT6X06_MAX_TOUCHES (2U) |
FT6X06 maximum number of simultaneously detected touches. More... | |
#define | F6X06_TOUCH_DATA_SUBADDR (1) |
FT6X06 register address where touch data begin. More... | |
#define | FT6X06_TOUCH_DATA_LEN (2 + (FT6X06_MAX_TOUCHES) * 6) |
FT6X06 raw touch data length. More... | |
Typedefs | |
typedef enum _touch_event | touch_event_t |
Touch event. More... | |
typedef struct _touch_point | touch_point_t |
Touch point information. More... | |
typedef struct _ft6x06_handle | ft6x06_handle_t |
FT6X06 driver handle. More... | |
Enumerations | |
enum | _touch_event { kTouch_Down = 0, kTouch_Up = 1, kTouch_Contact = 2, kTouch_Reserved = 3 } |
Touch event. More... | |
Functions | |
status_t | FT6X06_Init (ft6x06_handle_t *handle, ARM_DRIVER_I2C *i2c_driver) |
Initialize the driver. More... | |
status_t | FT6X06_Denit (ft6x06_handle_t *handle) |
De-initialize the driver. More... | |
void | FT6X06_EventHandler (ft6x06_handle_t *handle, uint32_t i2c_event) |
Event Handler. More... | |
status_t | FT6X06_GetSingleTouch (ft6x06_handle_t *handle, touch_event_t *touch_event, int *touch_x, int *touch_y) |
Get single touch point coordinate. More... | |
status_t | FT6X06_GetMultiTouch (ft6x06_handle_t *handle, int *touch_count, touch_point_t touch_array[FT6X06_MAX_TOUCHES]) |
Get multiple touch points coordinate. More... | |
struct _touch_point |
Data Fields | |
touch_event_t | TOUCH_EVENT |
Indicates the state or event of the touch point. More... | |
uint8_t | TOUCH_ID |
Id of the touch point. More... | |
uint16_t | TOUCH_X |
X coordinate of the touch point. | |
uint16_t | TOUCH_Y |
Y coordinate of the touch point. | |
touch_event_t _touch_point::TOUCH_EVENT |
uint8_t _touch_point::TOUCH_ID |
This numeric value stays constant between down and up event.
struct _ft6x06_handle |
#define FT6X06_I2C_ADDRESS (0x38) |
#define FT6X06_MAX_TOUCHES (2U) |
#define F6X06_TOUCH_DATA_SUBADDR (1) |
#define FT6X06_TOUCH_DATA_LEN (2 + (FT6X06_MAX_TOUCHES) * 6) |
typedef enum _touch_event touch_event_t |
typedef struct _touch_point touch_point_t |
typedef struct _ft6x06_handle ft6x06_handle_t |
enum _touch_event |
status_t FT6X06_Init | ( | ft6x06_handle_t * | handle, |
ARM_DRIVER_I2C * | i2c_driver | ||
) |
This function power on the touch controller, releases the touch controller reset. After calling this function, the touch controller is ready to work.
[in] | handle | Pointer to the driver. |
[in] | i2c_driver | Pointer to the CMSIS I2C driver used by FT6X06. |
status_t FT6X06_Denit | ( | ft6x06_handle_t * | handle | ) |
After this function, the touch controller is powered off.
[in] | handle | Pointer to the driver. |
void FT6X06_EventHandler | ( | ft6x06_handle_t * | handle, |
uint32_t | i2c_event | ||
) |
Called in CMSIS I2C event handler to notify the event.
[in] | handle | Pointer to the driver. |
[in] | i2c_event | The event passed by CMSIS I2C signal function ARM_I2C_SignalEvent_t |
status_t FT6X06_GetSingleTouch | ( | ft6x06_handle_t * | handle, |
touch_event_t * | touch_event, | ||
int * | touch_x, | ||
int * | touch_y | ||
) |
Get one touch point coordinate.
[in] | handle | Pointer to the driver. |
[out] | touch_event | Touch Event. |
[out] | touch_x | X coordinate of the touch point. |
[out] | touch_y | Y coordinate of the touch point. |
status_t FT6X06_GetMultiTouch | ( | ft6x06_handle_t * | handle, |
int * | touch_count, | ||
touch_point_t | touch_array[FT6X06_MAX_TOUCHES] | ||
) |
When this function returns successfully, the touch_count
shows how many valid touch points there are in the touch_array
.
[in] | handle | Pointer to the driver. |
[out] | touch_count | The actual touch point number. |
[out] | touch_array | Array of touch points coordinate. |