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
0a3ff112
Commit
0a3ff112
authored
Nov 27, 2017
by
Gabor Kiss-Vamosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv_hal: add init funtion to call prior driver registration
parent
c9b28c76
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
2 deletions
+43
-2
lv_hal_disp.c
lv_hal/lv_hal_disp.c
+14
-1
lv_hal_disp.h
lv_hal/lv_hal_disp.h
+8
-1
lv_hal_indev.c
lv_hal/lv_hal_indev.c
+12
-0
lv_hal_indev.h
lv_hal/lv_hal_indev.h
+9
-0
No files found.
lv_hal/lv_hal_disp.c
View file @
0a3ff112
...
...
@@ -41,12 +41,25 @@ static lv_disp_t *active;
**********************/
/**
* Initialize a display 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.
* @param driver pointer to driver variable to initialize
*/
void
lv_disp_drv_init
(
lv_disp_drv_t
*
driver
)
{
driver
->
fill_fp
=
NULL
;
driver
->
map_fp
=
NULL
;
driver
->
blend_fp
=
NULL
;
}
/**
* Register an initialized display driver.
* Automatically set the first display as active.
* @param driver pointer to an initialized 'lv_disp_drv_t' variable (can be local variable)
* @return pointer to the new display or NULL on error
*/
lv_disp_t
*
lv_disp_register
(
lv_disp_drv_t
*
driver
)
lv_disp_t
*
lv_disp_
drv_
register
(
lv_disp_drv_t
*
driver
)
{
lv_disp_t
*
node
;
...
...
lv_hal/lv_hal_disp.h
View file @
0a3ff112
...
...
@@ -46,6 +46,13 @@ typedef struct _disp_t {
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize a display 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.
* @param driver pointer to driver variable to initialize
*/
void
lv_disp_drv_init
(
lv_disp_drv_t
*
driver
);
/**
* Register an initialized display driver.
...
...
@@ -53,7 +60,7 @@ typedef struct _disp_t {
* @param driver pointer to an initialized 'lv_disp_drv_t' variable (can be local variable)
* @return pointer to the new display or NULL on error
*/
lv_disp_t
*
lv_disp_register
(
lv_disp_drv_t
*
driver
);
lv_disp_t
*
lv_disp_
drv_
register
(
lv_disp_drv_t
*
driver
);
/**
* Set the active display
...
...
lv_hal/lv_hal_indev.c
View file @
0a3ff112
...
...
@@ -37,6 +37,18 @@ static lv_indev_t *indev_list = NULL;
**********************/
/**
* 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.
* @param driver pointer to driver variable to initialize
*/
void
lv_indev_drv_init
(
lv_indev_drv_t
*
driver
)
{
driver
->
read_fp
=
NULL
;
driver
->
type
=
LV_INDEV_TYPE_NONE
;
}
/**
* Register an initialized input device driver.
* @param driver pointer to an initialized 'lv_indev_drv_t' variable (can be local variable)
* @return pointer to the new input device or NULL on error
...
...
lv_hal/lv_hal_indev.h
View file @
0a3ff112
...
...
@@ -30,6 +30,7 @@ extern "C" {
/*Possible input device types*/
typedef
enum
{
LV_INDEV_TYPE_NONE
,
/*Show uninitialized state*/
LV_INDEV_TYPE_TOUCHPAD
,
/*Touch pad*/
LV_INDEV_TYPE_MOUSE
,
/*Mouse or similar pointer device*/
LV_INDEV_TYPE_KEYPAD
,
/*Keypad or keyboard*/
...
...
@@ -106,6 +107,14 @@ typedef struct _lv_indev_t {
**********************/
/**
* 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.
* @param driver pointer to driver variable to initialize
*/
void
lv_indev_drv_init
(
lv_indev_drv_t
*
driver
);
/**
* Register an initialized input device driver.
* @param driver pointer to an initialized 'lv_indev_drv_t' variable (can be local variable)
* @return pointer to the new input device or NULL on error
...
...
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