Zephyr Project API 4.0.99
A Scalable Open Source RTOS
|
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. | |
FT8xx driver public APIs.
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.
dev | Pointer to the device structure for the driver instance |
user_data | Pointer to user data provided during callback registration |
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.
dev | Pointer to the device structure for the driver instance |
data | Pointer to touchscreen transform structure to populate |
int ft8xx_get_touch_tag | ( | const struct device * | dev | ) |
#include <include/zephyr/drivers/misc/ft8xx/ft8xx.h>
Get tag of recently touched element.
dev | Pointer to the device structure for the driver instance |
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.
dev | Pointer to the device structure for the driver instance |
callback | Pointer to function called when FT8xx triggers interrupt |
user_data | Pointer to user data to be passed to the callback |
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().
dev | Pointer to the device structure for the driver instance |
data | Pointer to touchscreen transform structure to apply |