Add pointer to lv_disp_drv_t as first parameter to HAL functions
This commit is contained in:
parent
413721182c
commit
0f1a6d490e
4 changed files with 78 additions and 51 deletions
|
@ -1,10 +1,30 @@
|
|||
#ifndef DISPLAY_HAL_H_
|
||||
#define DISPLAY_HAL_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "lvgl/lvgl.h"
|
||||
#endif
|
||||
|
||||
/* NOTE We could remove this function from here, because it's used to
|
||||
* initialize the GPIOS on the MCU */
|
||||
void display_hal_init_io(void);
|
||||
void display_hal_delay(uint32_t delay_ms);
|
||||
void display_hal_backlight(uint8_t state);
|
||||
void display_hal_gpio_dc(uint8_t state);
|
||||
void display_hal_gpio_rst(uint8_t state);
|
||||
|
||||
/* NOTE drv parameter is meant to be used in multi display projects, so the
|
||||
* user could distinguish multiple displays on their hal implementation */
|
||||
void display_hal_delay(lv_disp_drv_t *drv, uint32_t delay_ms);
|
||||
void display_hal_backlight(lv_disp_drv_t *drv, uint8_t state);
|
||||
void display_hal_gpio_dc(lv_disp_drv_t *drv, uint8_t state);
|
||||
void display_hal_gpio_rst(lv_disp_drv_t *drv, uint8_t state);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue