SystemAgent/src/impl/user_lvgl_impl.c

30 lines
665 B
C
Raw Normal View History

2021-03-18 15:50:37 +00:00
#include "lvgl.h"
2021-03-20 17:23:19 +00:00
#include "impl/user_st7789_impl.h"
2021-03-18 15:50:37 +00:00
2021-03-21 16:01:12 +00:00
#include "impl/user_lvgl_impl.h"
2021-03-18 15:50:37 +00:00
2021-03-20 17:23:19 +00:00
user_st7789_impl_t g_lcd_impl;
2021-03-18 15:50:37 +00:00
st7789_lcd_t g_lcd = {
.cb =
{
2021-03-20 17:23:19 +00:00
.write_cmd_cb = user_st7789_impl_write_cmd,
.write_data_cb = user_st7789_impl_write_data,
.reset_cb = user_st7789_impl_reset,
2021-03-18 15:50:37 +00:00
},
.config =
{
.direction = ST7789_DIR_0,
.pix_fmt = ST7789_RGB888,
},
2021-03-20 17:23:19 +00:00
.user_data = &g_lcd_impl,
2021-03-18 15:50:37 +00:00
};
2021-03-20 17:23:19 +00:00
void user_lvgl_impl_init(void) {
2021-03-21 16:01:12 +00:00
user_st7789_impl_init(&g_lcd_impl);
st7789_lcd_init(&g_lcd);
2021-03-18 15:50:37 +00:00
}
2021-03-21 16:01:12 +00:00
void user_lvgl_impl_deinit(void) {
user_st7789_impl_deinit(&g_lcd_impl);
}