Solar panel
|
FT5xx6 Touch Controller Driver API Reference. More...
Modules | |
FT5xx6 Registers | |
FT5xx6 Registers List. | |
FT5xx6 Settings | |
FT5xx6 Settings List. | |
Functions | |
void | ft5xx6_cfg_setup (ft5xx6_cfg_t *cfg, const ft5xx6_controller_t *controller) |
FT5xx6 Configuration Object Setup Function. | |
tp_err_t | ft5xx6_init (ft5xx6_t *ctx, ft5xx6_cfg_t *cfg, tp_drv_t *drv) |
FT5xx6 Initialization Function. | |
void | ft5xx6_default_cfg (ft5xx6_t *ctx) |
FT5xx6 Default Configuration Function. | |
void | ft5xx6_generic_write (ft5xx6_t *ctx, uint8_t reg_addr, uint8_t data_in) |
FT5xx6 Generic Write Function. | |
uint8_t | ft5xx6_generic_read_single (ft5xx6_t *ctx, uint8_t reg_addr) |
FT5xx6 Generic Single Read Function. | |
tp_err_t | ft5xx6_generic_read_multiple (ft5xx6_t *ctx, uint8_t reg_addr, uint8_t *data_out, uint16_t n_bytes) |
FT5xx6 Generic Multiple Read Function. | |
void | ft5xx6_dev_mode_setup (ft5xx6_t *ctx, ft5xx6_dev_mode_t mode) |
FT5xx6 Device Mode Setup Function. | |
void | ft5xx6_run_mode_setup (ft5xx6_t *ctx, ft5xx6_run_mode_t mode) |
FT5xx6 Run Mode Setup Function. | |
tp_event_t | ft5xx6_press_detect (ft5xx6_t *ctx) |
FT5xx6 Touch Pressure Detect Function. | |
void | ft5xx6_press_coordinates (ft5xx6_t *ctx, tp_touch_item_t *touch_item) |
FT5xx6 Pressure Coordinates Check Function. | |
void | ft5xx6_gesture (ft5xx6_t *ctx, tp_event_t *event) |
FT5xx6 Gesture Check Function. | |
tp_err_t | ft5xx6_process (ft5xx6_t *ctx) |
FT5xx6 Process Function. | |
FT5xx6 Touch Controller Driver API Reference.
API for configuring and manipulating FT5xx6 Touch Controller driver.
void ft5xx6_cfg_setup | ( | ft5xx6_cfg_t * | cfg, |
const ft5xx6_controller_t * | controller | ||
) |
FT5xx6 Configuration Object Setup Function.
This function initializes FT5xx6 configuration structure to default values.
[out] | cfg | : FT5xx6 configuration object. See ft5xx6_cfg_t structure definition for detailed explanation. |
[in] | controller | : Touch controller selector from FT5xx6 series touch controllers. See ft5xx6_controller_t structure definition for detailed explanation. |
Example
void ft5xx6_default_cfg | ( | ft5xx6_t * | ctx | ) |
FT5xx6 Default Configuration Function.
This function puts the FT5xx6 touch controller to normal operating mode.
[in] | ctx | : FT5xx6 context object. See ft5xx6_t structure definition for detailed explanation. |
Example
void ft5xx6_dev_mode_setup | ( | ft5xx6_t * | ctx, |
ft5xx6_dev_mode_t | mode | ||
) |
FT5xx6 Device Mode Setup Function.
This function puts the FT5xx6 series touch controllers to the selected device mode.
[in] | ctx | : FT5xx6 context object. See ft5xx6_t structure definition for detailed explanation. |
[in] | mode | : device mode of operation. See ft5xx6_dev_mode_t for valid values. |
Example
tp_err_t ft5xx6_generic_read_multiple | ( | ft5xx6_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | data_out, | ||
uint16_t | n_bytes | ||
) |
FT5xx6 Generic Multiple Read Function.
This function allows user to read the desired number of data bytes, starting from the selected register address.
[in] | ctx | : FT5xx6 context object. See ft5xx6_t structure definition for detailed explanation. |
[in] | reg_addr | : Register address which from the data reading will be started. |
[out] | data_out | : Memory where read data will be stored. |
[in] | n_bytes | : Number of data bytes to be read. |
0
- OK, 6
- Number of transfered bytes is out of range. See #tp_err_t structure definition for detailed explanation.uint8_t ft5xx6_generic_read_single | ( | ft5xx6_t * | ctx, |
uint8_t | reg_addr | ||
) |
FT5xx6 Generic Single Read Function.
This function allows user to read any desired register of the FT5xx6 series touch controllers.
[in] | ctx | : FT5xx6 context object. See ft5xx6_t structure definition for detailed explanation. |
[in] | reg_addr | : Register address which from data be read. |
Example
void ft5xx6_generic_write | ( | ft5xx6_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t | data_in | ||
) |
FT5xx6 Generic Write Function.
This function allows user to write any 8-bit data to the selected register of the FT5xx6 series touch controllers.
[in] | ctx | : FT5xx6 context object. See ft5xx6_t structure definition for detailed explanation. |
[in] | reg_addr | : Register address where data be written. |
[in] | data_in | : Data to be written. |
Example
void ft5xx6_gesture | ( | ft5xx6_t * | ctx, |
tp_event_t * | event | ||
) |
FT5xx6 Gesture Check Function.
This function allows user to get the informations about the gesture (slide direction).
[in] | ctx | : FT5xx6 context object. See ft5xx6_t structure definition for detailed explanation. |
[out] | event | : Touch panel gesture data. See #tp_event_t structure definition for detailed explanation. |
Example
tp_err_t ft5xx6_init | ( | ft5xx6_t * | ctx, |
ft5xx6_cfg_t * | cfg, | ||
tp_drv_t * | drv | ||
) |
FT5xx6 Initialization Function.
This function initializes FT5xx6 context object to default values and allows driver interface object to be linked with FT5xx6 driver functions.
[out] | ctx | : FT5xx6 context object. See ft5xx6_t structure definition for detailed explanation. |
[in] | cfg | : FT5xx6 configuration object. See ft5xx6_cfg_t structure definition for detailed explanation. |
[out] | drv | : TP driver interface object. See #tp_drv_t structure definition for detailed explanation. |
0
- OK, 1
- I2C driver init error, 2
- Unsupported pin. See #tp_err_t structure definition for detailed explanation.void ft5xx6_press_coordinates | ( | ft5xx6_t * | ctx, |
tp_touch_item_t * | touch_item | ||
) |
FT5xx6 Pressure Coordinates Check Function.
This function allows user to get the informations about the number of pressed touch points, coordinates and touch event for each pressed touch point.
[in] | ctx | : FT5xx6 context object. See ft5xx6_t structure definition for detailed explanation. |
[out] | touch_item | : Touch item data. See #tp_touch_item_t structure definition for detailed explanation. |
Example
tp_event_t ft5xx6_press_detect | ( | ft5xx6_t * | ctx | ) |
FT5xx6 Touch Pressure Detect Function.
This function allows the touch pressure detection.
[in] | ctx | : FT5xx6 context object. See ft5xx6_t structure definition for detailed explanation. |
3
- Touch pressure is not detected, 4
- Touch pressure is detected. See #tp_event_t structure definition for detailed explanation. Example
tp_err_t ft5xx6_process | ( | ft5xx6_t * | ctx | ) |
FT5xx6 Process Function.
This function detects a touch pressure, and if any touch pressure was detected, then collects all informations about the pressed touch and slide direction (gesture).
[in] | ctx | : FT5xx6 context object. See ft5xx6_t structure definition for detailed explanation. |
0
- OK, 5
- Number of pressed touches is out of range. See #tp_err_t structure definition for detailed explanation. Example
void ft5xx6_run_mode_setup | ( | ft5xx6_t * | ctx, |
ft5xx6_run_mode_t | mode | ||
) |
FT5xx6 Run Mode Setup Function.
This function puts the FT5xx6 series touch controllers to the selected run mode.
[in] | ctx | : FT5xx6 context object. See ft5xx6_t structure definition for detailed explanation. |
[in] | mode | : run mode of operation. See ft5xx6_run_mode_t for valid values. |
Example