LittlevGL  3.20.00.19
Data Structures | Typedefs | Enumerations | Functions
lv_hal_indev.h File Reference

Detailed Description

Input Device HAL interface layer header file

#include "../../../lv_conf.h"
#include <stdbool.h>
#include <stdint.h>
#include "../lv_misc/lv_area.h"
#include "../lv_misc/lv_task.h"
Include dependency graph for lv_hal_indev.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lv_indev_data_t
 
struct  _lv_indev_drv_t
 
struct  _lv_indev_proc_t
 
struct  _lv_indev_t
 

Typedefs

typedef uint8_t lv_indev_type_t
 
typedef uint8_t lv_indev_state_t
 
typedef struct _lv_indev_drv_t lv_indev_drv_t
 
typedef struct _lv_indev_proc_t lv_indev_proc_t
 
typedef struct _lv_indev_t lv_indev_t
 

Enumerations

enum  {
  LV_INDEV_TYPE_NONE, LV_INDEV_TYPE_POINTER, LV_INDEV_TYPE_KEYPAD, LV_INDEV_TYPE_BUTTON,
  LV_INDEV_TYPE_ENCODER
}
 
enum  { LV_INDEV_STATE_REL = 0, LV_INDEV_STATE_PR }
 

Functions

void lv_indev_drv_init (lv_indev_drv_t *driver)
 
lv_indev_tlv_indev_drv_register (lv_indev_drv_t *driver)
 
void lv_indev_drv_update (lv_indev_t *indev, lv_indev_drv_t *new_drv)
 
lv_indev_tlv_indev_get_next (lv_indev_t *indev)
 
bool lv_indev_read (lv_indev_t *indev, lv_indev_data_t *data)
 

Typedef Documentation

§ lv_indev_type_t

typedef uint8_t lv_indev_type_t

§ lv_indev_state_t

typedef uint8_t lv_indev_state_t

§ lv_indev_drv_t

Initialized by the user and registered by 'lv_indev_add()'

§ lv_indev_proc_t

Run time data of input devices Internally used by the library, you should not need to touch it.

§ lv_indev_t

typedef struct _lv_indev_t lv_indev_t

The main input device descriptor with driver, runtime data ('proc') and some additional information

Enumeration Type Documentation

§ anonymous enum

anonymous enum

Possible input device types

Enumerator
LV_INDEV_TYPE_NONE 

Uninitialized state

LV_INDEV_TYPE_POINTER 

Touch pad, mouse, external button

LV_INDEV_TYPE_KEYPAD 

Keypad or keyboard

LV_INDEV_TYPE_BUTTON 

External (hardware button) which is assigned to a specific point of the screen

LV_INDEV_TYPE_ENCODER 

Encoder with only Left, Right turn and a Button

§ anonymous enum

anonymous enum

States for input devices

Enumerator
LV_INDEV_STATE_REL 
LV_INDEV_STATE_PR 

Function Documentation

§ lv_indev_drv_init()

void lv_indev_drv_init ( lv_indev_drv_t driver)

Initialize an input device driver with default values. It is used to surly have known values in the fields ant not memory junk. After it you can set the fields.

Parameters
driverpointer to driver variable to initialize

§ lv_indev_drv_register()

lv_indev_t* lv_indev_drv_register ( lv_indev_drv_t driver)

Register an initialized input device driver.

Parameters
driverpointer to an initialized 'lv_indev_drv_t' variable (can be local variable)
Returns
pointer to the new input device or NULL on error

§ lv_indev_drv_update()

void lv_indev_drv_update ( lv_indev_t indev,
lv_indev_drv_t new_drv 
)

Update the driver in run time.

Parameters
indevpointer to a input device. (return value of lv_indev_drv_register)
new_drvpointer to the new driver

§ lv_indev_get_next()

lv_indev_t* lv_indev_get_next ( lv_indev_t indev)

Get the next input device.

Parameters
indevpointer to the current input device. NULL to initialize.
Returns
the next input devise or NULL if no more. Give the first input device when the parameter is NULL

§ lv_indev_read()

bool lv_indev_read ( lv_indev_t indev,
lv_indev_data_t data 
)

Read data from an input device.

Parameters
indevpointer to an input device
datainput device will write its data here
Returns
false: no more data; true: there more data to read (buffered)
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale