BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lvgl
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
lvgl
Commits
fada3aab
Commit
fada3aab
authored
Feb 20, 2018
by
Bryan Mayland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add user pointer to indev driver for state storage between read() calls
parent
88096cbb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
lv_hal_indev.c
lv_hal/lv_hal_indev.c
+2
-0
lv_hal_indev.h
lv_hal/lv_hal_indev.h
+2
-0
No files found.
lv_hal/lv_hal_indev.c
View file @
fada3aab
...
...
@@ -46,6 +46,7 @@ void lv_indev_drv_init(lv_indev_drv_t *driver)
{
driver
->
read
=
NULL
;
driver
->
type
=
LV_INDEV_TYPE_NONE
;
driver
->
priv
=
NULL
;
}
/**
...
...
@@ -107,6 +108,7 @@ bool lv_indev_read(lv_indev_t * indev, lv_indev_data_t *data)
bool
cont
=
false
;
if
(
indev
->
driver
.
read
)
{
data
->
priv
=
indev
->
driver
.
priv
;
cont
=
indev
->
driver
.
read
(
data
);
}
else
{
memset
(
data
,
0
,
sizeof
(
lv_indev_data_t
));
...
...
lv_hal/lv_hal_indev.h
View file @
fada3aab
...
...
@@ -48,12 +48,14 @@ typedef struct {
uint32_t
key
;
/*For INDEV_TYPE_KEYPAD*/
};
lv_indev_state_t
state
;
/*LV_INDEV_EVENT_REL or LV_INDEV_EVENT_PR*/
void
*
priv
;
/*'lv_indev_drv_t.priv' for this driver*/
}
lv_indev_data_t
;
/*Initialized by the user and registered by 'lv_indev_add()'*/
typedef
struct
{
lv_hal_indev_type_t
type
;
/*Input device type*/
bool
(
*
read
)(
lv_indev_data_t
*
data
);
/*Function pointer to read data. Return 'true' if there is still data to be read (buffered)*/
void
*
priv
;
/*Opaque pointer for driver's use, passed in 'lv_indev_data_t' on read*/
}
lv_indev_drv_t
;
struct
_lv_obj_t
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment