SD card support (#23)
### General - Added support for SD cards in `HadwareConfig` - Properly disabled PC build for now (I was still getting error emails) - Updated `README.md` with a device compatibility table ### T-Deck: - Implemented SD card support - Logging message cleanup - Updated `config,h` with various new settings - Reduced stack depth from `8096` to `5000`
This commit is contained in:
committed by
GitHub
parent
618f557a16
commit
d27579848a
@@ -1,3 +1,4 @@
|
||||
#include "config.h"
|
||||
#include "esp_lvgl_port.h"
|
||||
#include "keyboard.h"
|
||||
#include "log.h"
|
||||
@@ -6,7 +7,7 @@
|
||||
|
||||
#define TAG "tdeck_lvgl"
|
||||
|
||||
lv_disp_t* tdeck_init_display();
|
||||
lv_disp_t* tdeck_display_init();
|
||||
void tdeck_enable_backlight();
|
||||
bool tdeck_init_touch(esp_lcd_panel_io_handle_t* io_handle, esp_lcd_touch_handle_t* touch_handle);
|
||||
|
||||
@@ -18,29 +19,33 @@ bool tdeck_init_lvgl() {
|
||||
// Init LVGL Port library
|
||||
|
||||
const lvgl_port_cfg_t lvgl_cfg = {
|
||||
.task_priority = ThreadPriorityHigh,
|
||||
.task_stack = 8096,
|
||||
.task_priority = THREAD_PRIORITY_RENDER,
|
||||
.task_stack = TDECK_LVGL_TASK_STACK_DEPTH ,
|
||||
.task_affinity = -1, // core pinning
|
||||
.task_max_sleep_ms = 500,
|
||||
.timer_period_ms = 5
|
||||
};
|
||||
|
||||
TT_LOG_D(TAG, "LVGL port init");
|
||||
if (lvgl_port_init(&lvgl_cfg) != ESP_OK) {
|
||||
TT_LOG_E(TAG, "lvgl port init failed");
|
||||
TT_LOG_E(TAG, "LVGL port init failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Add display
|
||||
|
||||
display = tdeck_init_display();
|
||||
TT_LOG_D(TAG, "Creating display");
|
||||
display = tdeck_display_init();
|
||||
if (display == NULL) {
|
||||
TT_LOG_E(TAG, "failed to add display");
|
||||
TT_LOG_E(TAG, "Creating display failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Add touch
|
||||
|
||||
TT_LOG_D(TAG, "Creating touch");
|
||||
if (!tdeck_init_touch(&touch_io_handle, &touch_handle)) {
|
||||
TT_LOG_E(TAG, "Creating touch failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -49,9 +54,10 @@ bool tdeck_init_lvgl() {
|
||||
.handle = touch_handle,
|
||||
};
|
||||
|
||||
TT_LOG_D(TAG, "Adding touch");
|
||||
lv_indev_t _Nullable* touch_indev = lvgl_port_add_touch(&touch_cfg);
|
||||
if (touch_indev == NULL) {
|
||||
TT_LOG_E(TAG, "failed to add touch to lvgl");
|
||||
TT_LOG_E(TAG, "Adding touch failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -60,6 +66,7 @@ bool tdeck_init_lvgl() {
|
||||
|
||||
keyboard_alloc(display);
|
||||
|
||||
TT_LOG_D(TAG, "enabling backlight");
|
||||
tdeck_enable_backlight();
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user