chore: import local project into Gitea
This commit is contained in:
2
components/bsp/CMakeLists.txt
Normal file
2
components/bsp/CMakeLists.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
idf_component_register(SRCS "bsp.c"
|
||||
INCLUDE_DIRS ".")
|
||||
23
components/bsp/bsp.c
Normal file
23
components/bsp/bsp.c
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "bsp/esp-bsp.h"
|
||||
#include "bsp.h"
|
||||
|
||||
void bsp_display_start(void)
|
||||
{
|
||||
bsp_display_cfg_t cfg = {
|
||||
.lvgl_port_cfg = ESP_LVGL_PORT_INIT_CONFIG(),
|
||||
.buffer_size = BSP_LCD_DRAW_BUFF_SIZE,
|
||||
.double_buffer = BSP_LCD_DRAW_BUFF_DOUBLE,
|
||||
.flags = {
|
||||
.buff_dma = true,
|
||||
.buff_spiram = false,
|
||||
.sw_rotate = false,
|
||||
}};
|
||||
bsp_display_start_with_config(&cfg);
|
||||
bsp_display_backlight_on();
|
||||
}
|
||||
|
||||
void bsp_touch_init(void)
|
||||
{
|
||||
// The touch driver is initialized as part of bsp_display_start()
|
||||
// in the esp-bsp component, so this function can be left empty.
|
||||
}
|
||||
12
components/bsp/bsp.h
Normal file
12
components/bsp/bsp.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void bsp_display_start(void);
|
||||
void bsp_touch_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user