USB host support (#527)

This commit is contained in:
Shadowtrance
2026-06-04 07:10:37 +10:00
committed by GitHub
parent a59fbf4ed5
commit 3dcc95f6f3
46 changed files with 2409 additions and 121 deletions
@@ -4,6 +4,7 @@
#include <tactility/bindings/esp32_ble.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_usbhost.h>
// Reference: https://github.com/bigtreetech/PandaTouch_PlatformIO/blob/master/docs/PINOUT.md
/ {
@@ -34,4 +35,23 @@
pin-sda = <&gpio0 4 GPIO_FLAG_NONE>;
pin-scl = <&gpio0 3 GPIO_FLAG_NONE>;
};
usbhost0 {
compatible = "espressif,esp32-usbhost";
usbhosthid0 {
compatible = "espressif,esp32-usbhost-hid";
//status = "disabled";
};
usbhostmidi0 {
compatible = "espressif,esp32-usbhost-midi";
//status = "disabled";
};
usbhostmsc0 {
compatible = "espressif,esp32-usbhost-msc";
//status = "disabled";
};
};
};
@@ -13,6 +13,7 @@ spiRamMode=OCT
spiRamSpeed=120M
esptoolFlashFreq=120M
bluetooth=true
usbHostEnabled=true
[display]
size=5"
@@ -77,8 +77,8 @@ std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay() {
.mirrorY = false,
.invertColor = false,
.bufferSize = 0, // 0 = default (1/10 of screen)
.swRotate = (variant == Tab5Variant::St7123), // ST7123 MIPI-DSI panel does not support hardware swap_xy
.buffSpiram = (variant == Tab5Variant::St7123), // sw_rotate needs a 3rd buffer; use PSRAM to avoid OOM in internal SRAM
.swRotate = true,
.buffSpiram = true,
.touch = touch,
.backlightDutyFunction = driver::pwmbacklight::setBacklightDuty,
.resetPin = LCD_PIN_RESET,
+1
View File
@@ -13,6 +13,7 @@ spiRamMode=HEX
spiRamSpeed=200M
esptoolFlashFreq=80M
bluetooth=true
usbHostEnabled=true
[display]
size=5"
+21
View File
@@ -7,6 +7,7 @@
#include <tactility/bindings/esp32_i2s.h>
#include <tactility/bindings/esp32_spi.h>
#include <tactility/bindings/esp32_uart.h>
#include <tactility/bindings/esp32_usbhost.h>
#include <bindings/bmi270.h>
#include <bindings/ina226.h>
#include <bindings/pi4ioe5v6408.h>
@@ -93,4 +94,24 @@
pin-tx = <&gpio0 53 GPIO_FLAG_NONE>;
pin-rx = <&gpio0 54 GPIO_FLAG_NONE>;
};
usbhost0 {
compatible = "espressif,esp32-usbhost";
peripheral-map = <0>;
usbhosthid0 {
compatible = "espressif,esp32-usbhost-hid";
//status = "disabled";
};
usbhostmidi0 {
compatible = "espressif,esp32-usbhost-midi";
//status = "disabled";
};
usbhostmsc0 {
compatible = "espressif,esp32-usbhost-msc";
//status = "disabled";
};
};
};