mikroSDK Reference Manual
tp.h File Reference

Go to the source code of this file.

Data Structures

struct  tp_touch_coord_t
 Touch Point Object Definition. More...
 
struct  tp_touch_item_t
 Touch Item Definition. More...
 
struct  tp_drv_t
 Touch Panel Driver Interface Items. More...
 
struct  tp_cfg_t
 Touch Panel Size And Placement Configuration Object. More...
 
struct  tp_t
 Touch Panel Context Object. More...
 

Macros

#define TP_N_TOUCHES_MAX   5
 Touch Panel Touch Limit. More...
 

Typedefs

typedef uint16_t tp_coord_t
 Touch Point Coordinates Data Type. More...
 
typedef tp_event_t(* tp_press_det_t) (void *)
 Touch Panel Driver Interface Definition. More...
 
typedef void(* tp_press_coord_t) (void *, tp_touch_item_t *)
 Touch Panel Driver Interface Definition. More...
 
typedef void(* tp_gesture_t) (void *, tp_event_t *)
 Touch Panel Driver Interface Definition. More...
 
typedef tp_err_t(* tp_process_t) (void *)
 Touch Panel Driver Interface Definition. More...
 
typedef void(* tp_press_callback_t) (tp_event_t, tp_coord_t, tp_coord_t, tp_touch_id_t)
 Touch Panel Touch Callback Function. More...
 
typedef void(* tp_gesture_callback_t) (tp_event_t)
 Touch Panel Gesture Callback Function. More...
 

Enumerations

enum  tp_err_t
 Touch Panel Error Code Definition. More...
 
enum  tp_event_t
 Touch Panel Event Code Definition. More...
 
enum  tp_touch_id_t
 Touch Point ID Definition. More...
 
enum  tp_rotate_t
 Touch Panel Placement (Orientation) Definition. More...
 

Functions

void tp_cfg_setup (tp_cfg_t *cfg)
 Touch Panel Configuration Function. More...
 
tp_err_t tp_init (tp_t *ctx, tp_cfg_t *cfg, tp_drv_t *drv, void *drv_ctx)
 Touch Panel Initialization Function. More...
 
void tp_press_callback_setup (tp_t *ctx, tp_press_callback_t cb)
 Touch Panel Callback Setup Function. More...
 
void tp_gesture_callback_setup (tp_t *ctx, tp_gesture_callback_t cb)
 Touch Panel Callback Setup Function. More...
 
void tp_rotate (tp_t *ctx, tp_rotate_t rotate)
 Touch Panel Rotate Function. More...
 
tp_rotate_t tp_get_orientation (tp_t *ctx)
 Touch Panel Orientation Check Function. More...
 
void tp_get_size (tp_t *ctx, uint16_t *width, uint16_t *height)
 Touch Panel Size Check Function. More...
 
tp_event_t tp_press_detect (tp_t *ctx)
 Touch Panel Pressure Detector Function. More...
 
tp_err_t tp_press_coordinates (tp_t *ctx, tp_touch_item_t *touch_item)
 Touch Panel Pressure Coordinates Check Function. More...
 
void tp_gesture (tp_t *ctx, tp_event_t *event)
 Touch Panel Gesture Check Function. More...
 
tp_err_t tp_process (tp_t *ctx)
 Touch Panel Process Function. More...
 

Detailed Description

Supported drivers (version 2.0.0):

  • FT5XX6 Driver.

Macro Definition Documentation

◆ TP_N_TOUCHES_MAX

#define TP_N_TOUCHES_MAX   5

Maximal number of possible pressed touches.

Typedef Documentation

◆ tp_coord_t

typedef uint16_t tp_coord_t

Data type of coordinates of touch point defined for Touch Panel library.

◆ tp_press_det_t

typedef tp_event_t( * tp_press_det_t) (void *)

Driver interface defined for touch pressure detection.

◆ tp_press_coord_t

typedef void( * tp_press_coord_t) (void *, tp_touch_item_t *)

Driver interface defined for touch item.

◆ tp_gesture_t

typedef void( * tp_gesture_t) (void *, tp_event_t *)

Driver interface defined for gesture event.

◆ tp_process_t

typedef tp_err_t( * tp_process_t) (void *)

Driver interface defined for process function.

◆ tp_press_callback_t

typedef void( * tp_press_callback_t) (tp_event_t, tp_coord_t, tp_coord_t, tp_touch_id_t)

Touch point callback function defined for Touch Panel library.

◆ tp_gesture_callback_t

typedef void( * tp_gesture_callback_t) (tp_event_t)

Gesture callback function defined for Touch Panel library.

Enumeration Type Documentation

◆ tp_err_t

enum tp_err_t

Specified error codes defined for Touch Panel library.

Enumerator
TP_OK 

Successful.

TP_ERR_INIT_DRV 

Driver initialization error.

TP_ERR_UNSUPPORTED_PIN 

Unsupported pin error.

TP_ERR_SIZE 

Touch panel size error.

TP_ERR_PRESS_COORD 

Pressed coordinates error.

TP_ERR_N_TOUCHES 

Number of touches error.

TP_ERR_N_DATA 

Number of data error.

◆ tp_event_t

enum tp_event_t

Specified events defined for Touch Panel library.

Enumerator
TP_EVENT_PRESS_DOWN 

Touch pressed down event.

TP_EVENT_PRESS_UP 

Touch released event.

TP_EVENT_PRESS_MOVE 

Touch moved event.

TP_EVENT_PRESS_NOT_DET 

Touch not detected event.

TP_EVENT_PRESS_DET 

Touch detected event.

TP_EVENT_GEST_NONE 

Touch not slided event.

TP_EVENT_GEST_LEFT 

Touch slided left event.

TP_EVENT_GEST_RIGHT 

Touch slided right event.

TP_EVENT_GEST_UP 

Touch slided up event.

TP_EVENT_GEST_DOWN 

Touch slided down event.

TP_EVENT_GEST_ZOOM_IN 

Touch zoom in event.

TP_EVENT_GEST_ZOOM_OUT 

Touch zoom out event.

◆ tp_touch_id_t

Specified id of touch points defined for Touch Panel library.

Enumerator
TP_TOUCH_ID_0 

Touch ID 0.

TP_TOUCH_ID_1 

Touch ID 1.

TP_TOUCH_ID_2 

Touch ID 2.

TP_TOUCH_ID_3 

Touch ID 3.

TP_TOUCH_ID_4 

Touch ID 4.

TP_TOUCH_ID_5 

Touch ID 5.

◆ tp_rotate_t

Possible orientations defined for Touch Panel library.

Enumerator
TP_ROTATE_0 

TP rotation 0 degrees.

TP_ROTATE_90 

TP rotation 90 degrees.

TP_ROTATE_180 

TP rotation 180 degrees.

TP_ROTATE_270 

TP rotation 270 degrees.