Compare commits

...

37 Commits

Author SHA1 Message Date
Adolfo Reyna 2dc216fb7b fix: MCP settings persistence + WebServer/DevServer coexistence + screensaver charging toggle
- McpSettings was hardcoded to /data/service/mcp/settings.properties,
  but ES3C28P uses storage.userDataLocation=SD so user data lives on
  /sdcard/tactility/. Settings appeared to save but on reload returned
  default false -> "enable and when I go back shows disabled".
  Fixed to use getUserDataPath()+"/settings/mcp.properties" pattern
  consistent with DisplaySettings/WebServerSettings, with
  findOrCreateParentDirectory() and isFile() guard.

- HttpServer ctrl_port collision: ESP-IDF default 32768 used by both
  WebServer (80) and DevelopmentService (6666). Second httpd_start()
  failed silently -> dashboard up but /api/mcp 404 and :6666 refused.
  Fixed with unique ctrl_port = 32768 + (port % 1000).
  Added CONFIG_HTTPD_MAX_URI_HANDLERS=20 (default 8 < 9 needed for
  7 handlers + 2 internal).

- DevService stack 5120 -> 8192 for /app/install handling.
- McpSystem video stream task stack 4096 -> 8192 and idle yield 50ms
  (was 5ms always) to avoid CPU starvation blocking httpd tasks.
  On RLCD, timer must always run: DisplayIdle early return on
  !supportsBacklightDuty() broke MCP manual activation (cachedSettings
  not loaded, backlight duty 0). Fixed to always load settings +
  start timer, log RLCD detection, guard setBacklightDuty with
  supportsBacklightDuty() and fallback duty 255.

- DisplaySettings: add disableScreensaverWhenCharging bool, persisted,
  with UI toggle in Display app (Settings->Display) using
  PowerDevice::IsCharging check via findDevices callback.
  When charging and flag enabled, screensaver activation skipped,
  and if already dimmed, wake on charging.

- ES3C28P Power driver: GPIO9 ADC1_CH8 2x divider 2500-4200mV spec from
  ~/Downloads official docs, TP4054 CHRG not connected to GPIO, so
  IsCharging inferred via voltage thresholds (<500mV no battery USB
  or >5000mV wall powered, >=4150mV high) + rising trend.

