Tab5 camera + other stuff (#558)

* Tab5 camera + other stuff

Tab5 camera driver - SC2356
Custom SliderBox widget - slider with plus and minus buttons + value label and snapping
Rtc Time service + rtc api
Sdk release - only include drivers built for that specific target, eg: sc2356 driver is mipi / p4 only.
No more hardcoded manual sdk cmakelists
New function to find device by compatible string match. no more static cast bool wildness when trying to match a single device (like M5Stack PaperS3 for example)

* feedback + fixes

Fixed external app user data path.
fix(gui): block app teardown until onHide() completes, preventing ELF unload racing a still-running app
added camera device type and api

* drain the snake sssem

---------

Co-authored-by: Ken Van Hoeylandt <git@kenvanhoeylandt.net>
This commit is contained in:
Shadowtrance
2026-07-10 16:45:03 +10:00
committed by GitHub
parent 16a61a087c
commit 7a7f09be35
47 changed files with 1894 additions and 83 deletions
@@ -7,6 +7,8 @@
#include <Tactility/hal/Configuration.h>
#include <esp_clock_output.h>
using namespace tt::hal;
static constexpr auto* TAG = "Tab5";
@@ -249,6 +251,29 @@ static error_t initMicrophone(::Device* i2c_controller) {
return error;
}
static esp_clock_output_mapping_handle_t camera_osc_handle = nullptr;
static void initCameraOsc() {
if (camera_osc_handle != nullptr) {
return;
}
// 24 MHz clock on GPIO 36 for the SC2356 MIPI CSI sensor, required before esp_video_init.
// Uses SPLL (480 MHz) via esp_clock_output with divider 20 = 24 MHz exactly.
// This avoids any LEDC clock source conflict with the display backlight.
if (esp_clock_output_start(CLKOUT_SIG_SPLL, GPIO_NUM_36, &camera_osc_handle) != ESP_OK) {
LOG_E(TAG, "Camera OSC clock output start failed");
return;
}
if (esp_clock_output_set_divider(camera_osc_handle, 20) != ESP_OK) {
LOG_E(TAG, "Camera OSC clock divider set failed");
esp_clock_output_stop(camera_osc_handle);
camera_osc_handle = nullptr;
return;
}
LOG_I(TAG, "Camera OSC 24MHz started on GPIO 36 (SPLL/20)");
}
static bool initBoot() {
auto* i2c0 = device_find_by_name("i2c0");
check(i2c0, "i2c0 not found");
@@ -258,6 +283,7 @@ static bool initBoot() {
auto* io_expander1 = device_find_by_name("io_expander1");
check(io_expander1, "io_expander1 not found");
initCameraOsc();
initExpander0(io_expander0);
initExpander1(io_expander1);