touchpad 2.0.0.0
|
Functions | |
void | touchpad_cfg_setup (touchpad_cfg_t *cfg) |
Config Object Initialization function. | |
TOUCHPAD_RETVAL | touchpad_init (touchpad_t *ctx, touchpad_cfg_t *cfg) |
Initialization function. | |
void | touchpad_default_cfg (touchpad_t *ctx) |
Click Default Configuration function. | |
void | touchpad_generic_write (touchpad_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | touchpad_generic_read (touchpad_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | touchpad_get_touch_coordinate (touchpad_t *ctx, touchpad_cord_t *cord) |
Get touch coordinate. | |
uint8_t | touchpad_get_interrupt_state (touchpad_t *ctx) |
Get interrupt state. | |
void | touchpad_reset (touchpad_t *ctx) |
Hardware Reset. | |
uint8_t | touchpad_get_event_state (touchpad_t *ctx) |
Get event state. | |
uint8_t | touchpad_get_gesture_type (touchpad_t *ctx) |
Gesture type. | |
void touchpad_cfg_setup | ( | touchpad_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void touchpad_default_cfg | ( | touchpad_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Touchpad click.
void touchpad_generic_read | ( | touchpad_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void touchpad_generic_write | ( | touchpad_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
uint8_t touchpad_get_event_state | ( | touchpad_t * | ctx | ) |
Get event state.
ctx | Click object. |
uint8_t touchpad_get_gesture_type | ( | touchpad_t * | ctx | ) |
Gesture type.
ctx | Click object. |
- NO_GESTURE_PRESENT - SINGLE_CLICK - CLICK_AND_HOLD - DOUBLE_CLICK - DOWN_SWIPE - DOWN_SWIPE_AND_HOLD - RIGHT_SWIPE - RIGHT_SWIPE_AND_HOLD - UP_SWIPE - UP_SWIPE_AND_HOLD - LEFT_SWIPE - LEFT_SWIPE_AND_HOLD
uint8_t touchpad_get_interrupt_state | ( | touchpad_t * | ctx | ) |
Get interrupt state.
ctx | Click object. |
void touchpad_get_touch_coordinate | ( | touchpad_t * | ctx, |
touchpad_cord_t * | cord ) |
Get touch coordinate.
ctx | Click object. |
cord | A structure that contains information about touch coordinates |
@description This function reads X and Y coordinate
TOUCHPAD_RETVAL touchpad_init | ( | touchpad_t * | ctx, |
touchpad_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void touchpad_reset | ( | touchpad_t * | ctx | ) |
Hardware Reset.
ctx | Click object. |