2020-12-17 06:02:55 +00:00
|
|
|
/**
|
|
|
|
* @file lvgl_helpers.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LVGL_HELPERS_H
|
|
|
|
#define LVGL_HELPERS_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*********************
|
|
|
|
* INCLUDES
|
|
|
|
*********************/
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
#include "lvgl_spi_conf.h"
|
|
|
|
#include "lvgl_tft/disp_driver.h"
|
2021-06-26 06:40:41 +00:00
|
|
|
#include "lvgl_tft/esp_lcd_backlight.h"
|
2020-12-17 06:02:55 +00:00
|
|
|
#include "lvgl_touch/touch_driver.h"
|
|
|
|
|
|
|
|
/*********************
|
|
|
|
* DEFINES
|
|
|
|
*********************/
|
2021-02-07 23:55:20 +00:00
|
|
|
|
2020-12-17 06:02:55 +00:00
|
|
|
/**********************
|
|
|
|
* TYPEDEFS
|
|
|
|
**********************/
|
|
|
|
|
|
|
|
/**********************
|
|
|
|
* GLOBAL PROTOTYPES
|
|
|
|
**********************/
|
|
|
|
|
2021-07-08 09:04:07 +00:00
|
|
|
void lvgl_i2c_locking(void* leader);
|
|
|
|
|
2020-12-17 06:02:55 +00:00
|
|
|
/* Initialize detected SPI and I2C bus and devices */
|
2022-01-07 23:22:11 +00:00
|
|
|
void lvgl_interface_init(void);
|
2020-12-17 06:02:55 +00:00
|
|
|
|
|
|
|
/* Initialize SPI master */
|
2022-02-02 22:45:52 +00:00
|
|
|
bool lvgl_spi_driver_init(int host, int miso_pin, int mosi_pin, int sclk_pin,
|
2020-12-17 06:02:55 +00:00
|
|
|
int max_transfer_sz, int dma_channel, int quadwp_pin, int quadhd_pin);
|
|
|
|
|
2021-10-07 04:17:03 +00:00
|
|
|
/* Initialize display GPIOs, e.g. DC and RST pins */
|
2022-02-03 03:28:34 +00:00
|
|
|
void lvgl_display_gpios_init(void);
|
2022-01-07 23:22:11 +00:00
|
|
|
|
|
|
|
/* Get display buffer size */
|
|
|
|
size_t lvgl_get_display_buffer_size(void);
|
|
|
|
|
2020-12-17 06:02:55 +00:00
|
|
|
/**********************
|
|
|
|
* MACROS
|
|
|
|
**********************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* LVGL_HELPERS_H */
|