mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-04-18 09:25:06 +00:00
* **New Features** * BMI270 6-axis IMU driver added; new unified filesystem abstraction for mounted filesystems. * Public Wi‑Fi API surface (no implementation yet) * SDMMC driver added (kernel drive$) * expanded GPIO interrupt/callback support * **Improvements** * M5Stack Tab5: revamped GPIO/power initialization and IMU integration. * LVGL updates including device fontSize configuration. * Updated all code related to SD card device/fs handling * Rename LilyGO T-HMI S3 to LilyGO T-HMI * **Bug Fixes** * Simplified and consolidated SD card handling and mount discovery.
47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
#include "devices/Power.h"
|
|
#include "devices/Display.h"
|
|
|
|
#include "PwmBacklight.h"
|
|
#include "Tactility/kernel/SystemEvents.h"
|
|
#include <Tactility/TactilityCore.h>
|
|
|
|
#define TAG "thmi"
|
|
|
|
static bool powerOn() {
|
|
gpio_config_t power_signal_config = {
|
|
.pin_bit_mask = (1ULL << THMI_POWERON_GPIO) | (1ULL << THMI_POWEREN_GPIO),
|
|
.mode = GPIO_MODE_OUTPUT,
|
|
.pull_up_en = GPIO_PULLUP_DISABLE,
|
|
.pull_down_en = GPIO_PULLDOWN_DISABLE,
|
|
.intr_type = GPIO_INTR_DISABLE,
|
|
};
|
|
|
|
if (gpio_config(&power_signal_config) != ESP_OK) {
|
|
return false;
|
|
}
|
|
|
|
if (gpio_set_level(THMI_POWERON_GPIO, 1) != ESP_OK) {
|
|
return false;
|
|
}
|
|
|
|
if (gpio_set_level(THMI_POWEREN_GPIO, 1) != ESP_OK) {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
bool initBoot() {
|
|
ESP_LOGI(TAG, "Powering on the board...");
|
|
if (!powerOn()) {
|
|
ESP_LOGE(TAG, "Failed to power on the board.");
|
|
return false;
|
|
}
|
|
|
|
if (!driver::pwmbacklight::init(DISPLAY_BL, 30000)) {
|
|
ESP_LOGE(TAG, "Failed to initialize backlight.");
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
} |