Verified: flashed es3c28p to /dev/cu.usbmodem101 (192.168.68.113),
WiFi FamReynaMesh RSSI -59, dashboard 200, :6666/info now works,
/api/mcp returns disabled correctly until enabled, persists to SD.
2026-07-11 20:26:01 -04:00
Adolfo Reyna 81f289fc24 feat: declare i2s0 audio node in Waveshare RLCD devicetree 2026-07-10 19:11:44 -04:00
Adolfo Reyna d3919344b3 fix: explicitly add launcher buttons and power button to default group, declare stopScreensaverLocked, and disable idle screensaver timer on monochrome/RLCD screens 2026-07-10 18:54:37 -04:00
Adolfo Reyna 4ea29c0fe9 fix: remove click-focusable flag from container widgets and add high-contrast outline focus style to launcher buttons for monochrome display navigation 2026-07-10 18:46:07 -04:00
Adolfo Reyna e72d3998f9 fix: dynamically check and display active station (WIFI_STA_DEF) IP on MCP Settings view 2026-07-10 18:27:26 -04:00
Adolfo Reyna e423b28930 chore: default Waveshare RLCD board profile to boot straight to Launcher instead of ApWebServer 2026-07-10 18:25:36 -04:00
Adolfo Reyna 9ffd2051fe fix: resolve SD card mount error by routing schematic pins CLK=38, CMD=21, D0=39, D3=17 and disabling internal pull-up on CLK 2026-07-10 12:21:43 -04:00
Adolfo Reyna bd8fea0436 Fix display mirroring and update SDMMC card pins 2026-07-09 23:18:10 -04:00
Adolfo Reyna 301fed7f2e Fix active-low reset pin state in panel_st7305_reset 2026-07-09 23:14:19 -04:00
Adolfo Reyna da28b93f24 Update ST7305 display driver initialization to match rlcd.py settings 2026-07-09 23:09:13 -04:00
Adolfo Reyna b5f0575c5c Update SDMMC pins in Waveshare RLCD devicetree to match schematic 2026-07-09 23:02:06 -04:00
Adolfo Reyna c4ec7ead55 perf: Enable 512KB LVGL image cache on PSRAM and move modified lvgl to local components 2026-07-09 22:27:55 -04:00
Adolfo Reyna df93252281 feat: add support for waveshare esp32-s3-rlcd board 2026-07-09 21:44:49 -04:00
Adolfo Reyna e4b95396dd feat: Add JPEG decoder configuration and fix LCD color inversion 2026-07-08 23:20:06 -04:00
Adolfo Reyna 4003065074 fix(es3c28p): convert device.properties to dot-notation format to support Bluetooth in upstream build 2026-07-08 17:09:45 -04:00
Adolfo Reyna 300ddb3a7f feat: integrate MCP and ES3C28P audio support with upstream compatibility updates 2026-07-04 15:41:37 -04:00
Adolfo Reyna b8bf59fedf Merge remote-tracking branch 'origin/main' into main 2026-07-04 15:39:52 -04:00
Ken Van Hoeylandt ecad2248d9 Various improvements (#547)
- Fixed crash when returning to Setup app (from any of the steps)
- Fixed crash when returning to TimeDateSettings app (after locale selection)
- Fixed GuiService inconsistent behaviour: now always perform operations async (e.g. to show/hide apps). This fixes crashes in some onHide() calls where onHide() might be called before onShow() was called.
- Fix for incorrect WebServService path
- Remove CYD-4848S040C SD card functionality, but added a GPIO fix for releasing 3-wire SPI pin sharing.
- Fix for saving/loading settings for various apps
2026-07-04 21:26:43 +02:00
Ken Van Hoeylandt a323f8e148 Implement SD card for WaveShare S3 Touch LCD 4.3" (#546) 2026-07-04 09:28:31 +02:00
Ken Van Hoeylandt 05720821f8 Require SD card or >4MB flash (#545) 2026-07-03 23:56:03 +02:00
Ken Van Hoeylandt 90afba647e Update properties parsing for app manifest and device manifest files (#544) 2026-07-03 00:29:01 +02:00
Ken Van Hoeylandt 35fd7dd536 Post-release changes (#543)
- Update version to 0.8.0-dev
- Add new release scripts
- Update release docs
2026-07-02 20:52:26 +02:00
Ken Van Hoeylandt cd07c64926 Release 0.7.0 (#542) 2026-07-02 17:34:40 +02:00
Ken Van Hoeylandt 2f5e183f18 Setup app (#541)
- Implement Setup app for device's first boot
- Implement device simple name and vendor name variables
- Remove region setting (locale setting is already available)
2026-07-02 00:29:03 +02:00
Ken Van Hoeylandt d3439f6f45 Fixes & memory optimizations (#540)
- Disable BlueTooth driver by default, to ensure it doesn't allocate memory
- Update BlueTooth settings app behaviour to make sure it starts/stops the devices
- Disable SPI RAM usage for ST7789 as it broke App Hub
- Reduce T-Display and T-Deck display buffers from 1/3rd to 1/10th of resolution
- Enabled dynamic buffers for MbedTLS to optimize memory
- TLS 1.3 did not work with dynamic buffers: downgrade to 1.2 for now
- WiFi is now enabled from the Boot app callback to the WiFi service, instead of the WiFi service start() function. This avoids a lockup when WiFi is started by the service while the Boot app is updating the WiFi settings.
2026-07-01 21:11:46 +02:00
Adolfo Reyna 68a6ca0ce3 Associate .mp3 files with the Mp3Player application in Files browser 2026-06-28 22:23:01 -04:00
Adolfo Reyna 430f8889ac Merge remote-tracking branch 'origin/main' 2026-06-28 21:13:35 -04:00
Ken Van Hoeylandt 599fa46766 Driver improvements (#535)
- New drivers:
  - SD SPI
  - spi_peripheral
  - touch_placeholder
  - display_placeholder
- Devicetree compiler:
  - Implement phandle-arrays
  - Implement device addresses
- Add placeholder drivers to all devices with a SPI display
- SPI driver: add `cs-pins` and set them to high on driver start
- FileSystem: add `file_system_set_owner()` and `file_system_get_owner()`
- File locking is now checking if the related `FileSystem` is part of a shared SPI bus
- Add `device_get_child_count()`
- SDMMC driver: Remove default of `slot` value
- Fix for Crowpanel Basic 3.5" display (add delay to booting)
- Fix for LilyGO T-HMI SD card mounting (delayed mounting by disabling it initially in the dts)
2026-06-27 17:32:05 +02:00
Adolfo Reyna e0a92ea50e feat: migrate all large MCP server allocations and MP3 buffers to PSRAM (SPIRAM) 2026-06-27 10:04:30 -04:00
Adolfo Reyna 0ae9b43f87 fix: increase HTTP server stack size to 16KB to prevent MP3 decode stack overflow and reset I2S controller on stop to eliminate static noise 2026-06-27 10:00:36 -04:00
Adolfo Reyna 598af546fd fix: ensure backlight turns back on during startMcpScreensaver and invalidate canvas on drawText 2026-06-27 09:41:40 -04:00
Adolfo Reyna cd921e1aa9 feat: implement MCP drawing as screensaver instead of standalone app
- Add ScreensaverType::McpScreen to DisplaySettings enum, toString/fromString
- Add 'MCP Screen' option to the Display settings screensaver dropdown
- New McpScreensaver (Screensaver subclass): creates full-screen lv_canvas on
  the overlay, allocates framebuffer in SPIRAM, registers canvas pointer in
  McpSystemState, shows 'Waiting for LLM...' until first draw command arrives
- Wire McpScreensaver into DisplayIdle::activateScreensaver() switch
- McpSystem::ensureOverrideScreen() now calls displayidle::findService()->
  startScreensaver() instead of launching McpOverrideApp — canvas appears
  automatically on any LLM draw command
- Remove McpOverrideApp (replaced by screensaver), deregister from Tactility.cpp
- Remove mcpOverrideEnabled from McpSettings — no longer needed
- Simplify McpSettingsApp: remove Screen Override toggle, update info text to
  direct users to Settings -> Display -> Screensaver -> MCP Screen
2026-06-27 09:17:50 -04:00
Adolfo Reyna 41004a3c6f feat: integrate MCP server and screen override into system firmware
- Add McpSettings (load/save mcpEnabled, mcpOverrideEnabled to /data/service/mcp/settings.properties)
- Add McpSystem: global state, canvas drawing (RGB565, BMP, PBM, text), I2S audio (WAV, MP3 via minimp3, tone, record)
- Add McpHandler: unauthenticated POST /api/mcp (JSON-RPC 2.0, 13 tools) and POST /api/screen/raw endpoints
- Route MCP endpoints before Basic Auth check in WebServerService::handleApiPost
- Start HTTP server at boot if either webServerEnabled OR mcpEnabled is set
- Fix setEnabled: start unconditionally when called with true; only stop if both WS and MCP are disabled
- Add McpSettingsApp (Settings category): toggle MCP service + screen override, show live endpoint URL
- Add McpOverrideApp (appId one.tactility.mcpscreen): full-screen LVGL canvas for LLM-driven display override
- Register both new apps in Tactility.cpp
2026-06-26 23:02:09 -04:00
Adolfo Reyna 28ff01561a Fix mouse coordinates, sequence BLE discovery/encryption, and prevent mouse from disabling on-screen keyboard 2026-06-26 21:47:08 -04:00
Adolfo Reyna 68bf8f5a01 Revert "Fix BLE connection collision and filter unnamed devices"
This reverts commit bf7e40f0f1.
2026-06-26 13:40:20 -04:00
Adolfo Reyna bf7e40f0f1 Fix BLE connection collision and filter unnamed devices 2026-06-23 19:29:41 -04:00
Adolfo Reyna 71cc05e276 feat(es3c28p): fix audio speed-up, boost mic gain, and correct I2S pinout 2026-06-23 18:32:33 -04:00
4635 changed files with 937987 additions and 4424 deletions
+4
View File
@@ -11,6 +11,8 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Build"
uses: ./.github/actions/build-simulator
with:
@@ -21,6 +23,8 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Build"
uses: ./.github/actions/build-simulator
with:
+4 -1
View File
@@ -23,6 +23,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Build SDK"
uses: ./.github/actions/build-sdk
with:
@@ -66,7 +68,6 @@ jobs:
{ id: m5stack-cores3, arch: esp32s3 },
{ id: m5stack-papers3, arch: esp32s3 },
{ id: m5stack-stackchan, arch: esp32s3 },
{ id: m5stack-stickc-plus, arch: esp32 },
{ id: m5stack-stickc-plus2, arch: esp32 },
{ id: m5stack-sticks3, arch: esp32s3 },
{ id: m5stack-tab5, arch: esp32p4 },
@@ -82,6 +83,8 @@ jobs:
needs: [ BuildSdk ]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Build Firmware"
uses: ./.github/actions/build-firmware
with:
+2 -1
View File
@@ -31,8 +31,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive
- name: "Install Python Dependencies"
shell: bash
+21 -26
View File
@@ -2,11 +2,9 @@ import subprocess
from datetime import datetime, UTC
import os
import sys
import configparser
from dataclasses import dataclass, asdict
import json
import shutil
from configparser import RawConfigParser
VERBOSE = False
DEVICES_FOLDER = "Devices"
@@ -68,32 +66,29 @@ def exit_with_error(message):
sys.exit(1)
def read_properties_file(path):
config = configparser.RawConfigParser()
# Don't convert keys to lowercase
config.optionxform = str
config.read(path)
return config
properties = {}
with open(path, "r") as file:
for line in file:
stripped = line.strip()
if not stripped or stripped.startswith("#"):
continue
key, sep, value = line.partition("=")
if not sep:
continue
properties[key.strip()] = value.strip()
return properties
def get_property_or_none(properties: RawConfigParser, group: str, key: str):
if group not in properties.sections():
return None
if key not in properties[group].keys():
return None
return properties[group][key]
def get_property_or_none(properties: dict, group: str, key: str):
return properties.get(f"{group}.{key}")
def get_boolean_property_or_false(properties: RawConfigParser, group: str, key: str):
if group not in properties.sections():
return False
if key not in properties[group].keys():
return False
return properties[group][key] == "true"
def get_boolean_property_or_false(properties: dict, group: str, key: str):
return properties.get(f"{group}.{key}") == "true"
def get_property_or_exit(properties: RawConfigParser, group: str, key: str):
if group not in properties.sections():
exit_with_error(f"Device properties does not contain group: {group}")
if key not in properties[group].keys():
exit_with_error(f"Device properties does not contain key: {key}")
return properties[group][key]
def get_property_or_exit(properties: dict, group: str, key: str):
full_key = f"{group}.{key}"
if full_key not in properties:
exit_with_error(f"Device properties does not contain key: {full_key}")
return properties[full_key]
def read_device_properties(device_id):
mapping_file_path = os.path.join(DEVICES_FOLDER, device_id, "device.properties")
@@ -129,7 +124,7 @@ def to_manifest_chip_name(name):
return ""
def process_device(in_path: str, out_path: str, device_directory: str, device_id: str, device_properties: RawConfigParser, version: str):
def process_device(in_path: str, out_path: str, device_directory: str, device_id: str, device_properties: dict, version: str):
in_device_path = os.path.join(in_path, device_directory)
in_device_binaries_path = os.path.join(in_device_path, "Binaries")
if not os.path.isdir(in_device_binaries_path):
@@ -45,6 +45,7 @@ def parse_binding(file_path: str, binding_dirs: list[str]) -> Binding:
required=details.get('required', False),
description=details.get('description', '').strip(),
default=details.get('default', None),
element_type=details.get('element-type', None),
)
properties_dict[name] = prop
filename = os.path.basename(file_path)
@@ -80,7 +80,7 @@ def property_to_string(property: DeviceProperty, devices: list[Device]) -> str:
return "{ " + ",".join(value_list) + " }"
elif type == "phandle":
return find_phandle(devices, property.value)
elif type == "phandle-array":
elif type == "phandles":
value_list = list()
if isinstance(property.value, list):
for item in property.value:
@@ -93,10 +93,26 @@ def property_to_string(property: DeviceProperty, devices: list[Device]) -> str:
# If it's a string, assume it's a #define and show it as-is
return property.value
else:
raise Exception(f"Unsupported phandle-array type for {property.value}")
raise Exception(f"Unsupported phandles type for {property.name} with value {property.value} ")
else:
raise DevicetreeException(f"property_to_string() has an unsupported type: {type}")
def resolve_phandle_array_entries(device_property, devices):
"""Convert a phandle-array DTS property into a list of C initializer strings."""
entries = []
if device_property.type == "phandle-array":
items = device_property.value
elif device_property.type == "values":
items = [PropertyValue(type="values", value=device_property.value)]
else:
return []
for item in items:
if isinstance(item, PropertyValue):
entries.append(property_to_string(DeviceProperty(name="", type=item.type, value=item.value), devices))
else:
entries.append(str(item))
return entries
def resolve_parameters_from_bindings(device: Device, bindings: list[Binding], devices: list[Device]) -> list:
compatible_property = find_device_property(device, "compatible")
if compatible_property is None:
@@ -119,11 +135,32 @@ def resolve_parameters_from_bindings(device: Device, bindings: list[Binding], de
if device_property.name not in binding_property_names:
raise DevicetreeException(f"Device '{device.node_name}' has invalid property '{device_property.name}'")
# Allocate total expected configuration arguments
result = [0] * len(binding_properties)
for index, binding_property in enumerate(binding_properties):
node_name = get_device_node_name_safe(device)
result = []
phandle_arrays = []
for binding_property in binding_properties:
device_property = find_device_property(device, binding_property.name)
# No property specified in DTS, use binding defaults
if binding_property.type == "phandle-array":
if binding_property.element_type is None:
raise DevicetreeException(f"phandle-array property '{binding_property.name}' requires 'element-type' in binding")
prop_safe = binding_property.name.replace("-", "_")
array_var = f"{node_name}_{prop_safe}"
if device_property is not None:
entries = resolve_phandle_array_entries(device_property, devices)
phandle_arrays.append((array_var, binding_property.element_type, entries))
result.append(f"({binding_property.element_type}*){array_var}")
result.append(str(len(entries)))
elif binding_property.default is not None:
result.append("NULL")
result.append("0")
elif binding_property.required:
raise DevicetreeException(f"device {device.node_name} doesn't have property '{binding_property.name}'")
else:
result.append("NULL")
result.append("0")
continue
if device_property is None:
if binding_property.default is not None:
temp_prop = DeviceProperty(
@@ -131,30 +168,38 @@ def resolve_parameters_from_bindings(device: Device, bindings: list[Binding], de
type=binding_property.type,
value=binding_property.default
)
result[index] = property_to_string(temp_prop, devices)
result.append(property_to_string(temp_prop, devices))
elif binding_property.required:
raise DevicetreeException(f"device {device.node_name} doesn't have property '{binding_property.name}'")
elif binding_property.type == "bool" or binding_property.type == "boolean":
if binding_property.default == "true" or binding_property.default == None:
result[index] = "true"
else: # Explicit or implied false
result[index] = "false"
result.append("true")
else:
result.append("false")
else:
raise DevicetreeException(f"Device {device.node_name} doesn't have property '{binding_property.name}' and no default value is set")
else:
result[index] = property_to_string(device_property, devices)
return result
result.append(property_to_string(device_property, devices))
return result, phandle_arrays
def write_config(file, device: Device, bindings: list[Binding], devices: list[Device], type_name: str):
node_name = get_device_node_name_safe(device)
config_type = f"{type_name}_config_dt"
config_variable_name = f"{node_name}_config"
config_params, phandle_arrays = resolve_parameters_from_bindings(device, bindings, devices)
# Write phandle-array variables before the config struct
for array_var, element_type, entries in phandle_arrays:
entries_str = ", ".join(entries)
file.write(f"static {element_type} {array_var}[] = {{ {entries_str} }};\n")
file.write(f"static const {config_type} {config_variable_name}" " = {\n")
config_params = resolve_parameters_from_bindings(device, bindings, devices)
# Indent all params
for index, config_param in enumerate(config_params):
config_params[index] = f"\t{config_param}"
# Join with command and newline
# Join with comma and newline
if len(config_params) > 0:
config_params_joined = ",\n".join(config_params)
file.write(f"{config_params_joined}\n")
@@ -178,7 +223,9 @@ def write_device_structs(file, device: Device, parent_device: Device, bindings:
# Write config struct
write_config(file, device, bindings, devices, type_name)
# Write device struct
address_value = device.node_address if device.node_address is not None else "0"
file.write(f"static struct Device {node_name}" " = {\n")
file.write(f"\t.address = {address_value},\n")
file.write(f"\t.name = \"{device.node_name}\",\n") # Use original name
file.write(f"\t.config = &{config_variable_name},\n")
file.write(f"\t.parent = {parent_value},\n")
@@ -37,13 +37,17 @@ value: VALUE
values: VALUE+
array: NUMBER+
property_value: quoted_text_array | QUOTED_TEXT | "<" value ">" | "<" values ">" | "[" array "]" | PHANDLE
phandle_array_entry: "<" values ">"
phandle_array: phandle_array_entry ("," phandle_array_entry)+
property_value: quoted_text_array | QUOTED_TEXT | phandle_array | "<" value ">" | "<" values ">" | "[" array "]" | PHANDLE
device_property: PROPERTY_NAME ["=" property_value] ";"
NODE_ALIAS: /[a-zA-Z0-9_\-\/@]+/
NODE_NAME: /[a-zA-Z0-9_\-\/@]+/
NODE_ALIAS: /[a-zA-Z0-9_\-\/]+/
NODE_NAME: /[a-zA-Z0-9_\-\/]+/
NODE_ADDRESS: /[0-9a-zA-Z_]+/
device: (NODE_ALIAS ":")? NODE_NAME "{" (device | device_property)* "};"
device: (NODE_ALIAS ":")? NODE_NAME ("@" NODE_ADDRESS)? "{" (device | device_property)* "};"
dts_version: /[0-9a-zA-Z\-]+/
@@ -8,6 +8,7 @@ class DtsVersion:
class Device:
node_name: str
node_alias: str
node_address: str
status: str
properties: list
devices: list
@@ -38,6 +39,7 @@ class BindingProperty:
required: bool
description: str
default: object = None
element_type: str = None
@dataclass
class Binding:
@@ -29,6 +29,7 @@ class DtsTransformer(Transformer):
def device(self, tokens: list):
node_name = None
node_alias = None
node_address = None
status = None
properties = list()
child_devices = list()
@@ -37,6 +38,8 @@ class DtsTransformer(Transformer):
node_name = item.value
elif type(item) is Token and item.type == 'NODE_ALIAS':
node_alias = item.value
elif type(item) is Token and item.type == 'NODE_ADDRESS':
node_address = item.value
elif type(item) is DeviceProperty:
if item.name == "status":
status = item.value
@@ -44,7 +47,7 @@ class DtsTransformer(Transformer):
properties.append(item)
elif type(item) is Device:
child_devices.append(item)
return Device(node_name, node_alias, status, properties, child_devices)
return Device(node_name, node_alias, node_address, status, properties, child_devices)
def device_property(self, objects: List[object]):
name = objects[0]
# Boolean property has no value as the value is implied to be true
@@ -67,6 +70,10 @@ class DtsTransformer(Transformer):
if isinstance(object[0], PropertyValue):
return object[0]
return PropertyValue(type="value", value=object[0])
def phandle_array_entry(self, tokens: list):
return tokens[0]
def phandle_array(self, tokens: list):
return PropertyValue(type="phandle-array", value=tokens)
def array(self, object):
return PropertyValue(type="array", value=object)
def VALUE(self, token: Token):
@@ -10,21 +10,23 @@ static const root_config_dt root_config = {
};
static struct Device root = {
.address = 0,
.name = "/",
.config = &root_config,
.parent = NULL,
.internal = NULL
};
static const generic_device_config_dt test_device@0_config = {
static const generic_device_config_dt test_device_config = {
0,
42,
"hello"
};
static struct Device test_device@0 = {
.name = "test-device@0",
.config = &test_device@0_config,
static struct Device test_device = {
.address = 0,
.name = "test-device",
.config = &test_device_config,
.parent = &root,
.internal = NULL
};
@@ -38,6 +40,7 @@ static const bool_device_config_dt bool_test_device_config = {
};
static struct Device bool_test_device = {
.address = 0,
.name = "bool-test-device",
.config = &bool_test_device_config,
.parent = &root,
@@ -46,7 +49,7 @@ static struct Device bool_test_device = {
struct DtsDevice dts_devices[] = {
{ &root, "test,root", DTS_DEVICE_STATUS_OKAY },
{ &test_device@0, "test,generic-device", DTS_DEVICE_STATUS_OKAY },
{ &test_device, "test,generic-device", DTS_DEVICE_STATUS_OKAY },
{ &bool_test_device, "test,bool-device", DTS_DEVICE_STATUS_OKAY },
DTS_DEVICE_TERMINATOR
};
+135
View File
@@ -0,0 +1,135 @@
#!/usr/bin/env python3
"""Download all artifacts from a GitHub Actions workflow run."""
import argparse
import os
import subprocess
import sys
import zipfile
from pathlib import Path
import requests
API_URL = "https://api.github.com"
def get_token(cli_token: str | None) -> str:
if cli_token:
return cli_token
env_token = os.environ.get("GITHUB_TOKEN") or os.environ.get("GH_TOKEN")
if env_token:
return env_token
try:
result = subprocess.run(
["gh", "auth", "token"], capture_output=True, text=True, check=True
)
return result.stdout.strip()
except (FileNotFoundError, subprocess.CalledProcessError):
sys.exit(
"No token found. Pass --token, set GITHUB_TOKEN/GH_TOKEN, or run `gh auth login`."
)
def get_repo(cli_repo: str | None) -> str:
if cli_repo:
return cli_repo
try:
result = subprocess.run(
["git", "remote", "get-url", "origin"],
capture_output=True,
text=True,
check=True,
)
url = result.stdout.strip()
except (FileNotFoundError, subprocess.CalledProcessError):
sys.exit("Could not detect repo from git remote. Pass --repo owner/name.")
# Handle both SSH and HTTPS remote URLs.
if url.startswith("git@"):
path = url.split(":", 1)[1]
else:
path = url.split("github.com/", 1)[-1]
return path.removesuffix(".git")
def download_artifacts(repo: str, run_id: str, token: str, out_dir: Path):
headers = {
"Authorization": f"Bearer {token}",
"Accept": "application/vnd.github+json",
"X-GitHub-Api-Version": "2022-11-28",
}
out_dir.mkdir(parents=True, exist_ok=True)
url = f"{API_URL}/repos/{repo}/actions/runs/{run_id}/artifacts"
artifacts = []
while url:
resp = requests.get(url, headers=headers, params={"per_page": 100})
resp.raise_for_status()
data = resp.json()
artifacts.extend(data["artifacts"])
url = resp.links.get("next", {}).get("url")
if not artifacts:
print(f"No artifacts found for run {run_id}.")
return
for artifact in artifacts:
name = artifact["name"]
if name == "all-artifacts":
print(f"Skipping {name}")
continue
if artifact.get("expired"):
print(f"Skipping expired artifact: {name}")
continue
print(f"Downloading {name} ({artifact['size_in_bytes']} bytes)...")
download_url = artifact["archive_download_url"]
resp = requests.get(download_url, headers=headers, stream=True)
resp.raise_for_status()
zip_path = out_dir / f"{name}.zip"
with open(zip_path, "wb") as f:
for chunk in resp.iter_content(chunk_size=8192):
f.write(chunk)
if name.endswith(".bin"):
with zipfile.ZipFile(zip_path) as zf:
zf.extractall(out_dir)
zip_path.unlink()
print(f" Extracted to {out_dir}")
else:
print(f" Saved to {zip_path}")
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("run_id", help="GitHub Actions run ID")
parser.add_argument(
"--repo",
help="owner/repo (default: detected from git remote 'origin')",
)
parser.add_argument(
"--token",
help="GitHub token (default: $GITHUB_TOKEN, $GH_TOKEN, or `gh auth token`)",
)
parser.add_argument(
"--out",
default="artifacts",
help="Output directory (default: ./artifacts)",
)
args = parser.parse_args()
repo = get_repo(args.repo)
token = get_token(args.token)
out_dir = Path(args.out)
print(f"Repo: {repo}")
print(f"Run ID: {args.run_id}")
print(f"Output: {out_dir.resolve()}")
download_artifacts(repo, args.run_id, token, out_dir)
if __name__ == "__main__":
main()
+126
View File
@@ -0,0 +1,126 @@
#!/usr/bin/env python3
"""Summarize commits between the last 2 pushed git tags into commits.md and pull-requests.md."""
import argparse
import re
import subprocess
import sys
from pathlib import Path
PR_REF_RE = re.compile(r"#(\d+)")
def get_repo(cli_repo: str | None) -> str:
if cli_repo:
return cli_repo
try:
result = subprocess.run(
["git", "remote", "get-url", "origin"],
capture_output=True,
text=True,
check=True,
)
url = result.stdout.strip()
except (FileNotFoundError, subprocess.CalledProcessError):
sys.exit("Could not detect repo from git remote. Pass --repo owner/name.")
if url.startswith("git@"):
path = url.split(":", 1)[1]
else:
path = url.split("github.com/", 1)[-1]
return path.removesuffix(".git")
def get_last_two_tags() -> tuple[str, str]:
result = subprocess.run(
["git", "tag", "--sort=-creatordate"],
capture_output=True,
text=True,
check=True,
)
tags = [t for t in result.stdout.splitlines() if t]
if len(tags) < 2:
sys.exit(f"Need at least 2 tags, found {len(tags)}.")
return tags[1], tags[0] # previous, latest
def get_commits(prev_tag: str, latest_tag: str) -> list[tuple[str, str]]:
result = subprocess.run(
[
"git",
"log",
"--pretty=format:%H\x1f%s",
f"{prev_tag}..{latest_tag}",
],
capture_output=True,
text=True,
check=True,
)
commits = []
for line in result.stdout.splitlines():
if not line:
continue
sha, subject = line.split("\x1f", 1)
commits.append((sha, subject))
return commits
def write_commits_md(path: Path, repo: str, prev_tag: str, latest_tag: str, commits: list[tuple[str, str]]):
lines = [f"# Commits: {prev_tag}..{latest_tag}", ""]
for sha, subject in commits:
link = f"https://github.com/{repo}/commit/{sha}"
lines.append(f"- [{subject}]({link})")
path.write_text("\n".join(lines) + "\n")
def write_pull_requests_md(path: Path, repo: str, commits: list[tuple[str, str]]):
pr_numbers = []
seen = set()
for _, subject in commits:
for match in PR_REF_RE.finditer(subject):
number = match.group(1)
if number not in seen:
seen.add(number)
pr_numbers.append(number)
lines = ["# Pull Requests", ""]
for number in pr_numbers:
lines.append(f"- https://github.com/{repo}/pull/{number}")
path.write_text("\n".join(lines) + "\n")
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
"--repo",
help="owner/repo (default: detected from git remote 'origin')",
)
parser.add_argument(
"--out",
default=".",
help="Output directory for commits.md and pull-requests.md (default: current directory)",
)
args = parser.parse_args()
repo = get_repo(args.repo)
prev_tag, latest_tag = get_last_two_tags()
commits = get_commits(prev_tag, latest_tag)
out_dir = Path(args.out)
out_dir.mkdir(parents=True, exist_ok=True)
commits_path = out_dir / "release-commits.md"
prs_path = out_dir / "release-pull-requests.md"
write_commits_md(commits_path, repo, prev_tag, latest_tag, commits)
write_pull_requests_md(prs_path, repo, commits)
print(f"Repo: {repo}")
print(f"Tags: {prev_tag}..{latest_tag}")
print(f"Commits: {len(commits)}")
print(f"Wrote {commits_path}")
print(f"Wrote {prs_path}")
if __name__ == "__main__":
main()
+2 -5
View File
@@ -28,7 +28,6 @@ function(READ_PROPERTIES_TO_MAP PROPERTY_FILE RESULT_VAR)
endif ()
file(STRINGS ${PROPERTY_FILE_ABS} lines)
set(current_section "")
set(map_content "")
foreach(line IN LISTS lines)
@@ -37,9 +36,7 @@ function(READ_PROPERTIES_TO_MAP PROPERTY_FILE RESULT_VAR)
continue()
endif ()
if (line MATCHES "^\\[.*\\]$")
set(current_section "${line}")
elseif (line MATCHES "^([^=]+)=(.*)$")
if (line MATCHES "^([^=]+)=(.*)$")
set(key "${CMAKE_MATCH_1}")
set(value "${CMAKE_MATCH_2}")
string(STRIP "${key}" key)
@@ -49,7 +46,7 @@ function(READ_PROPERTIES_TO_MAP PROPERTY_FILE RESULT_VAR)
set(value "${CMAKE_MATCH_1}")
endif ()
list(APPEND map_content "${current_section}${key}" "${value}")
list(APPEND map_content "${key}" "${value}")
endif ()
endforeach()
+84
View File
@@ -0,0 +1,84 @@
#!/usr/bin/env python3
"""Generate a release summary markdown by combining gh-release-summary.py output with Claude."""
import argparse
import subprocess
import sys
from pathlib import Path
SCRIPT_DIR = Path(__file__).resolve().parent
SECTIONS = [
"New Devices",
"New Features",
"New Apps",
"Improvements & Fixes",
"Other Changes",
"TactilitySDK",
"Known Issues",
]
def run_gh_release_summary(out_dir: Path, repo: str | None):
cmd = [sys.executable, str(SCRIPT_DIR / "gh-release-summary.py"), "--out", str(out_dir)]
if repo:
cmd += ["--repo", repo]
subprocess.run(cmd, check=True)
def build_prompt() -> str:
section_list = "\n".join(f"- {s}" for s in SECTIONS)
return (
"You are given a list of commits (with GitHub commit links) and a list of pull "
"request links from a software release. Write a release summary in Markdown, "
"organizing changes into these sections (omit a section if it has no relevant "
"changes):\n\n"
f"{section_list}\n\n"
"Use concise bullet points. Base every bullet strictly on the given commits and "
"pull requests, referencing the pull request link where applicable. Output only "
"the Markdown, no commentary before or after it."
"If a pull request or commit has multiple changes add them as separate entries."
"Ignore irrelevant changes: documentation, minor fixes, non-descript fixes, scripts, github workflows."
"For 'New Devices': only mention the device name, don't like pull request."
"For 'Improvements & Fixes': Avoid non-descript entries, write specifics."
"For 'TactilitySDK': Avoid generic changes, be specific. Mention API changes."
)
def run_claude(commits_md: str, prs_md: str) -> str:
prompt = build_prompt()
stdin_content = f"## Commits\n\n{commits_md}\n\n## Pull Requests\n\n{prs_md}"
result = subprocess.run(
["claude", "-p", prompt],
input=stdin_content,
capture_output=True,
text=True,
check=True,
)
return result.stdout
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--repo", help="owner/repo (default: detected from git remote 'origin')")
parser.add_argument("--out", default=".", help="Output directory (default: current directory)")
args = parser.parse_args()
out_dir = Path(args.out)
out_dir.mkdir(parents=True, exist_ok=True)
run_gh_release_summary(out_dir, args.repo)
commits_md = (out_dir / "release-commits.md").read_text()
prs_md = (out_dir / "release-pull-requests.md").read_text()
print("Generating release summary via claude...")
summary = run_claude(commits_md, prs_md)
summary_path = out_dir / "release-summary.md"
summary_path.write_text(summary)
print(f"Wrote {summary_path}")
if __name__ == "__main__":
main()
+18 -1
View File
@@ -2,6 +2,8 @@
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=3072
# Ensure large enough stack for network operations
CONFIG_ESP_MAIN_TASK_STACK_SIZE=6144
# HTTP server: need enough URI handler slots for WebServer (7 + internal) + DevServer
CONFIG_HTTPD_MAX_URI_HANDLERS=20
# Fixes static assertion: FLASH and PSRAM Mode configuration are not supported
CONFIG_IDF_EXPERIMENTAL_FEATURES=y
# Free up IRAM
@@ -9,7 +11,8 @@ CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH=y
CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y
# EmbedTLS
CONFIG_MBEDTLS_SSL_PROTO_TLS1_3=y
# Use TLS 1.2 because 1.3 conflicts with MbedTLS dynamic buffer
CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y
# LVGL
CONFIG_LV_USE_USER_DATA=y
CONFIG_LV_USE_FS_STDIO=y
@@ -40,3 +43,17 @@ CONFIG_WL_SECTOR_MODE_SAFE=y
CONFIG_WL_SECTOR_MODE=1
# Allow new i2c_master API (used by Tab5Keyboard for LP_I2C_NUM_0) to coexist with legacy i2c driver
CONFIG_I2C_SKIP_LEGACY_CONFLICT_CHECK=y
# Wi-Fi memory optimizations
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=3
CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=5
CONFIG_ESP_WIFI_STATIC_TX_BUFFER=y
CONFIG_ESP_WIFI_TX_BUFFER_TYPE=0
CONFIG_ESP_WIFI_STATIC_TX_BUFFER_NUM=5
CONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM=5
CONFIG_ESP_WIFI_STATIC_RX_MGMT_BUFFER=y
CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF=0
CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF=5
CONFIG_ESP_WIFI_AMPDU_TX_ENABLED=y
CONFIG_ESP_WIFI_TX_BA_WIN=5
CONFIG_ESP_WIFI_AMPDU_RX_ENABLED=y
CONFIG_ESP_WIFI_RX_BA_WIN=5
+6 -2
View File
@@ -74,8 +74,11 @@ else ()
message("Building for sim target")
add_compile_definitions(CONFIG_TT_DEVICE_ID="simulator")
add_compile_definitions(CONFIG_TT_DEVICE_NAME="Simulator")
add_compile_definitions(CONFIG_TT_DEVICE_VENDOR="")
add_compile_definitions(CONFIG_TT_DEVICE_NAME_SIMPLE="Simulator")
add_compile_definitions(CONFIG_TT_LAUNCHER_APP_ID="Launcher")
add_compile_definitions(CONFIG_TT_AUTO_START_APP_ID="")
add_compile_definitions(CONFIG_TT_USER_DATA_LOCATION_INTERNAL)
endif ()
project(Tactility)
@@ -103,8 +106,9 @@ if (NOT DEFINED ENV{ESP_IDF_VERSION})
target_compile_definitions(freertos_kernel PUBLIC "projCOVERAGE_TEST=0")
# EmbedTLS
set(ENABLE_TESTING OFF)
set(ENABLE_PROGRAMS OFF)
set(ENABLE_TESTING OFF CACHE BOOL "" FORCE)
set(ENABLE_PROGRAMS OFF CACHE BOOL "" FORCE)
set(MBEDTLS_FATAL_WARNINGS OFF CACHE BOOL "" FORCE)
add_subdirectory(Libraries/mbedtls)
# SDL
@@ -1 +0,0 @@
enableOnBoot=false
@@ -1 +0,0 @@
enableOnBoot=false
@@ -1 +0,0 @@
enableOnBoot=false
-5
View File
@@ -1,5 +0,0 @@
language=en-US
timeFormat24h=true
dateFormat=DD/MM/YYYY
region=EU
timezone=Europe/Amsterdam
@@ -485,7 +485,7 @@
<button class="btn btn-secondary btn-sm" onclick="goUp()" id="upBtn">Up</button>
</div>
<div class="toolbar-sep"></div>
<input type="text" id="pathInput" value="/data" onkeydown="if(event.key==='Enter')refreshFiles()">
<input type="text" id="pathInput" value="" onkeydown="if(event.key==='Enter')refreshFiles()">
<button class="btn btn-primary btn-sm" onclick="refreshFiles()">Go</button>
<div class="toolbar-sep"></div>
<div class="toolbar-group">
@@ -739,7 +739,6 @@ function renderDashboard(data) {
<div class="card">
<h2>Quick Actions</h2>
<div class="actions">
<button class="btn btn-primary" onclick="syncAssets(this)">Sync Assets</button>
${data.features_enabled?.screenshot ? '<button class="btn btn-secondary" onclick="captureScreenshot(this)">Screenshot</button>' : ''}
<button class="btn btn-danger" onclick="rebootDevice(this)">Reboot</button>
</div>
-63
View File
@@ -1,63 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tactility Dashboard</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 20px auto;
padding: 20px;
background-color: #f5f5f5;
}
h1 {
color: #333;
text-align: center;
}
.placeholder {
background: white;
padding: 40px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
text-align: center;
margin: 20px 0;
}
.placeholder h2 {
color: #666;
}
.placeholder p {
color: #666;
line-height: 1.6;
}
a {
color: #007bff;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<h1>Tactility Default Dashboard</h1>
<div class="placeholder">
<h2>Version 0 - Default Placeholder</h2>
<p>This is the default dashboard bundled with firmware.</p>
<p>To customize this interface:</p>
<ol style="text-align: left; display: inline-block;">
<li>Create your custom dashboard HTML/CSS/JS files</li>
<li>Add them to <code>/sdcard/tactility/webserver/</code></li>
<li>Create <code>version.json</code> with <code>{"version": 1}</code> or higher</li>
<li>Reboot or click "Sync Assets" on the <a href="/">Core Interface</a></li>
</ol>
<p><strong>Your custom assets will automatically replace this page!</strong></p>
</div>
<div class="placeholder">
<p><a href="/">← Back to Core Interface</a></p>
</div>
</body>
</html>
-3
View File
@@ -1,3 +0,0 @@
{
"version": 0
}
@@ -13,6 +13,7 @@
ble0 {
compatible = "espressif,esp32-ble";
status = "disabled";
};
gpio0 {
+18 -21
View File
@@ -1,25 +1,22 @@
[general]
vendor=BigTreeTech
name=Panda Touch,K Touch
general.vendor=BigTreeTech
general.name=Panda Touch,K Touch
[apps]
launcherAppId=Launcher
apps.launcherAppId=Launcher
[hardware]
target=ESP32S3
flashSize=16MB
spiRam=true
spiRamMode=OCT
spiRamSpeed=120M
esptoolFlashFreq=120M
bluetooth=true
usbHostEnabled=true
hardware.target=ESP32S3
hardware.flashSize=16MB
hardware.spiRam=true
hardware.spiRamMode=OCT
hardware.spiRamSpeed=120M
hardware.esptoolFlashFreq=120M
hardware.bluetooth=true
hardware.usbHostEnabled=true
[display]
size=5"
shape=rectangle
dpi=187
storage.userDataLocation=Internal
[lvgl]
colorDepth=16
fontSize=18
display.size=5"
display.shape=rectangle
display.dpi=187
lvgl.colorDepth=16
lvgl.fontSize=18
@@ -1,9 +1,7 @@
#include "devices/Display.h"
#include "devices/SdCard.h"
#include <driver/gpio.h>
#include <Tactility/hal/Configuration.h>
#include <Tactility/lvgl/LvglSync.h>
#include <PwmBacklight.h>
static bool initBoot() {
@@ -23,7 +21,6 @@ static bool initBoot() {
static tt::hal::DeviceVector createDevices() {
return {
createDisplay(),
createSdCard()
};
}
@@ -1,34 +0,0 @@
#include "SdCard.h"
#define TAG "twodotfour_sdcard"
#include <tactility/device.h>
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
#include <Tactility/RecursiveMutex.h>
constexpr auto SDCARD_SPI_HOST = SPI3_HOST;
constexpr auto SDCARD_PIN_CS = GPIO_NUM_5;
using tt::hal::sdcard::SpiSdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard() {
auto configuration = std::make_unique<SpiSdCardDevice::Config>(
SDCARD_PIN_CS,
GPIO_NUM_NC,
GPIO_NUM_NC,
GPIO_NUM_NC,
SdCardDevice::MountBehaviour::AtBoot,
nullptr,
std::vector<gpio_num_t>(),
SDCARD_SPI_HOST
);
auto* spi_controller = device_find_by_name("spi1");
check(spi_controller, "spi1 not found");
return std::make_shared<SpiSdCardDevice>(
std::move(configuration),
spi_controller
);
}
@@ -1,8 +0,0 @@
#pragma once
#include "Tactility/hal/sdcard/SdCardDevice.h"
using tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard();
+15 -2
View File
@@ -4,6 +4,8 @@
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_spi.h>
#include <tactility/bindings/esp32_sdspi.h>
#include <tactility/bindings/display_placeholder.h>
/ {
compatible = "root";
@@ -22,18 +24,29 @@
pin-scl = <&gpio0 32 GPIO_FLAG_NONE>;
};
display_spi: spi0 {
spi0 {
compatible = "espressif,esp32-spi";
host = <SPI2_HOST>;
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>;
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
display {
compatible = "display-placeholder";
};
};
sdcard_spi: spi1 {
spi1 {
compatible = "espressif,esp32-spi";
host = <SPI3_HOST>;
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
sdcard@0 {
compatible = "espressif,esp32-sdspi";
frequency-khz = <20000>;
};
};
};
+12 -15
View File
@@ -1,19 +1,16 @@
[general]
vendor=CYD
name=2432S024C
general.vendor=CYD
general.name=2432S024C
[apps]
launcherAppId=Launcher
apps.launcherAppId=Launcher
[hardware]
target=ESP32
flashSize=4MB
spiRam=false
hardware.target=ESP32
hardware.flashSize=4MB
hardware.spiRam=false
[display]
size=2.4"
shape=rectangle
dpi=167
storage.userDataLocation=SD
[lvgl]
colorDepth=16
display.size=2.4"
display.shape=rectangle
display.dpi=167
lvgl.colorDepth=16
@@ -1,9 +1,6 @@
#include "devices/Display.h"
#include "devices/SdCard.h"
#include <driver/gpio.h>
#include <Tactility/hal/Configuration.h>
#include <Tactility/lvgl/LvglSync.h>
#include <PwmBacklight.h>
using namespace tt::hal;
@@ -14,8 +11,7 @@ static bool initBoot() {
static DeviceVector createDevices() {
return {
createDisplay(),
createSdCard()
createDisplay()
};
}
@@ -1,23 +0,0 @@
#include "SdCard.h"
#include <tactility/device.h>
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
using tt::hal::sdcard::SpiSdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard() {
auto config = std::make_unique<SpiSdCardDevice::Config>(
GPIO_NUM_5,
GPIO_NUM_NC,
GPIO_NUM_NC,
GPIO_NUM_NC,
SdCardDevice::MountBehaviour::AtBoot,
nullptr,
std::vector<gpio_num_t>(),
SPI3_HOST
);
auto* spi_controller = device_find_by_name("spi1");
check(spi_controller, "spi1 not found");
return std::make_shared<SpiSdCardDevice>(std::move(config), spi_controller);
}
@@ -1,8 +0,0 @@
#pragma once
#include "Tactility/hal/sdcard/SdCardDevice.h"
using tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard();
+21 -2
View File
@@ -3,6 +3,9 @@
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_spi.h>
#include <tactility/bindings/esp32_sdspi.h>
#include <tactility/bindings/display_placeholder.h>
#include <tactility/bindings/touch_placeholder.h>
#include <tactility/bindings/esp32_uart.h>
/ {
@@ -14,20 +17,36 @@
gpio-count = <40>;
};
display_spi: spi0 {
spi0 {
compatible = "espressif,esp32-spi";
host = <SPI2_HOST>;
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 12 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>, // Display
<&gpio0 33 GPIO_FLAG_NONE>; // Touch
display@0 {
compatible = "display-placeholder";
};
sdcard_spi: spi1 {
touch@1 {
compatible = "touch-placeholder";
};
};
spi1 {
compatible = "espressif,esp32-spi";
host = <SPI3_HOST>;
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
sdcard@0 {
compatible = "espressif,esp32-sdspi";
frequency-khz = <20000>;
};
};
uart1 {
+12 -15
View File
@@ -1,19 +1,16 @@
[general]
vendor=CYD
name=2432S024R
general.vendor=CYD
general.name=2432S024R
[apps]
launcherAppId=Launcher
apps.launcherAppId=Launcher
[hardware]
target=ESP32
flashSize=4MB
spiRam=false
hardware.target=ESP32
hardware.flashSize=4MB
hardware.spiRam=false
[display]
size=2.4"
shape=rectangle
dpi=167
storage.userDataLocation=SD
[lvgl]
colorDepth=16
display.size=2.4"
display.shape=rectangle
display.dpi=167
lvgl.colorDepth=16
@@ -1,9 +1,7 @@
#include "devices/Display.h"
#include "devices/SdCard.h"
#include <driver/gpio.h>
#include <Tactility/hal/Configuration.h>
#include <Tactility/lvgl/LvglSync.h>
#include <PwmBacklight.h>
using namespace tt::hal;
@@ -25,7 +23,6 @@ static bool initBoot() {
static DeviceVector createDevices() {
return {
createDisplay(),
createSdCard()
};
}
@@ -1,25 +0,0 @@
#include "SdCard.h"
#include <tactility/device.h>
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
using tt::hal::sdcard::SpiSdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard() {
auto config = std::make_unique<SpiSdCardDevice::Config>(
GPIO_NUM_5,
GPIO_NUM_NC,
GPIO_NUM_NC,
GPIO_NUM_NC,
SdCardDevice::MountBehaviour::AtBoot,
nullptr,
std::vector<gpio_num_t>(),
SPI3_HOST
);
auto* spi_controller = device_find_by_name("spi1");
check(spi_controller, "spi1 not found");
return std::make_shared<SpiSdCardDevice>(std::move(config), spi_controller);
}
@@ -1,8 +0,0 @@
#pragma once
#include "Tactility/hal/sdcard/SdCardDevice.h"
using tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard();
+21 -2
View File
@@ -5,6 +5,9 @@
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_spi.h>
#include <tactility/bindings/esp32_uart.h>
#include <tactility/bindings/esp32_sdspi.h>
#include <tactility/bindings/display_placeholder.h>
#include <tactility/bindings/touch_placeholder.h>
/ {
compatible = "root";
@@ -23,20 +26,36 @@
pin-scl = <&gpio0 22 GPIO_FLAG_NONE>;
};
display_spi: spi0 {
spi0 {
compatible = "espressif,esp32-spi";
host = <SPI2_HOST>;
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>, // Display
<&gpio0 33 GPIO_FLAG_NONE>; // Touch
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 12 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
display@0 {
compatible = "display-placeholder";
};
sdcard_spi: spi1 {
touch@1 {
compatible = "touch-placeholder";
};
};
spi1 {
compatible = "espressif,esp32-spi";
host = <SPI3_HOST>;
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
sdcard@0 {
compatible = "espressif,esp32-sdspi";
frequency-khz = <20000>;
};
};
uart1 {
+13 -17
View File
@@ -1,22 +1,18 @@
[general]
vendor=CYD
name=2432S028R
general.vendor=CYD
general.name=2432S028R
[apps]
launcherAppId=Launcher
apps.launcherAppId=Launcher
[hardware]
target=ESP32
flashSize=4MB
spiRam=false
hardware.target=ESP32
hardware.flashSize=4MB
hardware.spiRam=false
[display]
size=2.8"
shape=rectangle
dpi=143
storage.userDataLocation=SD
[cdn]
warningMessage=There are 3 hardware variants of this board. This build works on the original variant only ("v1").
display.size=2.8"
display.shape=rectangle
display.dpi=143
[lvgl]
colorDepth=16
cdn.warningMessage=There are 3 hardware variants of this board. This build works on the original variant only ("v1").
lvgl.colorDepth=16
@@ -1,9 +1,7 @@
#include "devices/Display.h"
#include "devices/SdCard.h"
#include <driver/gpio.h>
#include <Tactility/hal/Configuration.h>
#include <Tactility/lvgl/LvglSync.h>
#include <PwmBacklight.h>
using namespace tt::hal;
@@ -25,7 +23,6 @@ static bool initBoot() {
static DeviceVector createDevices() {
return {
createDisplay(),
createSdCard()
};
}
@@ -1,25 +0,0 @@
#include "SdCard.h"
#include <tactility/device.h>
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
using tt::hal::sdcard::SpiSdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard() {
auto config = std::make_unique<SpiSdCardDevice::Config>(
GPIO_NUM_5,
GPIO_NUM_NC,
GPIO_NUM_NC,
GPIO_NUM_NC,
SdCardDevice::MountBehaviour::AtBoot,
nullptr,
std::vector<gpio_num_t>(),
SPI3_HOST
);
auto* spi_controller = device_find_by_name("spi1");
check(spi_controller, "spi1 not found");
return std::make_shared<SpiSdCardDevice>(std::move(config), spi_controller);
}
@@ -1,8 +0,0 @@
#pragma once
#include "Tactility/hal/sdcard/SdCardDevice.h"
using tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard();
+21 -2
View File
@@ -5,6 +5,9 @@
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_uart.h>
#include <tactility/bindings/esp32_spi.h>
#include <tactility/bindings/esp32_sdspi.h>
#include <tactility/bindings/display_placeholder.h>
#include <tactility/bindings/touch_placeholder.h>
/ {
compatible = "root";
@@ -23,20 +26,36 @@
pin-scl = <&gpio0 22 GPIO_FLAG_NONE>;
};
display_spi: spi0 {
spi0 {
compatible = "espressif,esp32-spi";
host = <SPI2_HOST>;
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>, // Display
<&gpio0 33 GPIO_FLAG_NONE>; // Touch
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 12 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
display@0 {
compatible = "display-placeholder";
};
sdcard_spi: spi1 {
touch@1 {
compatible = "touch-placeholder";
};
};
spi1 {
compatible = "espressif,esp32-spi";
host = <SPI3_HOST>;
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
sdcard@0 {
compatible = "espressif,esp32-sdspi";
frequency-khz = <20000>;
};
};
uart1 {
+13 -17
View File
@@ -1,22 +1,18 @@
[general]
vendor=CYD
name=2432S028R v3
general.vendor=CYD
general.name=2432S028R v3
[apps]
launcherAppId=Launcher
apps.launcherAppId=Launcher
[hardware]
target=ESP32
flashSize=4MB
spiRam=false
hardware.target=ESP32
hardware.flashSize=4MB
hardware.spiRam=false
[display]
size=2.8"
shape=rectangle
dpi=143
storage.userDataLocation=SD
[cdn]
warningMessage=There are 3 hardware variants of this board. This build only supports board version 3.
display.size=2.8"
display.shape=rectangle
display.dpi=143
[lvgl]
colorDepth=16
cdn.warningMessage=There are 3 hardware variants of this board. This build only supports board version 3.
lvgl.colorDepth=16
@@ -1,5 +1,4 @@
#include "devices/Display.h"
#include "devices/SdCard.h"
#include <driver/gpio.h>
#include <Tactility/hal/Configuration.h>
@@ -39,7 +38,6 @@ static bool initBoot() {
static tt::hal::DeviceVector createDevices() {
return {
createDisplay(),
createSdCard()
};
}
@@ -1,33 +0,0 @@
#include "SdCard.h"
#include <tactility/device.h>
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
#include <Tactility/lvgl/LvglSync.h>
#include <Tactility/RecursiveMutex.h>
constexpr auto SDCARD_SPI_HOST = SPI3_HOST;
constexpr auto SDCARD_PIN_CS = GPIO_NUM_5;
using tt::hal::sdcard::SpiSdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard() {
auto configuration = std::make_unique<SpiSdCardDevice::Config>(
SDCARD_PIN_CS,
GPIO_NUM_NC,
GPIO_NUM_NC,
GPIO_NUM_NC,
SdCardDevice::MountBehaviour::AtBoot,
std::make_shared<tt::RecursiveMutex>(),
std::vector<gpio_num_t>(),
SDCARD_SPI_HOST
);
auto* spi_controller = device_find_by_name("spi1");
check(spi_controller, "spi1 not found");
return std::make_shared<SpiSdCardDevice>(
std::move(configuration),
spi_controller
);
}
@@ -1,8 +0,0 @@
#pragma once
#include <Tactility/hal/sdcard/SdCardDevice.h>
using tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard();
+23 -10
View File
@@ -4,12 +4,14 @@
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_spi.h>
#include <tactility/bindings/esp32_sdspi.h>
#include <tactility/bindings/display_placeholder.h>
/ {
compatible = "root";
model = "CYD 2432S032C";
gpio1 {
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <40>;
};
@@ -18,22 +20,33 @@
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <&gpio1 33 GPIO_FLAG_NONE>;
pin-scl = <&gpio1 32 GPIO_FLAG_NONE>;
pin-sda = <&gpio0 33 GPIO_FLAG_NONE>;
pin-scl = <&gpio0 32 GPIO_FLAG_NONE>;
};
display_spi: spi0 {
spi0 {
compatible = "espressif,esp32-spi";
host = <SPI2_HOST>;
pin-mosi = <&gpio1 13 GPIO_FLAG_NONE>;
pin-sclk = <&gpio1 14 GPIO_FLAG_NONE>;
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>;
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
display {
compatible = "display-placeholder";
};
};
sdcard_spi: spi1 {
spi1 {
compatible = "espressif,esp32-spi";
host = <SPI3_HOST>;
pin-mosi = <&gpio1 23 GPIO_FLAG_NONE>;
pin-miso = <&gpio1 19 GPIO_FLAG_NONE>;
pin-sclk = <&gpio1 18 GPIO_FLAG_NONE>;
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
sdcard@0 {
compatible = "espressif,esp32-sdspi";
frequency-khz = <20000>;
};
};
};
+12 -15
View File
@@ -1,19 +1,16 @@
[general]
vendor=CYD
name=2432S032C
general.vendor=CYD
general.name=2432S032C
[apps]
launcherAppId=Launcher
apps.launcherAppId=Launcher
[hardware]
target=ESP32
flashSize=4MB
spiRam=false
hardware.target=ESP32
hardware.flashSize=4MB
hardware.spiRam=false
[display]
size=3.2"
shape=rectangle
dpi=125
storage.userDataLocation=SD
[lvgl]
colorDepth=16
display.size=3.2"
display.shape=rectangle
display.dpi=125
lvgl.colorDepth=16
@@ -1,5 +1,4 @@
#include "devices/Display.h"
#include "devices/SdCard.h"
#include <driver/gpio.h>
#include <PwmBacklight.h>
@@ -24,7 +23,6 @@ static bool initBoot() {
static DeviceVector createDevices() {
return {
createDisplay(),
createSdCard()
};
}
@@ -1,31 +0,0 @@
#include "SdCard.h"
#include <tactility/device.h>
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
constexpr auto SDCARD_SPI_HOST = SPI3_HOST;
constexpr auto SDCARD_PIN_CS = GPIO_NUM_5;
using tt::hal::sdcard::SpiSdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard() {
auto configuration = std::make_unique<SpiSdCardDevice::Config>(
SDCARD_PIN_CS,
GPIO_NUM_NC,
GPIO_NUM_NC,
GPIO_NUM_NC,
SdCardDevice::MountBehaviour::AtBoot,
nullptr,
std::vector<gpio_num_t>(),
SDCARD_SPI_HOST
);
auto* spi_controller = device_find_by_name("spi1");
check(spi_controller, "spi1 not found");
return std::make_shared<SpiSdCardDevice>(
std::move(configuration),
spi_controller
);
}
@@ -1,8 +0,0 @@
#pragma once
#include <Tactility/hal/sdcard/SdCardDevice.h>
using tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard();
+15 -2
View File
@@ -5,6 +5,8 @@
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_spi.h>
#include <tactility/bindings/esp32_uart.h>
#include <tactility/bindings/esp32_sdspi.h>
#include <tactility/bindings/display_placeholder.h>
/ {
compatible = "root";
@@ -32,19 +34,30 @@
pin-scl = <&gpio0 22 GPIO_FLAG_NONE>;
};
display_spi: spi0 {
spi0 {
compatible = "espressif,esp32-spi";
host = <SPI2_HOST>;
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>;
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
display {
compatible = "display-placeholder";
};
};
sdcard_spi: spi1 {
spi1 {
compatible = "espressif,esp32-spi";
host = <SPI3_HOST>;
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
sdcard@0 {
compatible = "espressif,esp32-sdspi";
frequency-khz = <20000>;
};
};
// CN1 header, JST SH 1.25, GND / IO22 / IO21 / 3.3V
+12 -15
View File
@@ -1,19 +1,16 @@
[general]
vendor=CYD
name=3248S035C
general.vendor=CYD
general.name=3248S035C
[apps]
launcherAppId=Launcher
apps.launcherAppId=Launcher
[hardware]
target=ESP32
flashSize=4MB
spiRam=false
hardware.target=ESP32
hardware.flashSize=4MB
hardware.spiRam=false
[display]
size=3.5"
shape=rectangle
dpi=165
storage.userDataLocation=SD
[lvgl]
colorDepth=16
display.size=3.5"
display.shape=rectangle
display.dpi=165
lvgl.colorDepth=16
@@ -1,10 +1,6 @@
#include "devices/St7701Display.h"
#include "devices/SdCard.h"
#include <driver/gpio.h>
#include <Tactility/hal/Configuration.h>
#include <Tactility/kernel/SystemEvents.h>
#include <Tactility/lvgl/LvglSync.h>
#include <PwmBacklight.h>
using namespace tt::hal;
@@ -16,7 +12,6 @@ static bool initBoot() {
static DeviceVector createDevices() {
return {
std::make_shared<St7701Display>(),
createSdCard()
};
}
@@ -1,28 +0,0 @@
#include "SdCard.h"
#include <tactility/device.h>
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
#include <Tactility/lvgl/LvglSync.h>
using tt::hal::sdcard::SpiSdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard() {
auto config = std::make_unique<SpiSdCardDevice::Config>(
GPIO_NUM_42,
GPIO_NUM_NC,
GPIO_NUM_NC,
GPIO_NUM_NC,
SdCardDevice::MountBehaviour::AtBoot,
tt::lvgl::getSyncLock(),
std::vector { GPIO_NUM_39 }
);
auto* spi_controller = device_find_by_name("spi0");
check(spi_controller, "spi0 not found");
return std::make_shared<SpiSdCardDevice>(
std::move(config),
spi_controller
);
}
@@ -1,8 +0,0 @@
#pragma once
#include "Tactility/hal/sdcard/SdCardDevice.h"
using tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard();
@@ -12,9 +12,25 @@
#include <esp_lcd_panel_ops.h>
#include <esp_lcd_panel_io_additions.h>
#include <esp_lcd_st7701.h>
#include <esp_rom_gpio.h>
#include <soc/spi_periph.h>
#include <driver/spi_master.h>
static const auto LOGGER = tt::Logger("St7701Display");
// GPIO47/48 are physically shared between this bit-banged 3-wire command bus
// and the SD card's real SPI2 bus (no alternate pins exist on this PCB).
// esp_lcd_new_panel_io_3wire_spi() reconfigures them as plain GPIO via
// gpio_config(), severing their SPI2 matrix routing. Reconnect them here once
// the vendor init sequence is done, so SD card reads/writes keep working.
// Safe only because nothing else calls into the ST7701 IO handle after boot.
static void reclaimSpiPinsForSdCard() {
esp_rom_gpio_connect_out_signal(GPIO_NUM_47, spi_periph_signal[SPI2_HOST].spid_out, false, false);
esp_rom_gpio_connect_out_signal(GPIO_NUM_48, spi_periph_signal[SPI2_HOST].spiclk_out, false, false);
gpio_set_direction(GPIO_NUM_47, GPIO_MODE_OUTPUT);
gpio_set_direction(GPIO_NUM_48, GPIO_MODE_OUTPUT);
}
static const st7701_lcd_init_cmd_t st7701_lcd_init_cmds[] = {
// {cmd, { data }, data_size, delay_ms}
{0xFF, (uint8_t[]) {0x77, 0x01, 0x00, 0x00, 0x10}, 5, 0},
@@ -181,6 +197,8 @@ bool St7701Display::createPanelHandle(esp_lcd_panel_io_handle_t ioHandle, esp_lc
return false;
}
reclaimSpiPinsForSdCard();
return true;
}
+1 -1
View File
@@ -12,7 +12,7 @@ static error_t stop() {
return ERROR_NONE;
}
struct Module cyd_4848s040c_module = {
Module cyd_4848s040c_module = {
.name = "cyd-4848s040c",
.start = start,
.stop = stop,
+2 -9
View File
@@ -5,6 +5,7 @@
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_spi.h>
#include <tactility/bindings/esp32_sdspi.h>
/ {
compatible = "root";
@@ -12,6 +13,7 @@
ble0 {
compatible = "espressif,esp32-ble";
status = "disabled";
};
gpio0 {
@@ -26,13 +28,4 @@
pin-sda = <&gpio0 19 GPIO_FLAG_NONE>;
pin-scl = <&gpio0 45 GPIO_FLAG_NONE>;
};
spi0 {
compatible = "espressif,esp32-spi";
host = <SPI2_HOST>;
pin-mosi = <&gpio0 47 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 41 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 48 GPIO_FLAG_NONE>;
pin-hd = <&gpio0 42 GPIO_FLAG_NONE>;
};
};
+15 -18
View File
@@ -1,22 +1,19 @@
[general]
vendor=CYD
name=4848S040C
general.vendor=CYD
general.name=4848S040C
[apps]
launcherAppId=Launcher
apps.launcherAppId=Launcher
[hardware]
target=ESP32S3
flashSize=16MB
spiRam=true
spiRamMode=OCT
spiRamSpeed=80M
bluetooth=true
hardware.target=ESP32S3
hardware.flashSize=16MB
hardware.spiRam=true
hardware.spiRamMode=OCT
hardware.spiRamSpeed=80M
hardware.bluetooth=true
[display]
size=4"
shape=rectangle
dpi=170
storage.userDataLocation=SD
[lvgl]
colorDepth=16
display.size=4"
display.shape=rectangle
display.dpi=170
lvgl.colorDepth=16
@@ -1,7 +1,5 @@
#include "PwmBacklight.h"
#include "devices/Display.h"
#include "devices/SdCard.h"
#include <driver/gpio.h>
#include <Tactility/hal/Configuration.h>
@@ -15,7 +13,6 @@ static bool initBoot() {
static DeviceVector createDevices() {
return {
createDisplay(),
createSdCard()
};
}
@@ -1,25 +0,0 @@
#include "SdCard.h"
#include <tactility/device.h>
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
#include <Tactility/lvgl/LvglSync.h>
using tt::hal::sdcard::SpiSdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard() {
auto config = std::make_unique<SpiSdCardDevice::Config>(
GPIO_NUM_10,
GPIO_NUM_NC,
GPIO_NUM_NC,
GPIO_NUM_NC,
SdCardDevice::MountBehaviour::AtBoot
);
auto* spi_controller = device_find_by_name("spi0");
check(spi_controller, "spi0 not found");
return std::make_shared<SpiSdCardDevice>(
std::move(config),
spi_controller
);
}
@@ -1,7 +0,0 @@
#pragma once
#include "Tactility/hal/sdcard/SdCardDevice.h"
using tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard();
+8
View File
@@ -6,6 +6,7 @@
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_uart.h>
#include <tactility/bindings/esp32_spi.h>
#include <tactility/bindings/esp32_sdspi.h>
/ {
compatible = "root";
@@ -13,6 +14,7 @@
ble0 {
compatible = "espressif,esp32-ble";
status = "disabled";
};
gpio0 {
@@ -39,9 +41,15 @@
spi0 {
compatible = "espressif,esp32-spi";
host = <SPI2_HOST>;
cs-gpios = <&gpio0 10 GPIO_FLAG_NONE>;
pin-mosi = <&gpio0 11 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 13 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 12 GPIO_FLAG_NONE>;
sdcard@0 {
compatible = "espressif,esp32-sdspi";
frequency-khz = <20000>;
};
};
uart1 {
+21 -25
View File
@@ -1,30 +1,26 @@
[general]
vendor=CYD
name=8048S043C
incubating=false
general.vendor=CYD
general.name=8048S043C
general.incubating=false
[apps]
launcherAppId=Launcher
apps.launcherAppId=Launcher
[hardware]
target=ESP32S3
flashSize=16MB
spiRam=true
spiRamMode=OCT
spiRamSpeed=80M
esptoolFlashFreq=80M
bluetooth=true
hardware.target=ESP32S3
hardware.flashSize=16MB
hardware.spiRam=true
hardware.spiRamMode=OCT
hardware.spiRamSpeed=80M
hardware.esptoolFlashFreq=80M
hardware.bluetooth=true
[display]
size=4.3"
shape=rectangle
dpi=217
storage.userDataLocation=SD
[cdn]
infoMessage=
warningMessage=
display.size=4.3"
display.shape=rectangle
display.dpi=217
[lvgl]
theme=DefaultDark
colorDepth=16
fontSize=18
cdn.infoMessage=
cdn.warningMessage=
lvgl.theme=DefaultDark
lvgl.colorDepth=16
lvgl.fontSize=18
@@ -1,8 +1,6 @@
#include "devices/SdCard.h"
#include "devices/Display.h"
#include <Tactility/hal/Configuration.h>
#include <Tactility/lvgl/LvglSync.h>
#include <PwmBacklight.h>
static bool initBoot() {
@@ -12,7 +10,6 @@ static bool initBoot() {
static tt::hal::DeviceVector createDevices() {
return {
createDisplay(),
createSdCard()
};
}
@@ -1,28 +0,0 @@
#include "SdCard.h"
#include <tactility/device.h>
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
#include <Tactility/RecursiveMutex.h>
using tt::hal::sdcard::SpiSdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard() {
auto configuration = std::make_unique<SpiSdCardDevice::Config>(
GPIO_NUM_5,
GPIO_NUM_NC,
GPIO_NUM_NC,
GPIO_NUM_NC,
SdCardDevice::MountBehaviour::AtBoot,
nullptr,
std::vector<gpio_num_t>(),
SPI3_HOST
);
auto* spi_controller = device_find_by_name("spi1");
check(spi_controller, "spi1 not found");
return std::make_shared<SpiSdCardDevice>(
std::move(configuration),
spi_controller
);
}
@@ -1,7 +0,0 @@
#pragma once
#include <Tactility/hal/sdcard/SdCardDevice.h>
using tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard();
+21 -2
View File
@@ -3,6 +3,9 @@
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_spi.h>
#include <tactility/bindings/esp32_sdspi.h>
#include <tactility/bindings/display_placeholder.h>
#include <tactility/bindings/touch_placeholder.h>
/ {
compatible = "root";
@@ -13,19 +16,35 @@
gpio-count = <40>;
};
display_spi: spi0 {
spi0 {
compatible = "espressif,esp32-spi";
host = <SPI2_HOST>;
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>, // Display
<&gpio0 33 GPIO_FLAG_NONE>; // Touch
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 12 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
display@0 {
compatible = "display-placeholder";
};
sdcard_spi: spi1 {
touch@1 {
compatible = "touch-placeholder";
};
};
spi1 {
compatible = "espressif,esp32-spi";
host = <SPI3_HOST>;
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
sdcard@0 {
compatible = "espressif,esp32-sdspi";
frequency-khz = <20000>;
};
};
};
+12 -15
View File
@@ -1,19 +1,16 @@
[general]
vendor=CYD
name=E32R28T
general.vendor=CYD
general.name=E32R28T
[apps]
launcherAppId=Launcher
apps.launcherAppId=Launcher
[hardware]
target=ESP32
flashSize=4MB
spiRam=false
hardware.target=ESP32
hardware.flashSize=4MB
hardware.spiRam=false
[display]
size=2.8"
shape=rectangle
dpi=143
storage.userDataLocation=SD
[lvgl]
colorDepth=16
display.size=2.8"
display.shape=rectangle
display.dpi=143
lvgl.colorDepth=16
@@ -1,10 +1,7 @@
#include "devices/SdCard.h"
#include "devices/Display.h"
#include "devices/Power.h"
#include <driver/gpio.h>
#include <Tactility/hal/Configuration.h>
#include <Tactility/lvgl/LvglSync.h>
#include <PwmBacklight.h>
using namespace tt::hal;
@@ -17,7 +14,6 @@ static tt::hal::DeviceVector createDevices() {
return {
createPower(),
createDisplay(),
createSdCard()
};
}
@@ -1,29 +0,0 @@
#include "SdCard.h"
#include <tactility/device.h>
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
#include <Tactility/RecursiveMutex.h>
using tt::hal::sdcard::SpiSdCardDevice;
using SdCardDevice = tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard() {
auto configuration = std::make_unique<SpiSdCardDevice::Config>(
SD_CS_PIN, // CS pin (IO5 on the module)
GPIO_NUM_NC, // MOSI override: leave NC to use SPI host pins
GPIO_NUM_NC, // MISO override: leave NC
GPIO_NUM_NC, // SCLK override: leave NC
SdCardDevice::MountBehaviour::AtBoot,
std::make_shared<tt::RecursiveMutex>(),
std::vector<gpio_num_t>(),
SD_SPI_HOST // SPI host for SD card (SPI3_HOST)
);
auto* spi_controller = device_find_by_name("spi1");
check(spi_controller, "spi1 not found");
return std::make_shared<SpiSdCardDevice>(
std::move(configuration),
spi_controller
);
}
@@ -1,13 +0,0 @@
#pragma once
#include <Tactility/hal/sdcard/SdCardDevice.h>
#include "driver/gpio.h"
#include "driver/spi_common.h"
using tt::hal::sdcard::SdCardDevice;
// SD card (microSD)
constexpr auto SD_CS_PIN = GPIO_NUM_5;
constexpr auto SD_SPI_HOST = SPI3_HOST;
std::shared_ptr<SdCardDevice> createSdCard();
+21 -2
View File
@@ -4,6 +4,9 @@
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_spi.h>
#include <tactility/bindings/esp32_sdspi.h>
#include <tactility/bindings/display_placeholder.h>
#include <tactility/bindings/touch_placeholder.h>
/ {
compatible = "root";
@@ -22,19 +25,35 @@
pin-scl = <&gpio0 25 GPIO_FLAG_NONE>;
};
display_spi: spi0 {
spi0 {
compatible = "espressif,esp32-spi";
host = <SPI2_HOST>;
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>, // Display
<&gpio0 33 GPIO_FLAG_NONE>; // Touch
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 12 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
display@0 {
compatible = "display-placeholder";
};
sdcard_spi: spi1 {
touch@1 {
compatible = "touch-placeholder";
};
};
spi1 {
compatible = "espressif,esp32-spi";
host = <SPI3_HOST>;
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
sdcard@0 {
compatible = "espressif,esp32-sdspi";
frequency-khz = <20000>;
};
};
};
+12 -15
View File
@@ -1,19 +1,16 @@
[general]
vendor=CYD
name=E32R32P
general.vendor=CYD
general.name=E32R32P
[apps]
launcherAppId=Launcher
apps.launcherAppId=Launcher
[hardware]
target=ESP32
flashSize=4MB
spiRam=false
hardware.target=ESP32
hardware.flashSize=4MB
hardware.spiRam=false
[display]
size=2.8"
shape=rectangle
dpi=125
storage.userDataLocation=SD
[lvgl]
colorDepth=16
display.size=2.8"
display.shape=rectangle
display.dpi=125
lvgl.colorDepth=16
@@ -1,7 +1,5 @@
#include "PwmBacklight.h"
#include "devices/Display.h"
#include "devices/SdCard.h"
#include <driver/gpio.h>
#include <Tactility/hal/Configuration.h>
@@ -14,7 +12,6 @@ static bool initBoot() {
static DeviceVector createDevices() {
return {
createDisplay(),
createSdCard()
};
}
@@ -1,29 +0,0 @@
#include "SdCard.h"
#include <tactility/device.h>
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
using tt::hal::sdcard::SpiSdCardDevice;
constexpr auto CROWPANEL_SDCARD_PIN_CS = GPIO_NUM_7;
std::shared_ptr<SdCardDevice> createSdCard() {
auto configuration = std::make_unique<SpiSdCardDevice::Config>(
CROWPANEL_SDCARD_PIN_CS,
GPIO_NUM_NC,
GPIO_NUM_NC,
GPIO_NUM_NC,
SdCardDevice::MountBehaviour::AtBoot,
nullptr,
std::vector<gpio_num_t>(),
SPI3_HOST
);
auto* spi_controller = device_find_by_name("spi1");
check(spi_controller, "spi1 not found");
return std::make_shared<SpiSdCardDevice>(
std::move(configuration),
spi_controller
);
}
@@ -1,7 +0,0 @@
#pragma once
#include "Tactility/hal/sdcard/SdCardDevice.h"
using tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard();
@@ -1,24 +1,21 @@
[general]
vendor=Elecrow
name=CrowPanel Advance 2.8"
general.vendor=Elecrow
general.name=CrowPanel Advance 2.8"
[apps]
launcherAppId=Launcher
apps.launcherAppId=Launcher
[hardware]
target=ESP32S3
flashSize=16MB
spiRam=true
spiRamMode=OCT
spiRamSpeed=120M
tinyUsb=true
esptoolFlashFreq=120M
bluetooth=true
hardware.target=ESP32S3
hardware.flashSize=16MB
hardware.spiRam=true
hardware.spiRamMode=OCT
hardware.spiRamSpeed=120M
hardware.tinyUsb=true
hardware.esptoolFlashFreq=120M
hardware.bluetooth=true
[display]
size=2.8"
shape=rectangle
dpi=143
storage.userDataLocation=SD
[lvgl]
colorDepth=16
display.size=2.8"
display.shape=rectangle
display.dpi=143
lvgl.colorDepth=16
@@ -6,6 +6,8 @@
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_spi.h>
#include <tactility/bindings/esp32_uart.h>
#include <tactility/bindings/esp32_sdspi.h>
#include <tactility/bindings/display_placeholder.h>
/ {
compatible = "root";
@@ -13,6 +15,7 @@
ble0 {
compatible = "espressif,esp32-ble";
status = "disabled";
};
gpio0 {
@@ -28,19 +31,30 @@
pin-scl = <&gpio0 16 GPIO_FLAG_NONE>;
};
display_spi: spi0 {
spi0 {
compatible = "espressif,esp32-spi";
host = <SPI2_HOST>;
cs-gpios = <&gpio0 40 GPIO_FLAG_NONE>;
pin-mosi = <&gpio0 39 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 42 GPIO_FLAG_NONE>;
display {
compatible = "display-placeholder";
};
};
sdcard_spi: spi1 {
spi1 {
compatible = "espressif,esp32-spi";
host = <SPI3_HOST>;
cs-gpios = <&gpio0 7 GPIO_FLAG_NONE>;
pin-mosi = <&gpio0 6 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 4 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 5 GPIO_FLAG_NONE>;
sdcard@0 {
compatible = "espressif,esp32-sdspi";
frequency-khz = <20000>;
};
};
uart0 {
@@ -1,6 +1,4 @@
#include "devices/Display.h"
#include "devices/SdCard.h"
#include <driver/gpio.h>
#include <Tactility/hal/Configuration.h>
#include <PwmBacklight.h>
@@ -14,7 +12,6 @@ static bool initBoot() {
static DeviceVector createDevices() {
return {
createDisplay(),
createSdCard()
};
}
@@ -1,29 +0,0 @@
#include "SdCard.h"
#include <tactility/device.h>
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
using tt::hal::sdcard::SpiSdCardDevice;
constexpr auto CROWPANEL_SDCARD_PIN_CS = GPIO_NUM_7;
std::shared_ptr<SdCardDevice> createSdCard() {
auto configuration = std::make_unique<SpiSdCardDevice::Config>(
CROWPANEL_SDCARD_PIN_CS,
GPIO_NUM_NC,
GPIO_NUM_NC,
GPIO_NUM_NC,
SdCardDevice::MountBehaviour::AtBoot,
nullptr,
std::vector<gpio_num_t>(),
SPI3_HOST
);
auto* spi_controller = device_find_by_name("spi1");
check(spi_controller, "spi1 not found");
return std::make_shared<SpiSdCardDevice>(
std::move(configuration),
spi_controller
);
}
@@ -1,7 +0,0 @@
#pragma once
#include "Tactility/hal/sdcard/SdCardDevice.h"
using tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard();
@@ -1,24 +1,21 @@
[general]
vendor=Elecrow
name=CrowPanel Advance 3.5"
general.vendor=Elecrow
general.name=CrowPanel Advance 3.5"
[apps]
launcherAppId=Launcher
apps.launcherAppId=Launcher
[hardware]
target=ESP32S3
flashSize=16MB
spiRam=true
spiRamMode=OCT
spiRamSpeed=120M
tinyUsb=true
esptoolFlashFreq=120M
bluetooth=true
hardware.target=ESP32S3
hardware.flashSize=16MB
hardware.spiRam=true
hardware.spiRamMode=OCT
hardware.spiRamSpeed=120M
hardware.tinyUsb=true
hardware.esptoolFlashFreq=120M
hardware.bluetooth=true
[display]
size=3.5"
shape=rectangle
dpi=165
storage.userDataLocation=SD
[lvgl]
colorDepth=16
display.size=3.5"
display.shape=rectangle
display.dpi=165
lvgl.colorDepth=16
@@ -6,6 +6,8 @@
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_spi.h>
#include <tactility/bindings/esp32_uart.h>
#include <tactility/bindings/esp32_sdspi.h>
#include <tactility/bindings/display_placeholder.h>
/ {
compatible = "root";
@@ -13,6 +15,7 @@
ble0 {
compatible = "espressif,esp32-ble";
status = "disabled";
};
gpio0 {
@@ -28,19 +31,30 @@
pin-scl = <&gpio0 16 GPIO_FLAG_NONE>;
};
display_spi: spi0 {
spi0 {
compatible = "espressif,esp32-spi";
host = <SPI2_HOST>;
cs-gpios = <&gpio0 40 GPIO_FLAG_NONE>;
pin-mosi = <&gpio0 39 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 42 GPIO_FLAG_NONE>;
display {
compatible = "display-placeholder";
};
};
sdcard_spi: spi1 {
spi1 {
compatible = "espressif,esp32-spi";
host = <SPI3_HOST>;
cs-gpios = <&gpio0 7 GPIO_FLAG_NONE>;
pin-mosi = <&gpio0 6 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 4 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 5 GPIO_FLAG_NONE>;
sdcard@0 {
compatible = "espressif,esp32-sdspi";
frequency-khz = <20000>;
};
};
uart0 {
@@ -1,6 +1,4 @@
#include "devices/Display.h"
#include "devices/SdCard.h"
#include <driver/gpio.h>
#include <Tactility/hal/Configuration.h>
#include <TCA9534.h>
@@ -25,7 +23,6 @@ static bool initBoot() {
static DeviceVector createDevices() {
return {
createDisplay(),
createSdCard()
};
}
@@ -1,25 +0,0 @@
#include "SdCard.h"
#include <tactility/device.h>
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
using tt::hal::sdcard::SpiSdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard() {
auto configuration = std::make_unique<SpiSdCardDevice::Config>(
// See https://github.com/Elecrow-RD/CrowPanel-Advance-HMI-ESP32-AI-Display/blob/master/5.0/factory_code/factory_code.ino
GPIO_NUM_0, // It's actually not connected, but in the demo pin 0 is used
GPIO_NUM_NC,
GPIO_NUM_NC,
GPIO_NUM_NC,
SdCardDevice::MountBehaviour::AtBoot
);
auto* spi_controller = device_find_by_name("spi0");
check(spi_controller, "spi0 not found");
return std::make_shared<SpiSdCardDevice>(
std::move(configuration),
spi_controller
);
}
@@ -1,7 +0,0 @@
#pragma once
#include <Tactility/hal/sdcard/SdCardDevice.h>
using tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard();
@@ -1,25 +1,22 @@
[general]
vendor=Elecrow
name=CrowPanel Advance 5.0"
general.vendor=Elecrow
general.name=CrowPanel Advance 5.0"
[apps]
launcherAppId=Launcher
apps.launcherAppId=Launcher
[hardware]
target=ESP32S3
flashSize=16MB
spiRam=true
spiRamMode=OCT
spiRamSpeed=120M
tinyUsb=true
esptoolFlashFreq=120M
bluetooth=true
hardware.target=ESP32S3
hardware.flashSize=16MB
hardware.spiRam=true
hardware.spiRamMode=OCT
hardware.spiRamSpeed=120M
hardware.tinyUsb=true
hardware.esptoolFlashFreq=120M
hardware.bluetooth=true
[display]
size=5"
shape=rectangle
dpi=187
storage.userDataLocation=SD
[lvgl]
colorDepth=16
fontSize=18
display.size=5"
display.shape=rectangle
display.dpi=187
lvgl.colorDepth=16
lvgl.fontSize=18
@@ -6,6 +6,7 @@
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_spi.h>
#include <tactility/bindings/esp32_uart.h>
#include <tactility/bindings/esp32_sdspi.h>
/ {
compatible = "root";
@@ -13,6 +14,7 @@
ble0 {
compatible = "espressif,esp32-ble";
status = "disabled";
};
gpio0 {
@@ -28,12 +30,18 @@
pin-scl = <&gpio0 16 GPIO_FLAG_NONE>;
};
sdcard_spi: spi0 {
spi0 {
compatible = "espressif,esp32-spi";
host = <SPI2_HOST>;
cs-gpios = <&gpio0 0 GPIO_FLAG_NONE>;
pin-mosi = <&gpio0 6 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 4 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 5 GPIO_FLAG_NONE>;
sdcard@0 {
compatible = "espressif,esp32-sdspi";
frequency-khz = <20000>;
};
};
uart0 {
@@ -1,7 +1,5 @@
#include "PwmBacklight.h"
#include "devices/Display.h"
#include "devices/SdCard.h"
#include <driver/gpio.h>
#include <Tactility/hal/Configuration.h>
@@ -14,7 +12,6 @@ static bool initBoot() {
static DeviceVector createDevices() {
return {
createDisplay(),
createSdCard()
};
}
@@ -1,28 +0,0 @@
#include "SdCard.h"
#include <tactility/device.h>
#include <Tactility/lvgl/LvglSync.h>
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
using tt::hal::sdcard::SpiSdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard() {
auto configuration = std::make_unique<SpiSdCardDevice::Config>(
GPIO_NUM_5,
GPIO_NUM_NC,
GPIO_NUM_NC,
GPIO_NUM_NC,
SdCardDevice::MountBehaviour::AtBoot,
tt::lvgl::getSyncLock(),
std::vector<gpio_num_t>(),
SPI3_HOST
);
auto* spi_controller = device_find_by_name("spi1");
check(spi_controller, "spi1 not found");
return std::make_shared<SpiSdCardDevice>(
std::move(configuration),
spi_controller
);
}
@@ -1,7 +0,0 @@
#pragma once
#include "Tactility/hal/sdcard/SdCardDevice.h"
using tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard();
@@ -1,19 +1,16 @@
[general]
vendor=Elecrow
name=CrowPanel Basic 2.8"
general.vendor=Elecrow
general.name=CrowPanel Basic 2.8"
[apps]
launcherAppId=Launcher
apps.launcherAppId=Launcher
[hardware]
target=ESP32
flashSize=4MB
spiRam=false
hardware.target=ESP32
hardware.flashSize=4MB
hardware.spiRam=false
[display]
size=2.8"
shape=rectangle
dpi=143
storage.userDataLocation=SD
[lvgl]
colorDepth=16
display.size=2.8"
display.shape=rectangle
display.dpi=143
lvgl.colorDepth=16
@@ -5,6 +5,9 @@
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_spi.h>
#include <tactility/bindings/esp32_uart.h>
#include <tactility/bindings/esp32_sdspi.h>
#include <tactility/bindings/display_placeholder.h>
#include <tactility/bindings/touch_placeholder.h>
/ {
compatible = "root";
@@ -23,21 +26,37 @@
pin-scl = <&gpio0 21 GPIO_FLAG_NONE>;
};
display_spi: spi0 {
spi0 {
compatible = "espressif,esp32-spi";
host = <SPI2_HOST>;
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>, // Display
<&gpio0 33 GPIO_FLAG_NONE>; // Touch
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 12 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
max-transfer-size = <65536>;
display@0 {
compatible = "display-placeholder";
};
sdcard_spi: spi1 {
touch@1 {
compatible = "touch-placeholder";
};
};
spi1 {
compatible = "espressif,esp32-spi";
host = <SPI3_HOST>;
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
sdcard@0 {
compatible = "espressif,esp32-sdspi";
frequency-khz = <20000>;
};
};
uart1 {
@@ -1,20 +1,21 @@
#include "PwmBacklight.h"
#include "devices/Display.h"
#include "devices/SdCard.h"
#include <driver/gpio.h>
#include <Tactility/hal/Configuration.h>
using namespace tt::hal;
static bool initBoot() {
return driver::pwmbacklight::init(GPIO_NUM_27);
driver::pwmbacklight::init(GPIO_NUM_27);
// Delay is required, or GUI will lock up.
// It's possibly related to the increased power draw when turning on the backlight.
vTaskDelay(100);
return true;
}
static DeviceVector createDevices() {
return {
createDisplay(),
createSdCard()
};
}

Some files were not shown because too many files have changed in this diff Show More