Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ if (DEFINED ENV{ESP_IDF_VERSION})

else ()
message("Building for sim target")
# Devices/simulator/Source/Simulator.cpp always defines its own hardwareConfiguration; without
# this, Firmware/Source/Main.cpp's #else branch also defines an empty one (its ESP32-only
# fallback for devices migrated off the deprecated HAL), causing a duplicate-definition link error.
add_compile_definitions(CONFIG_TT_USE_DEPRECATED_HAL)
add_compile_definitions(CONFIG_TT_DEVICE_ID="simulator")
add_compile_definitions(CONFIG_TT_DEVICE_NAME="Simulator")
add_compile_definitions(CONFIG_TT_DEVICE_VENDOR="")
Expand Down
5 changes: 2 additions & 3 deletions Devices/cyd-2432s024c/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
file(GLOB_RECURSE SOURCE_FILES Source/*.c*)
file(GLOB_RECURSE SOURCE_FILES source/*.c*)

idf_component_register(
SRCS ${SOURCE_FILES}
INCLUDE_DIRS "Source"
REQUIRES Tactility esp_lvgl_port ILI934x CST816S PwmBacklight driver vfs fatfs
REQUIRES TactilityKernel driver
)
30 changes: 0 additions & 30 deletions Devices/cyd-2432s024c/Source/Configuration.cpp

This file was deleted.

45 changes: 0 additions & 45 deletions Devices/cyd-2432s024c/Source/devices/Display.cpp

This file was deleted.

18 changes: 0 additions & 18 deletions Devices/cyd-2432s024c/Source/devices/Display.h

This file was deleted.

23 changes: 0 additions & 23 deletions Devices/cyd-2432s024c/Source/module.cpp

This file was deleted.

33 changes: 29 additions & 4 deletions Devices/cyd-2432s024c/cyd,2432s024c.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#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/esp32_ledc_backlight.h>
#include <bindings/ili9341.h>
#include <bindings/cst816s.h>

/ {
compatible = "root";
Expand All @@ -28,6 +30,22 @@
clock-frequency = <400000>;
pin-sda = <&gpio0 33 GPIO_FLAG_NONE>;
pin-scl = <&gpio0 32 GPIO_FLAG_NONE>;

touch {
compatible = "hynitron,cst816s";
reg = <0x15>;
x-max = <240>;
y-max = <320>;
};
};

display_backlight {
compatible = "espressif,esp32-ledc-backlight";
// Off by default so display power-on won't show the screen from before the last power loss.
// The display backlight is turned on during the boot process.
status = "disabled";
pin-backlight = <&gpio0 27 GPIO_FLAG_NONE>;
frequency-hz = <512>;
};

spi0 {
Expand All @@ -36,9 +54,16 @@
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";

display@0 {
compatible = "ilitek,ili9341";
horizontal-resolution = <240>;
vertical-resolution = <320>;
mirror-x;
bgr-order;
pixel-clock-hz = <40000000>;
pin-dc = <&gpio0 2 GPIO_FLAG_NONE>;
backlight = <&display_backlight>;
};
};

Expand Down
2 changes: 2 additions & 0 deletions Devices/cyd-2432s024c/device.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ hardware.target=ESP32
hardware.flashSize=4MB
hardware.spiRam=false

dependencies.useDeprecatedHal=false

storage.userDataLocation=SD

display.size=2.4"
Expand Down
2 changes: 2 additions & 0 deletions Devices/cyd-2432s024c/devicetree.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
dependencies:
- Platforms/platform-esp32
- Drivers/ili9341-module
- Drivers/cst816s-module
dts: cyd,2432s024c.dts
33 changes: 33 additions & 0 deletions Devices/cyd-2432s024c/source/module.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include <tactility/module.h>
#include <tactility/error.h>

#include <driver/gpio.h>

extern "C" {

static error_t start() {
// Set the RGB LED pins to output and turn them off (0 on, 1 off)
gpio_set_direction(GPIO_NUM_4, GPIO_MODE_OUTPUT); // Red
gpio_set_direction(GPIO_NUM_16, GPIO_MODE_OUTPUT); // Green
gpio_set_direction(GPIO_NUM_17, GPIO_MODE_OUTPUT); // Blue

gpio_set_level(GPIO_NUM_4, 1); // Red
gpio_set_level(GPIO_NUM_16, 1); // Green
gpio_set_level(GPIO_NUM_17, 1); // Blue

return ERROR_NONE;
}

static error_t stop() {
return ERROR_NONE;
}

Module cyd_2432s024c_module = {
.name = "cyd-2432s024c",
.start = start,
.stop = stop,
.symbols = nullptr,
.internal = nullptr
};

}
5 changes: 2 additions & 3 deletions Devices/elecrow-crowpanel-advance-35/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
file(GLOB_RECURSE SOURCE_FILES Source/*.c*)
file(GLOB_RECURSE SOURCE_FILES source/*.c*)

idf_component_register(
SRCS ${SOURCE_FILES}
INCLUDE_DIRS "Source"
REQUIRES Tactility esp_lvgl_port ILI9488 GT911 PwmBacklight driver
REQUIRES TactilityKernel driver
)
21 changes: 0 additions & 21 deletions Devices/elecrow-crowpanel-advance-35/Source/Configuration.cpp

This file was deleted.

41 changes: 0 additions & 41 deletions Devices/elecrow-crowpanel-advance-35/Source/devices/Display.cpp

This file was deleted.

12 changes: 0 additions & 12 deletions Devices/elecrow-crowpanel-advance-35/Source/devices/Display.h

This file was deleted.

2 changes: 2 additions & 0 deletions Devices/elecrow-crowpanel-advance-35/device.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ hardware.tinyUsb=true
hardware.esptoolFlashFreq=120M
hardware.bluetooth=true
dependencies.useDeprecatedHal=false
storage.userDataLocation=SD
display.size=3.5"
Expand Down
2 changes: 2 additions & 0 deletions Devices/elecrow-crowpanel-advance-35/devicetree.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
dependencies:
- Platforms/platform-esp32
- Drivers/ili9488-module
- Drivers/gt911-module
dts: elecrow,crowpanel-advance-35.dts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
#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/esp32_ledc_backlight.h>
#include <bindings/ili9488.h>
#include <bindings/gt911.h>

/ {
compatible = "root";
Expand All @@ -35,6 +37,22 @@
clock-frequency = <400000>;
pin-sda = <&gpio0 15 GPIO_FLAG_NONE>;
pin-scl = <&gpio0 16 GPIO_FLAG_NONE>;

touch {
compatible = "goodix,gt911";
reg = <0x5D>;
x-max = <320>;
y-max = <480>;
};
};

display_backlight {
compatible = "espressif,esp32-ledc-backlight";
// Off by default so display power-on won't show the screen from before the last power loss.
// The display backlight is turned on during the boot process.
status = "disabled";
pin-backlight = <&gpio0 38 GPIO_FLAG_NONE>;
frequency-hz = <512>;
Comment thread
KenVanHoeylandt marked this conversation as resolved.
};

spi0 {
Expand All @@ -43,9 +61,16 @@
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";

display@0 {
compatible = "ilitek,ili9488";
horizontal-resolution = <320>;
vertical-resolution = <480>;
invert-color;
color-conversion-buffer-size = <15360>;
pixel-clock-hz = <40000000>;
pin-dc = <&gpio0 41 GPIO_FLAG_NONE>;
backlight = <&display_backlight>;
};
};

Expand Down
Loading
Loading