Zephyr Project API 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

FT8xx driver public APIs. More...

Modules

 FT8xx co-processor
 FT8xx co-processor engine functions.
 
 FT8xx common functions
 FT8xx functions to write and read memory.
 
 FT8xx display list
 FT8xx display list commands.
 
 FT8xx memory map
 FT8xx memory addresses.
 
 FT8xx reference API
 FT8xx reference API.
 

Data Structures

struct  ft8xx_touch_transform
 Structure holding touchscreen calibration data. More...
 

Typedefs

typedef void(* ft8xx_int_callback) (const struct device *dev, void *user_data)
 Callback API to inform API user that FT8xx triggered interrupt.
 

Functions

void ft8xx_calibrate (const struct device *dev, struct ft8xx_touch_transform *data)
 Calibrate touchscreen.
 
void ft8xx_touch_transform_set (const struct device *dev, const struct ft8xx_touch_transform *data)
 Set touchscreen calibration data.
 
int ft8xx_get_touch_tag (const struct device *dev)
 Get tag of recently touched element.
 
void ft8xx_register_int (const struct device *dev, ft8xx_int_callback callback, void *user_data)
 Set callback executed when FT8xx triggers interrupt.
 

Detailed Description

FT8xx driver public APIs.

Typedef Documentation

◆ ft8xx_int_callback

ft8xx_int_callback

#include <include/zephyr/drivers/misc/ft8xx/ft8xx.h>

Callback API to inform API user that FT8xx triggered interrupt.

This callback is called from IRQ context.

Parameters
devPointer to the device structure for the driver instance
user_dataPointer to user data provided during callback registration

Function Documentation

◆ ft8xx_calibrate()

void ft8xx_calibrate ( const struct device dev,
struct ft8xx_touch_transform data 
)

#include <include/zephyr/drivers/misc/ft8xx/ft8xx.h>

Calibrate touchscreen.

Run touchscreen calibration procedure that collects three touches from touch screen. Computed calibration result is automatically applied to the touchscreen processing and returned with data.

The content of data may be stored and used after reset in ft8xx_touch_transform_set() to avoid calibrating touchscreen after each device reset.

Parameters
devPointer to the device structure for the driver instance
dataPointer to touchscreen transform structure to populate

◆ ft8xx_get_touch_tag()

int ft8xx_get_touch_tag ( const struct device dev)

#include <include/zephyr/drivers/misc/ft8xx/ft8xx.h>

Get tag of recently touched element.

Parameters
devPointer to the device structure for the driver instance
Returns
Tag value 0-255 of recently touched element

◆ ft8xx_register_int()

void ft8xx_register_int ( const struct device dev,
ft8xx_int_callback  callback,
void *  user_data 
)

#include <include/zephyr/drivers/misc/ft8xx/ft8xx.h>

Set callback executed when FT8xx triggers interrupt.

This function configures FT8xx to trigger interrupt when touch event changes tag value.

When touch event changes tag value, FT8xx activates INT line. The line is kept active until ft8xx_get_touch_tag() is called. It results in single execution of callback until ft8xx_get_touch_tag() is called.

Parameters
devPointer to the device structure for the driver instance
callbackPointer to function called when FT8xx triggers interrupt
user_dataPointer to user data to be passed to the callback

◆ ft8xx_touch_transform_set()

void ft8xx_touch_transform_set ( const struct device dev,
const struct ft8xx_touch_transform data 
)

#include <include/zephyr/drivers/misc/ft8xx/ft8xx.h>

Set touchscreen calibration data.

Apply given touchscreen transform data to the touchscreen processing. Data is to be obtained from calibration procedure started with ft8xx_calibrate().

Parameters
devPointer to the device structure for the driver instance
dataPointer to touchscreen transform structure to apply