C++ refactoring (#91)
This commit is contained in:
committed by
GitHub
parent
d06137ba76
commit
ca5d4b8226
@@ -2,8 +2,8 @@
|
||||
#include "config.h"
|
||||
#include "lvgl.h"
|
||||
#include "TactilityCore.h"
|
||||
#include "Ui/LvglKeypad.h"
|
||||
#include "Hal/I2c/I2c.h"
|
||||
#include "ui/LvglKeypad.h"
|
||||
#include "hal/i2c/I2c.h"
|
||||
#include <driver/i2c.h>
|
||||
|
||||
#define TAG "tdeck_keyboard"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "Hal/Configuration.h"
|
||||
#include "hal/Configuration.h"
|
||||
|
||||
extern const tt::hal::Configuration lilygo_tdeck;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "Log.h"
|
||||
#include "Thread.h"
|
||||
#include "Ui/LvglSync.h"
|
||||
#include "ui/LvglSync.h"
|
||||
#include "config.h"
|
||||
#include "display.h"
|
||||
#include "esp_lvgl_port.h"
|
||||
@@ -59,7 +59,7 @@ bool tdeck_init_lvgl() {
|
||||
}
|
||||
|
||||
// Set syncing functions
|
||||
tt::lvgl::sync_set(&lvgl_port_lock, &lvgl_port_unlock);
|
||||
tt::lvgl::syncSet(&lvgl_port_lock, &lvgl_port_unlock);
|
||||
|
||||
keyboard_alloc(display);
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#include "Hal/Sdcard.h"
|
||||
#include "hal/sdcard/Sdcard.h"
|
||||
#include "Check.h"
|
||||
#include "Log.h"
|
||||
#include "config.h"
|
||||
|
||||
#include "esp_vfs_fat.h"
|
||||
#include "sdmmc_cmd.h"
|
||||
#include "Ui/LvglSync.h"
|
||||
#include "ui/LvglSync.h"
|
||||
|
||||
#define TAG "tdeck_sdcard"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "Hal/Configuration.h"
|
||||
#include "hal/Configuration.h"
|
||||
|
||||
extern const tt::hal::Configuration m5stack_core2;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "Hal/Configuration.h"
|
||||
#include "hal/Configuration.h"
|
||||
|
||||
extern const tt::hal::Configuration m5stack_cores3;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "esp_lvgl_port.h"
|
||||
#include "Log.h"
|
||||
#include "Thread.h"
|
||||
#include "Ui/LvglSync.h"
|
||||
#include "ui/LvglSync.h"
|
||||
|
||||
#define TAG "cores3_lvgl"
|
||||
|
||||
@@ -40,7 +40,7 @@ bool m5stack_lvgl_init() {
|
||||
lv_indev_set_display(touch_indev, display);
|
||||
|
||||
// Set syncing functions
|
||||
tt::lvgl::sync_set(&lvgl_port_lock, &lvgl_port_unlock);
|
||||
tt::lvgl::syncSet(&lvgl_port_lock, &lvgl_port_unlock);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Hal/Power.h"
|
||||
#include "Hal/Sdcard.h"
|
||||
#include "hal/Power.h"
|
||||
#include "hal/sdcard/Sdcard.h"
|
||||
|
||||
extern bool m5stack_bootstrap();
|
||||
extern bool m5stack_lvgl_init();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Hal/Power.h"
|
||||
#include "hal/Power.h"
|
||||
#include "M5Unified.hpp"
|
||||
|
||||
/**
|
||||
@@ -30,9 +30,9 @@ static int32_t get_current() {
|
||||
}
|
||||
|
||||
extern const tt::hal::Power m5stack_power = {
|
||||
.is_charging = &is_charging,
|
||||
.is_charging_enabled = &is_charging_enabled,
|
||||
.set_charging_enabled = &set_charging_enabled,
|
||||
.get_charge_level = &get_charge_level,
|
||||
.get_current = &get_current
|
||||
.isCharging = &is_charging,
|
||||
.isChargingEnabled = &is_charging_enabled,
|
||||
.setChargingEnabled = &set_charging_enabled,
|
||||
.getChargeLevel = &get_charge_level,
|
||||
.getCurrent = &get_current
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "Check.h"
|
||||
#include "Log.h"
|
||||
#include "Hal/Sdcard.h"
|
||||
#include "hal/sdcard/Sdcard.h"
|
||||
|
||||
#include "esp_vfs_fat.h"
|
||||
#include "sdmmc_cmd.h"
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
#include "display_i.h"
|
||||
#include "touch_i.h"
|
||||
#include "Ui/LvglSync.h"
|
||||
#include "ui/LvglSync.h"
|
||||
|
||||
bool ws3t_init_lvgl() {
|
||||
tt::lvgl::sync_set(&ws3t_display_lock, &ws3t_display_unlock);
|
||||
tt::lvgl::syncSet(&ws3t_display_lock, &ws3t_display_unlock);
|
||||
|
||||
lv_display_t* display = ws3t_display_create();
|
||||
if (display == nullptr) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Hal/Configuration.h"
|
||||
#include "hal/Configuration.h"
|
||||
|
||||
// Waveshare S3 Touch LCD 4.3
|
||||
extern const tt::hal::Configuration waveshare_s3_touch;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "esp_lvgl_port.h"
|
||||
#include "Log.h"
|
||||
#include "Ui/LvglSync.h"
|
||||
#include "ui/LvglSync.h"
|
||||
#include "Thread.h"
|
||||
|
||||
#define TAG "twodotfour_lvgl"
|
||||
@@ -50,7 +50,7 @@ bool twodotfour_lvgl_init() {
|
||||
}
|
||||
|
||||
// Set syncing functions
|
||||
tt::lvgl::sync_set(&lvgl_port_lock, &lvgl_port_unlock);
|
||||
tt::lvgl::syncSet(&lvgl_port_lock, &lvgl_port_unlock);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Hal/Sdcard.h"
|
||||
#include "hal/sdcard/Sdcard.h"
|
||||
#include "Check.h"
|
||||
#include "Log.h"
|
||||
#include "config.h"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Hal/Configuration.h"
|
||||
#include "hal/Configuration.h"
|
||||
|
||||
// Capacitive touch version of the 2.4" yellow board
|
||||
extern const tt::hal::Configuration yellow_board_24inch_cap;
|
||||
|
||||
Reference in New Issue
Block a user