├── .clang-format ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ └── question.md ├── PULL_REQUEST_TEMPLATE │ └── pull_request_template.md ├── actions │ ├── build-firmware │ │ └── action.yml │ ├── build-sdk │ │ └── action.yml │ └── build-simulator │ │ └── action.yml └── workflows │ ├── build-firmware.yml │ ├── build-sdk.yml │ ├── build-simulator.yml │ └── tests.yml ├── .gitignore ├── .gitmodules ├── App ├── CMakeLists.txt ├── Kconfig ├── Source │ ├── Boards.h │ ├── HelloWorld │ │ └── HelloWorld.cpp │ └── Main.cpp └── idf_component.yml ├── Boards ├── CYD-2432S024C │ ├── CMakeLists.txt │ └── Source │ │ ├── CYD2432S024C.cpp │ │ ├── CYD2432S024C.h │ │ └── hal │ │ ├── YellowDisplay.cpp │ │ ├── YellowDisplay.h │ │ ├── YellowDisplayConstants.h │ │ ├── YellowSdCard.cpp │ │ ├── YellowSdCard.h │ │ └── YellowTouchConstants.h ├── CYD-2432S032C │ ├── CMakeLists.txt │ └── Source │ │ ├── CYD2432S032C.cpp │ │ ├── CYD2432S032C.h │ │ └── hal │ │ ├── CydDisplay.cpp │ │ ├── CydDisplay.h │ │ ├── CydSdCard.cpp │ │ └── CydSdCard.h ├── CYD-4848S040C │ ├── CMakeLists.txt │ └── Source │ │ ├── CYD4848S040C.cpp │ │ ├── CYD4848S040C.h │ │ └── hal │ │ ├── CydDisplay.cpp │ │ ├── CydDisplay.h │ │ ├── CydSdCard.cpp │ │ └── CydSdCard.h ├── CYD-8048S043C │ ├── CMakeLists.txt │ └── Source │ │ ├── CYD8048S043C.cpp │ │ ├── CYD8048S043C.h │ │ └── hal │ │ ├── CydDisplay.cpp │ │ ├── CydDisplay.h │ │ ├── CydSdCard.cpp │ │ └── CydSdCard.h ├── CYD-JC2432W328C │ ├── CMakeLists.txt │ └── Source │ │ ├── JC2432W328C.cpp │ │ ├── JC2432W328C.h │ │ └── hal │ │ ├── YellowDisplay.cpp │ │ ├── YellowDisplay.h │ │ ├── YellowDisplayConstants.h │ │ ├── YellowSdCard.cpp │ │ └── YellowSdCard.h ├── CYD-JC8048W550C │ ├── CMakeLists.txt │ └── Source │ │ ├── JC8048W550C.cpp │ │ ├── JC8048W550C.h │ │ └── hal │ │ ├── CydDisplay.cpp │ │ ├── CydDisplay.h │ │ ├── CydSdCard.cpp │ │ └── CydSdCard.h ├── ElecrowCrowpanelAdvance28 │ ├── CMakeLists.txt │ └── Source │ │ ├── CrowPanelAdvance28.cpp │ │ ├── CrowPanelAdvance28.h │ │ └── hal │ │ ├── CrowPanelDisplay.cpp │ │ ├── CrowPanelDisplay.h │ │ ├── CrowPanelDisplayConstants.h │ │ ├── CrowPanelSdCard.cpp │ │ └── CrowPanelSdCard.h ├── ElecrowCrowpanelAdvance35 │ ├── CMakeLists.txt │ └── Source │ │ ├── CrowPanelAdvance35.cpp │ │ ├── CrowPanelAdvance35.h │ │ └── hal │ │ ├── CrowPanelDisplay.cpp │ │ ├── CrowPanelDisplay.h │ │ ├── CrowPanelDisplayConstants.h │ │ ├── CrowPanelSdCard.cpp │ │ └── CrowPanelSdCard.h ├── ElecrowCrowpanelAdvance50 │ ├── CMakeLists.txt │ └── Source │ │ ├── CrowPanelAdvance50.cpp │ │ ├── CrowPanelAdvance50.h │ │ └── hal │ │ ├── CrowPanelDisplay.cpp │ │ ├── CrowPanelDisplay.h │ │ ├── CrowPanelSdCard.cpp │ │ └── CrowPanelSdCard.h ├── ElecrowCrowpanelBasic28 │ ├── CMakeLists.txt │ └── Source │ │ ├── CrowPanelBasic28.cpp │ │ ├── CrowPanelBasic28.h │ │ └── hal │ │ ├── CrowPanelDisplay.cpp │ │ ├── CrowPanelDisplay.h │ │ ├── CrowPanelDisplayConstants.h │ │ ├── CrowPanelSdCard.cpp │ │ └── CrowPanelSdCard.h ├── ElecrowCrowpanelBasic35 │ ├── CMakeLists.txt │ └── Source │ │ ├── CrowPanelBasic35.cpp │ │ ├── CrowPanelBasic35.h │ │ └── hal │ │ ├── CrowPanelDisplay.cpp │ │ ├── CrowPanelDisplay.h │ │ ├── CrowPanelDisplayConstants.h │ │ ├── CrowPanelSdCard.cpp │ │ └── CrowPanelSdCard.h ├── ElecrowCrowpanelBasic50 │ ├── CMakeLists.txt │ └── Source │ │ ├── CrowPanelBasic50.cpp │ │ ├── CrowPanelBasic50.h │ │ └── hal │ │ ├── CrowPanelDisplay.cpp │ │ ├── CrowPanelDisplay.h │ │ ├── CrowPanelSdCard.cpp │ │ └── CrowPanelSdCard.h ├── LilygoTdeck │ ├── CMakeLists.txt │ └── Source │ │ ├── Init.cpp │ │ ├── LilygoTdeck.cpp │ │ ├── LilygoTdeck.h │ │ └── hal │ │ ├── TdeckDisplay.cpp │ │ ├── TdeckDisplay.h │ │ ├── TdeckDisplayConstants.h │ │ ├── TdeckKeyboard.cpp │ │ ├── TdeckKeyboard.h │ │ ├── TdeckPower.cpp │ │ ├── TdeckPower.h │ │ ├── TdeckSdCard.cpp │ │ └── TdeckSdCard.h ├── M5stackCore2 │ ├── CMakeLists.txt │ ├── README.md │ └── Source │ │ ├── InitBoot.cpp │ │ ├── InitBoot.h │ │ ├── M5stackCore2.cpp │ │ ├── M5stackCore2.h │ │ ├── axp192 │ │ ├── LICENSE │ │ ├── README.md │ │ ├── axp192.c │ │ ├── axp192.h │ │ └── axp192_config.h │ │ └── hal │ │ ├── Core2Display.cpp │ │ ├── Core2Display.h │ │ ├── Core2Power.cpp │ │ ├── Core2Power.h │ │ ├── Core2SdCard.cpp │ │ └── Core2SdCard.h ├── M5stackCoreS3 │ ├── CMakeLists.txt │ ├── README.md │ └── Source │ │ ├── CoreS3Constants.h │ │ ├── InitBoot.cpp │ │ ├── InitBoot.h │ │ ├── M5stackCoreS3.cpp │ │ ├── M5stackCoreS3.h │ │ └── hal │ │ ├── CoreS3Display.cpp │ │ ├── CoreS3Display.h │ │ ├── CoreS3DisplayConstants.h │ │ ├── CoreS3Power.cpp │ │ ├── CoreS3Power.h │ │ ├── CoreS3SdCard.cpp │ │ └── CoreS3SdCard.h ├── Simulator │ ├── CMakeLists.txt │ └── Source │ │ ├── FreeRTOSConfig.h │ │ ├── LvglTask.cpp │ │ ├── LvglTask.h │ │ ├── Main.cpp │ │ ├── Main.h │ │ ├── Simulator.cpp │ │ ├── Simulator.h │ │ └── hal │ │ ├── SdlDisplay.h │ │ ├── SdlKeyboard.h │ │ ├── SdlTouch.h │ │ ├── SimulatorPower.cpp │ │ ├── SimulatorPower.h │ │ └── SimulatorSdCard.h ├── UnPhone │ ├── CMakeLists.txt │ └── Source │ │ ├── PowerOn.cpp │ │ ├── UnPhone.cpp │ │ ├── UnPhone.h │ │ ├── UnPhoneFeatures.cpp │ │ ├── UnPhoneFeatures.h │ │ ├── hal │ │ ├── UnPhoneDisplay.cpp │ │ ├── UnPhoneDisplay.h │ │ ├── UnPhoneDisplayConstants.h │ │ ├── UnPhoneSdCard.cpp │ │ ├── UnPhoneSdCard.h │ │ ├── UnPhoneTouch.cpp │ │ └── UnPhoneTouch.h │ │ ├── hx8357 │ │ ├── README.md │ │ ├── disp_spi.c │ │ ├── disp_spi.h │ │ ├── hx8357.c │ │ └── hx8357.h │ │ └── lvgl_spi_conf.h └── WaveshareS3Touch43 │ ├── CMakeLists.txt │ └── Source │ ├── WaveshareS3Touch43.cpp │ ├── WaveshareS3Touch43.h │ └── hal │ ├── WaveshareDisplay.cpp │ ├── WaveshareDisplay.h │ ├── WaveshareSdCard.cpp │ └── WaveshareSdCard.h ├── Buildscripts ├── CMake │ ├── CMakeLists.txt │ └── TactilitySDK.cmake ├── Flashing │ ├── flash.ps1 │ └── flash.sh ├── board.cmake ├── build-and-release-all.sh ├── build.ps1 ├── build.sh ├── clean.sh ├── colors.cmake ├── logo.cmake ├── release-sdk-current.sh ├── release-sdk.sh ├── release-simulator.sh ├── release.ps1 ├── release.sh └── runtests.sh ├── CMakeLists.txt ├── CODING_STYLE.md ├── CONTRIBUTING.md ├── COPYRIGHT.md ├── Data ├── data │ └── test.txt ├── system │ ├── app │ │ ├── Boot │ │ │ ├── logo.png │ │ │ └── logo_usb.png │ │ ├── Launcher │ │ │ ├── icon_apps.png │ │ │ ├── icon_files.png │ │ │ └── icon_settings.png │ │ └── TimeZone │ │ │ └── search.png │ ├── app_icon_calculator_dark_mode.png │ ├── app_icon_chat_dark_mode.png │ ├── app_icon_display_settings_dark_mode.png │ ├── app_icon_fallback_dark_mode.png │ ├── app_icon_files_dark_mode.png │ ├── app_icon_gpio_dark_mode.png │ ├── app_icon_i2c_dark_mode.png │ ├── app_icon_notes_dark_mode.png │ ├── app_icon_power_settings_dark_mode.png │ ├── app_icon_settings_dark_mode.png │ ├── app_icon_system_info_dark_mode.png │ ├── app_icon_time_date_settings_dark_mode.png │ ├── service │ │ └── Statusbar │ │ │ ├── location.png │ │ │ ├── power_0.png │ │ │ ├── power_10.png │ │ │ ├── power_100.png │ │ │ ├── power_20.png │ │ │ ├── power_30.png │ │ │ ├── power_40.png │ │ │ ├── power_50.png │ │ │ ├── power_60.png │ │ │ ├── power_70.png │ │ │ ├── power_80.png │ │ │ ├── power_90.png │ │ │ ├── sdcard.png │ │ │ ├── sdcard_alert.png │ │ │ ├── wifi_off_white.png │ │ │ ├── wifi_scan_white.png │ │ │ ├── wifi_signal_medium_white.png │ │ │ ├── wifi_signal_strong_white.png │ │ │ └── wifi_signal_weak_white.png │ ├── spinner.png │ └── timezones.csv └── system_sources │ ├── App Icons.svg │ ├── Old Light Mode Icons │ ├── app_icon_calculator.png │ ├── app_icon_chat.png │ ├── app_icon_display_settings.png │ ├── app_icon_fallback.png │ ├── app_icon_files.png │ ├── app_icon_gpio.png │ ├── app_icon_i2c.png │ ├── app_icon_notes.png │ ├── app_icon_power_settings.png │ ├── app_icon_settings.png │ ├── app_icon_system_info.png │ └── app_icon_time_date_settings.png │ ├── Statusbar Battery.kra │ ├── Statusbar sdcard.kra │ ├── TactilitySpinner.svg │ ├── app │ ├── Boot │ │ ├── logo.svg │ │ └── logo_usb.svg │ ├── Launcher │ │ ├── apps.svg │ │ ├── folder.svg │ │ └── settings.svg │ ├── TimeZone │ │ └── search.svg │ └── WifiManage │ │ ├── lock.svg │ │ ├── signal_medium.svg │ │ ├── signal_strong.svg │ │ └── signal_weak.svg │ ├── app_icon_calculator.svg │ ├── app_icon_chat.svg │ ├── app_icon_gpio.svg │ ├── app_icon_notes.svg │ ├── app_icon_time_date_settings.svg │ ├── location.svg │ ├── wifi_off_white.svg │ ├── wifi_scan_white.svg │ ├── wifi_signal_medium_white.svg │ ├── wifi_signal_strong_white.svg │ └── wifi_signal_weak_white.svg ├── Documentation ├── gps.md ├── ideas.md ├── license-tactility.md ├── license-tactilitysdk.md ├── pics │ ├── screenshot-AppList.png │ ├── screenshot-Desktop.png │ ├── screenshot-Files.png │ ├── screenshot-HelloWorld.png │ ├── screenshot-Settings.png │ ├── screenshot-WifiManage.png │ └── tactility-devices.webp └── wiring.md ├── Drivers ├── AW9523 │ ├── CMakeLists.txt │ ├── README.md │ └── Source │ │ ├── Aw9523.cpp │ │ └── Aw9523.h ├── AXP2101 │ ├── CMakeLists.txt │ ├── README.md │ └── Source │ │ ├── Axp2101.cpp │ │ └── Axp2101.h ├── BQ24295 │ ├── CMakeLists.txt │ ├── README.md │ └── Source │ │ ├── Bq24295.cpp │ │ └── Bq24295.h ├── CST816S │ ├── CMakeLists.txt │ ├── README.md │ └── Source │ │ ├── Cst816Touch.h │ │ └── Cst816sTouch.cpp ├── FT5x06 │ ├── CMakeLists.txt │ ├── README.md │ └── Source │ │ ├── Ft5x06Touch.cpp │ │ └── Ft5x06Touch.h ├── FT6x36 │ ├── CMakeLists.txt │ ├── README.md │ └── Source │ │ ├── Ft6x36Touch.cpp │ │ ├── Ft6x36Touch.h │ │ └── ft6x36 │ │ ├── FT6X36.cpp │ │ ├── FT6X36.h │ │ ├── LICENSE │ │ └── README.md ├── GT911 │ ├── CMakeLists.txt │ ├── README.md │ └── Source │ │ ├── Gt911Touch.cpp │ │ └── Gt911Touch.h ├── ILI934x │ ├── CMakeLists.txt │ ├── README.md │ └── Source │ │ ├── Ili934xDisplay.cpp │ │ └── Ili934xDisplay.h ├── ILI9488 │ ├── CMakeLists.txt │ ├── README.md │ └── Source │ │ ├── Ili9488Display.cpp │ │ └── Ili9488Display.h ├── PwmBacklight │ ├── CMakeLists.txt │ ├── README.md │ └── Source │ │ ├── PwmBacklight.cpp │ │ └── PwmBacklight.h ├── RgbDisplay │ ├── CMakeLists.txt │ ├── README.md │ └── Source │ │ ├── RgbDisplay.cpp │ │ └── RgbDisplay.h ├── ST7789 │ ├── CMakeLists.txt │ ├── README.md │ └── Source │ │ ├── St7789Display.cpp │ │ └── St7789Display.h ├── TCA9534 │ ├── .gitignore │ ├── CMakeLists.txt │ ├── Kconfig.projbuild │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── component.mk │ ├── examples │ │ ├── CMakeLists.txt │ │ └── read │ │ │ └── read_tca9534.c │ ├── include │ │ └── TCA9534.h │ └── src │ │ └── TCA9534.c └── XPT2046 │ ├── CMakeLists.txt │ ├── README.md │ └── Source │ ├── Xpt2046Power.cpp │ ├── Xpt2046Power.h │ ├── Xpt2046Touch.cpp │ └── Xpt2046Touch.h ├── ExternalApps └── HelloWorld │ ├── CMakeLists.txt │ ├── build.sh │ ├── main │ ├── CMakeLists.txt │ └── Source │ │ └── main.c │ └── sdkconfig.override ├── LICENSE.md ├── Libraries ├── QRCode │ ├── .gitignore │ ├── CMakeLists.txt │ ├── LICENSE.txt │ ├── README.md │ ├── examples │ │ └── QRCode │ │ │ └── QRCode.ino │ ├── generate_table.py │ ├── keywords.txt │ ├── library.properties │ ├── src │ │ ├── qrcode.c │ │ └── qrcode.h │ └── tests │ │ ├── BitBuffer.cpp │ │ ├── BitBuffer.hpp │ │ ├── QrCode.cpp │ │ ├── QrCode.hpp │ │ ├── QrSegment.cpp │ │ ├── QrSegment.hpp │ │ ├── README.md │ │ ├── run-tests.cpp │ │ └── run.sh ├── elf_loader │ ├── CHANGELOG.md │ ├── CMakeLists.txt │ ├── Kconfig │ ├── README.md │ ├── elf_loader.cmake │ ├── idf_component.yml │ ├── include │ │ ├── esp_elf.h │ │ └── private │ │ │ ├── elf_platform.h │ │ │ ├── elf_symbol.h │ │ │ └── elf_types.h │ ├── license.txt │ ├── linker.lf │ ├── project_include.cmake │ └── src │ │ ├── arch │ │ ├── esp_elf_riscv.c │ │ └── esp_elf_xtensa.c │ │ ├── esp_elf.c │ │ ├── esp_elf_adapter.c │ │ ├── esp_elf_symbol.c │ │ └── soc │ │ └── esp_elf_esp32s2.c ├── esp_lvgl_port │ ├── CHANGELOG.md │ ├── CMakeLists.txt │ ├── README.md │ ├── docs │ │ ├── frame_buffer_settings.png │ │ └── performance.md │ ├── examples │ │ ├── i2c_oled │ │ │ ├── CMakeLists.txt │ │ │ ├── README.md │ │ │ ├── main │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Kconfig.projbuild │ │ │ │ ├── i2c_oled_example_main.c │ │ │ │ ├── idf_component.yml │ │ │ │ └── lvgl_demo_ui.c │ │ │ └── sdkconfig.defaults │ │ ├── rgb_lcd │ │ │ ├── CMakeLists.txt │ │ │ ├── README.md │ │ │ ├── main │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── idf_component.yml │ │ │ │ ├── images │ │ │ │ │ ├── .gitignore │ │ │ │ │ └── esp_logo.png │ │ │ │ └── main.c │ │ │ ├── partitions.csv │ │ │ └── sdkconfig.defaults │ │ └── touchscreen │ │ │ ├── CMakeLists.txt │ │ │ ├── README.md │ │ │ ├── main │ │ │ ├── CMakeLists.txt │ │ │ ├── idf_component.yml │ │ │ ├── images │ │ │ │ ├── .gitignore │ │ │ │ └── esp_logo.png │ │ │ └── main.c │ │ │ └── sdkconfig.defaults │ ├── idf_component.yml │ ├── images │ │ ├── img_cursor.png │ │ ├── img_cursor_20px.png │ │ ├── lvgl8 │ │ │ └── img_cursor.c │ │ └── lvgl9 │ │ │ └── img_cursor.c │ ├── include │ │ ├── esp_lvgl_port.h │ │ ├── esp_lvgl_port_button.h │ │ ├── esp_lvgl_port_compatibility.h │ │ ├── esp_lvgl_port_disp.h │ │ ├── esp_lvgl_port_knob.h │ │ ├── esp_lvgl_port_lv_blend.h │ │ ├── esp_lvgl_port_touch.h │ │ └── esp_lvgl_port_usbhid.h │ ├── license.txt │ ├── priv_include │ │ └── esp_lvgl_port_priv.h │ ├── project_include.cmake │ ├── src │ │ ├── lvgl8 │ │ │ ├── esp_lvgl_port.c │ │ │ ├── esp_lvgl_port_button.c │ │ │ ├── esp_lvgl_port_disp.c │ │ │ ├── esp_lvgl_port_knob.c │ │ │ ├── esp_lvgl_port_touch.c │ │ │ └── esp_lvgl_port_usbhid.c │ │ └── lvgl9 │ │ │ ├── esp_lvgl_port.c │ │ │ ├── esp_lvgl_port_button.c │ │ │ ├── esp_lvgl_port_disp.c │ │ │ ├── esp_lvgl_port_knob.c │ │ │ ├── esp_lvgl_port_touch.c │ │ │ ├── esp_lvgl_port_usbhid.c │ │ │ └── simd │ │ │ ├── lv_color_blend_to_argb8888_esp32.S │ │ │ ├── lv_color_blend_to_argb8888_esp32s3.S │ │ │ ├── lv_color_blend_to_rgb565_esp32.S │ │ │ ├── lv_color_blend_to_rgb565_esp32s3.S │ │ │ ├── lv_color_blend_to_rgb888_esp32.S │ │ │ ├── lv_color_blend_to_rgb888_esp32s3.S │ │ │ ├── lv_macro_memcpy.S │ │ │ ├── lv_rgb565_blend_normal_to_rgb565_esp32.S │ │ │ └── lv_rgb565_blend_normal_to_rgb565_esp32s3.S │ └── test_apps │ │ ├── lvgl_port │ │ ├── CMakeLists.txt │ │ ├── main │ │ │ ├── CMakeLists.txt │ │ │ ├── idf_component.yml │ │ │ └── test.c │ │ ├── sdkconfig.ci.asm_render │ │ └── sdkconfig.defaults │ │ └── simd │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── main │ │ ├── CMakeLists.txt │ │ ├── Kconfig.projbuild │ │ ├── lv_blend │ │ │ ├── include │ │ │ │ ├── lv_assert.h │ │ │ │ ├── lv_color.h │ │ │ │ ├── lv_color_op.h │ │ │ │ ├── lv_draw_sw_blend.h │ │ │ │ ├── lv_draw_sw_blend_to_argb8888.h │ │ │ │ ├── lv_draw_sw_blend_to_rgb565.h │ │ │ │ ├── lv_draw_sw_blend_to_rgb888.h │ │ │ │ ├── lv_log.h │ │ │ │ ├── lv_math.h │ │ │ │ ├── lv_string.h │ │ │ │ ├── lv_style.h │ │ │ │ └── lv_types.h │ │ │ └── src │ │ │ │ ├── lv_color.c │ │ │ │ ├── lv_draw_sw_blend_to_argb8888.c │ │ │ │ ├── lv_draw_sw_blend_to_rgb565.c │ │ │ │ ├── lv_draw_sw_blend_to_rgb888.c │ │ │ │ └── lv_string_builtin.c │ │ ├── lv_fill_common.h │ │ ├── lv_image_common.h │ │ ├── test_app_main.c │ │ ├── test_lv_fill_benchmark.c │ │ ├── test_lv_fill_functionality.c │ │ ├── test_lv_image_benchmark.c │ │ └── test_lv_image_functionality.c │ │ └── sdkconfig.defaults ├── lv_screenshot │ ├── CMakeLists.txt │ ├── LICENSE-original │ ├── Private │ │ ├── save_bmp.h │ │ └── save_png.h │ ├── README.md │ └── Source │ │ ├── lv_screenshot.c │ │ ├── lv_screenshot.h │ │ ├── save_bmp.c │ │ └── save_png.c ├── lvgl_conf │ ├── lv_conf_kconfig.h │ └── lv_conf_simulator.h └── minmea │ ├── CMakeLists.txt │ ├── COPYING │ ├── Include │ └── minmea.h │ ├── LICENSE.LGPL-3.0 │ ├── LICENSE.MIT │ ├── LICENSE.grants │ ├── README.md │ └── Source │ └── minmea.c ├── README.md ├── SECURITY.md ├── Tactility ├── CMakeLists.txt ├── Include │ └── Tactility │ │ ├── Assets.h │ │ ├── Partitions.h │ │ ├── Preferences.h │ │ ├── Tactility.h │ │ ├── TactilityConfig.h │ │ ├── TactilityHeadless.h │ │ ├── app │ │ ├── App.h │ │ ├── AppContext.h │ │ ├── AppManifest.h │ │ ├── ElfApp.h │ │ ├── ManifestRegistry.h │ │ ├── addgps │ │ │ └── AddGps.h │ │ ├── alertdialog │ │ │ └── AlertDialog.h │ │ ├── display │ │ │ └── DisplaySettings.h │ │ ├── filebrowser │ │ │ └── FileBrowser.h │ │ ├── fileselection │ │ │ └── FileSelection.h │ │ ├── gpssettings │ │ │ └── GpsSettings.h │ │ ├── imageviewer │ │ │ └── ImageViewer.h │ │ ├── inputdialog │ │ │ └── InputDialog.h │ │ ├── selectiondialog │ │ │ └── SelectionDialog.h │ │ ├── serialconsole │ │ │ ├── ConnectView.h │ │ │ ├── ConsoleView.h │ │ │ └── View.h │ │ ├── textviewer │ │ │ └── TextViewer.h │ │ └── wifimanage │ │ │ └── WifiManage.h │ │ ├── hal │ │ ├── Configuration.h │ │ ├── Device.h │ │ ├── Gpio.h │ │ ├── display │ │ │ └── DisplayDevice.h │ │ ├── gps │ │ │ ├── GpsConfiguration.h │ │ │ ├── GpsDevice.h │ │ │ └── Satellites.h │ │ ├── i2c │ │ │ ├── I2c.h │ │ │ ├── I2cCompat.h │ │ │ └── I2cDevice.h │ │ ├── keyboard │ │ │ └── KeyboardDevice.h │ │ ├── power │ │ │ └── PowerDevice.h │ │ ├── sdcard │ │ │ ├── SdCardDevice.h │ │ │ └── SpiSdCardDevice.h │ │ ├── spi │ │ │ ├── Spi.h │ │ │ └── SpiCompat.h │ │ ├── touch │ │ │ └── TouchDevice.h │ │ ├── uart │ │ │ ├── Configuration.h │ │ │ ├── Uart.h │ │ │ └── UartCompat.h │ │ └── usb │ │ │ └── Usb.h │ │ ├── kernel │ │ └── SystemEvents.h │ │ ├── lvgl │ │ ├── Color.h │ │ ├── Keyboard.h │ │ ├── LabelUtils.h │ │ ├── Lvgl.h │ │ ├── LvglSync.h │ │ ├── Spinner.h │ │ ├── Statusbar.h │ │ ├── Style.h │ │ └── Toolbar.h │ │ ├── service │ │ ├── Service.h │ │ ├── ServiceContext.h │ │ ├── ServiceManifest.h │ │ ├── ServiceRegistry.h │ │ ├── espnow │ │ │ └── EspNow.h │ │ ├── gps │ │ │ ├── GpsService.h │ │ │ ├── GpsState.h │ │ │ └── GpsUtil.h │ │ ├── loader │ │ │ └── Loader.h │ │ └── wifi │ │ │ ├── Wifi.h │ │ │ ├── WifiGlobals.h │ │ │ └── WifiSettings.h │ │ └── time │ │ └── Time.h ├── Private │ └── Tactility │ │ ├── InitEsp.h │ │ ├── PartitionsEsp.h │ │ ├── TactilityPrivate.h │ │ ├── app │ │ ├── AppInstance.h │ │ ├── AppInstancePaths.h │ │ ├── crashdiagnostics │ │ │ ├── CrashDiagnostics.h │ │ │ ├── QrHelpers.h │ │ │ └── QrUrl.h │ │ ├── filebrowser │ │ │ ├── State.h │ │ │ ├── SupportedFiles.h │ │ │ └── View.h │ │ ├── fileselection │ │ │ ├── FileSelectionPrivate.h │ │ │ ├── State.h │ │ │ └── View.h │ │ ├── gpio │ │ │ └── GpioHal.h │ │ ├── i2cscanner │ │ │ ├── I2cHelpers.h │ │ │ ├── I2cScanner.h │ │ │ ├── I2cScannerPrivate.h │ │ │ └── I2cScannerThread.h │ │ ├── launcher │ │ │ └── Launcher.h │ │ ├── timedatesettings │ │ │ └── TimeDateSettings.h │ │ ├── timezone │ │ │ └── TimeZone.h │ │ ├── wifiapsettings │ │ │ └── WifiApSettings.h │ │ ├── wificonnect │ │ │ ├── Bindings.h │ │ │ ├── State.h │ │ │ ├── View.h │ │ │ └── WifiConnect.h │ │ └── wifimanage │ │ │ ├── Bindings.h │ │ │ ├── State.h │ │ │ ├── View.h │ │ │ └── WifiManagePrivate.h │ │ ├── hal │ │ ├── Hal_i.h │ │ ├── gps │ │ │ ├── Cas.h │ │ │ ├── GpsInit.h │ │ │ ├── Probe.h │ │ │ ├── Ublox.h │ │ │ └── UbloxMessages.h │ │ ├── i2c │ │ │ └── I2cInit.h │ │ ├── spi │ │ │ └── SpiInit.h │ │ ├── uart │ │ │ ├── UartEsp.h │ │ │ ├── UartInit.h │ │ │ └── UartPosix.h │ │ └── usb │ │ │ └── UsbTusb.h │ │ ├── lvgl │ │ ├── EspLvglPort.h │ │ └── Init_i.h │ │ ├── network │ │ └── NtpPrivate.h │ │ ├── service │ │ ├── ServiceInstance.h │ │ ├── ServiceInstancePaths.h │ │ ├── espnow │ │ │ ├── EspNowService.h │ │ │ └── EspNowWifi.h │ │ ├── gui │ │ │ └── Gui.h │ │ └── screenshot │ │ │ ├── Screenshot.h │ │ │ └── ScreenshotTask.h │ │ └── time │ │ └── TimePrivate.h └── Source │ ├── PartitionsEsp.cpp │ ├── PreferencesEsp.cpp │ ├── PreferencesMock.cpp │ ├── Tactility.cpp │ ├── TactilityHeadless.cpp │ ├── TactilityHeadlessEsp.cpp │ ├── app │ ├── App.cpp │ ├── AppInstance.cpp │ ├── AppInstancePaths.cpp │ ├── ElfApp.cpp │ ├── ManifestRegistry.cpp │ ├── addgps │ │ └── AddGps.cpp │ ├── alertdialog │ │ └── AlertDialog.cpp │ ├── applist │ │ └── AppList.cpp │ ├── boot │ │ └── Boot.cpp │ ├── calculator │ │ └── Calculator.cpp │ ├── chat │ │ └── ChatApp.cpp │ ├── crashdiagnostics │ │ ├── CrashDiagnostics.cpp │ │ ├── QrHelpers.cpp │ │ └── QrUrl.cpp │ ├── display │ │ ├── Display.cpp │ │ └── DisplaySettings.cpp │ ├── filebrowser │ │ ├── FileBrowser.cpp │ │ ├── State.cpp │ │ ├── SupportedFiles.cpp │ │ └── View.cpp │ ├── fileselection │ │ ├── FileSelection.cpp │ │ ├── State.cpp │ │ └── View.cpp │ ├── gpio │ │ ├── Gpio.cpp │ │ └── GpioHal.cpp │ ├── gpssettings │ │ └── GpsSettings.cpp │ ├── i2cscanner │ │ ├── I2cHelpers.cpp │ │ └── I2cScanner.cpp │ ├── i2csettings │ │ └── I2cSettings.cpp │ ├── imageviewer │ │ └── ImageViewer.cpp │ ├── inputdialog │ │ └── InputDialog.cpp │ ├── launcher │ │ └── Launcher.cpp │ ├── log │ │ └── Log.cpp │ ├── notes │ │ └── Notes.cpp │ ├── power │ │ └── Power.cpp │ ├── screenshot │ │ └── Screenshot.cpp │ ├── selectiondialog │ │ └── SelectionDialog.cpp │ ├── serialconsole │ │ └── SerialConsole.cpp │ ├── settings │ │ └── Settings.cpp │ ├── systeminfo │ │ └── SystemInfo.cpp │ ├── textviewer │ │ └── TextViewer.cpp │ ├── timedatesettings │ │ └── TimeDateSettings.cpp │ ├── timezone │ │ └── TimeZone.cpp │ ├── usbsettings │ │ └── UsbSettings.cpp │ ├── wifiapsettings │ │ └── WifiApSettings.cpp │ ├── wificonnect │ │ ├── State.cpp │ │ ├── View.cpp │ │ └── WifiConnect.cpp │ └── wifimanage │ │ ├── State.cpp │ │ ├── View.cpp │ │ └── WifiManage.cpp │ ├── hal │ ├── Device.cpp │ ├── Hal.cpp │ ├── gps │ │ ├── GpsConfiguration.cpp │ │ ├── GpsDevice.cpp │ │ ├── GpsInit.cpp │ │ ├── Probe.cpp │ │ ├── Satellites.cpp │ │ └── Ublox.cpp │ ├── i2c │ │ ├── I2c.cpp │ │ └── I2cDevice.cpp │ ├── sdcard │ │ ├── SdCard.cpp │ │ └── SpiSdCardDevice.cpp │ ├── spi │ │ └── Spi.cpp │ ├── uart │ │ ├── Uart.cpp │ │ ├── UartEsp.cpp │ │ └── UartPosix.cpp │ └── usb │ │ ├── Usb.cpp │ │ ├── UsbMock.cpp │ │ └── UsbTusb.cpp │ ├── kernel │ └── SystemEvents.cpp │ ├── lvgl │ ├── Color.cpp │ ├── EspLvglPort.cpp │ ├── Init.cpp │ ├── Keyboard.cpp │ ├── LabelUtils.cpp │ ├── LvglSync.cpp │ ├── Spinner.cpp │ ├── Statusbar.cpp │ ├── Style.cpp │ └── Toolbar.cpp │ ├── network │ └── Ntp.cpp │ ├── service │ ├── ServiceInstance.cpp │ ├── ServiceInstancePaths.cpp │ ├── ServiceRegistry.cpp │ ├── espnow │ │ ├── EspNow.cpp │ │ ├── EspNowService.cpp │ │ └── EspNowWifi.cpp │ ├── gps │ │ ├── GpsConfiguration.cpp │ │ └── GpsService.cpp │ ├── gui │ │ ├── Gui.cpp │ │ ├── GuiDraw.cpp │ │ └── Keyboard.cpp │ ├── loader │ │ └── Loader.cpp │ ├── screenshot │ │ ├── Screenshot.cpp │ │ └── ScreenshotTask.cpp │ ├── sdcard │ │ └── Sdcard.cpp │ ├── statusbar │ │ └── Statusbar.cpp │ └── wifi │ │ ├── Wifi.cpp │ │ ├── WifiEsp.cpp │ │ ├── WifiMock.cpp │ │ ├── WifiSettings.cpp │ │ ├── WifiSettingsEsp.cpp │ │ └── WifiSettingsMock.cpp │ └── time │ └── Time.cpp ├── TactilityC ├── CMakeLists.txt ├── Include │ ├── tt_app.h │ ├── tt_app_alertdialog.h │ ├── tt_app_manifest.h │ ├── tt_app_selectiondialog.h │ ├── tt_bundle.h │ ├── tt_hal_i2c.h │ ├── tt_init.h │ ├── tt_lvgl_keyboard.h │ ├── tt_lvgl_spinner.h │ ├── tt_lvgl_toolbar.h │ ├── tt_message_queue.h │ ├── tt_mutex.h │ ├── tt_semaphore.h │ ├── tt_thread.h │ └── tt_timer.h └── Source │ ├── tt_app.cpp │ ├── tt_app_alertdialog.cpp │ ├── tt_app_manifest.cpp │ ├── tt_app_selectiondialog.cpp │ ├── tt_bundle.cpp │ ├── tt_hal_i2c.cpp │ ├── tt_init.cpp │ ├── tt_lvgl_keyboard.cpp │ ├── tt_lvgl_spinner.cpp │ ├── tt_lvgl_toolbar.cpp │ ├── tt_message_queue.cpp │ ├── tt_mutex.cpp │ ├── tt_semaphore.cpp │ ├── tt_thread.cpp │ └── tt_timer.cpp ├── TactilityCore ├── CMakeLists.txt ├── Include │ └── Tactility │ │ ├── Bundle.h │ │ ├── Check.h │ │ ├── CoreDefines.h │ │ ├── CoreExtraDefines.h │ │ ├── Dispatcher.h │ │ ├── DispatcherThread.h │ │ ├── EventFlag.h │ │ ├── Lock.h │ │ ├── Log.h │ │ ├── LogCommon.h │ │ ├── LogEsp.h │ │ ├── LogMessages.h │ │ ├── LogSimulator.h │ │ ├── MessageQueue.h │ │ ├── Mutex.h │ │ ├── PubSub.h │ │ ├── RtosCompat.h │ │ ├── RtosCompatEventGroups.h │ │ ├── RtosCompatSemaphore.h │ │ ├── RtosCompatTask.h │ │ ├── RtosCompatTimers.h │ │ ├── Semaphore.h │ │ ├── StreamBuffer.h │ │ ├── StringUtils.h │ │ ├── TactilityCore.h │ │ ├── TactilityCoreConfig.h │ │ ├── Thread.h │ │ ├── Timer.h │ │ ├── crypt │ │ ├── Crypt.h │ │ └── Hash.h │ │ ├── file │ │ ├── File.h │ │ └── ObjectFile.h │ │ └── kernel │ │ ├── Kernel.h │ │ ├── PanicHandler.h │ │ └── critical │ │ └── Critical.h ├── LICENSE.md ├── README.md └── Source │ ├── Bundle.cpp │ ├── Check.cpp │ ├── Dispatcher.cpp │ ├── DispatcherThread.cpp │ ├── EventFlag.cpp │ ├── Lock.cpp │ ├── Log.cpp │ ├── LogEsp.cpp │ ├── LogSimulator.cpp │ ├── MessageQueue.cpp │ ├── Mutex.cpp │ ├── PubSub.cpp │ ├── Semaphore.cpp │ ├── StreamBuffer.cpp │ ├── StringUtils.cpp │ ├── Thread.cpp │ ├── Timer.cpp │ ├── crypt │ ├── Crypt.cpp │ └── Hash.cpp │ ├── file │ ├── File.cpp │ └── ObjectFile.cpp │ └── kernel │ ├── Kernel.cpp │ ├── PanicHandler.cpp │ └── critical │ └── Critical.cpp ├── Tests ├── CMakeLists.txt ├── Include │ └── doctest.h ├── Tactility │ ├── CMakeLists.txt │ ├── HalDeviceTest.cpp │ └── Main.cpp └── TactilityCore │ ├── BundleTest.cpp │ ├── CMakeLists.txt │ ├── DispatcherTest.cpp │ ├── FileTest.cpp │ ├── LockTest.cpp │ ├── Main.cpp │ ├── MessageQueueTest.cpp │ ├── MutexTest.cpp │ ├── ObjectFileTest.cpp │ ├── SemaphoreTest.cpp │ ├── StringTest.cpp │ ├── ThreadTest.cpp │ └── TimerTest.cpp ├── partitions.csv ├── sdkconfig.board.cyd-2432s024c ├── sdkconfig.board.cyd-2432s032c ├── sdkconfig.board.cyd-4848s040c ├── sdkconfig.board.cyd-8048s043c ├── sdkconfig.board.cyd-jc2432w328c ├── sdkconfig.board.cyd-jc8048w550c ├── sdkconfig.board.elecrow-crowpanel-advance-28 ├── sdkconfig.board.elecrow-crowpanel-advance-35 ├── sdkconfig.board.elecrow-crowpanel-advance-50 ├── sdkconfig.board.elecrow-crowpanel-basic-28 ├── sdkconfig.board.elecrow-crowpanel-basic-35 ├── sdkconfig.board.elecrow-crowpanel-basic-50 ├── sdkconfig.board.lilygo-tdeck ├── sdkconfig.board.m5stack-core2 ├── sdkconfig.board.m5stack-cores3 ├── sdkconfig.board.unphone ├── sdkconfig.board.waveshare-s3-touch-43 ├── sdkconfig.defaults ├── sdkconfig.developer ├── sdkconfig.md └── version.txt /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [ByteWelder] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: bytewelder 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: 'Bug: ' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Details (please complete the following information):** 27 | - ESP type: [e.g. ESP32-S3] 28 | - Device: [e.g. LilyGo T-Deck] 29 | - Tactility version: [e.g. 0.2.0 or main branch] 30 | 31 | **Additional context** 32 | Add any other context about the problem here. 33 | Add your oops.tactility.one URL if you had a crash (scanned from QR). 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: Ask a question 4 | title: '' 5 | labels: question 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ### Checklist 2 | 3 | - [ ] I read [contribution guidelines](https://github.com/ByteWelder/Tactility/blob/main/CONTRIBUTING.md) 4 | - [ ] Code adheres to the [coding style](https://github.com/ByteWelder/Tactility/blob/main/CODING_STYLE.md) 5 | 6 | ### Description 7 | 8 | (describe what your changes are) 9 | -------------------------------------------------------------------------------- /.github/actions/build-sdk/action.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | inputs: 4 | board_id: 5 | description: The sdkconfig file to build 6 | required: true 7 | arch: 8 | description: The ESP32 SOC variant 9 | required: true 10 | 11 | runs: 12 | using: "composite" 13 | steps: 14 | - uses: actions/checkout@v4 15 | with: 16 | submodules: recursive 17 | - name: 'Board select' 18 | shell: bash 19 | run: cp sdkconfig.board.${{ inputs.board_id }} sdkconfig 20 | - name: 'Build' 21 | uses: espressif/esp-idf-ci-action@main 22 | with: 23 | esp_idf_version: v5.4 24 | target: ${{ inputs.arch }} 25 | path: './' 26 | - name: 'Release' 27 | shell: bash 28 | run: Buildscripts/release-sdk.sh release/TactilitySDK 29 | - name: 'Upload Artifact' 30 | uses: actions/upload-artifact@v4 31 | with: 32 | name: TactilitySDK-${{ inputs.arch }} 33 | path: release/TactilitySDK 34 | retention-days: 30 35 | -------------------------------------------------------------------------------- /.github/workflows/build-sdk.yml: -------------------------------------------------------------------------------- 1 | name: Build SDK 2 | on: 3 | push: 4 | branches: 5 | - main 6 | pull_request: 7 | types: [opened, synchronize, reopened] 8 | 9 | permissions: read-all 10 | 11 | jobs: 12 | esp32: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v4 16 | - name: "Build" 17 | uses: ./.github/actions/build-sdk 18 | with: 19 | board_id: cyd-2432s024c 20 | arch: esp32 21 | esp32s3: 22 | runs-on: ubuntu-latest 23 | steps: 24 | - uses: actions/checkout@v4 25 | - name: "Build" 26 | uses: ./.github/actions/build-sdk 27 | with: 28 | board_id: lilygo-tdeck 29 | arch: esp32s3 30 | -------------------------------------------------------------------------------- /.github/workflows/build-simulator.yml: -------------------------------------------------------------------------------- 1 | # Disabled because of issue: https://github.com/libsdl-org/setup-sdl/issues/23 2 | name: Build Simulator 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | types: [opened, synchronize, reopened] 9 | jobs: 10 | Build-Simulator-Linux: 11 | runs-on: ubuntu-24.04 12 | steps: 13 | - uses: actions/checkout@v4 14 | - name: "Build" 15 | uses: ./.github/actions/build-simulator 16 | with: 17 | os_name: linux 18 | platform_name: amd64 19 | publish: true 20 | Build-Simulator-macOS: 21 | runs-on: macos-latest 22 | steps: 23 | - uses: actions/checkout@v4 24 | - name: "Build" 25 | uses: ./.github/actions/build-simulator 26 | with: 27 | os_name: macos 28 | platform_name: aarch64 29 | # macOS simulator currently fails due to main thread requirement for rendering 30 | publish: false 31 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: Tests 2 | on: 3 | push: 4 | branches: 5 | - main 6 | pull_request: 7 | types: [opened, synchronize, reopened] 8 | jobs: 9 | Run: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: "Checkout repo" 13 | uses: actions/checkout@v2 14 | with: 15 | submodules: recursive 16 | - name: "Configure Project" 17 | uses: threeal/cmake-action@v1.3.0 18 | - name: "Prepare Project" 19 | run: cmake -S ./ -B build 20 | - name: "Build Tests" 21 | run: cmake --build build --target build-tests 22 | - name: "Run TactilityCore Tests" 23 | run: build/Tests/TactilityCore/TactilityCoreTests --exit 24 | - name: "Run TactilityHeadless Tests" 25 | run: build/Tests/Tactility/TactilityTests --exit 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .DS_Store 3 | 4 | build/ 5 | buildsim/ 6 | build-sim/ 7 | cmake-build-*/ 8 | CMakeCache.txt 9 | *.cbp 10 | 11 | release/ 12 | 13 | sdkconfig 14 | sdkconfig.old 15 | 16 | managed_components/ 17 | dependencies.lock 18 | 19 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Libraries/FreeRTOS-Kernel"] 2 | path = Libraries/FreeRTOS-Kernel 3 | url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git 4 | [submodule "Libraries/mbedtls"] 5 | path = Libraries/mbedtls 6 | url = https://github.com/Mbed-TLS/mbedtls.git 7 | [submodule "Libraries/lvgl"] 8 | path = Libraries/lvgl 9 | url = https://github.com/lvgl/lvgl.git 10 | [submodule "Libraries/SDL"] 11 | path = Libraries/SDL 12 | url = https://github.com/libsdl-org/SDL.git 13 | -------------------------------------------------------------------------------- /App/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | if (DEFINED ENV{ESP_IDF_VERSION}) 4 | # Read board id/project 5 | include("../Buildscripts/board.cmake") 6 | init_tactility_globals("../sdkconfig") 7 | get_property(TACTILITY_BOARD_PROJECT GLOBAL PROPERTY TACTILITY_BOARD_PROJECT) 8 | 9 | idf_component_register( 10 | SRC_DIRS "Source" 11 | "Source/HelloWorld" 12 | REQUIRES ${BOARD_COMPONENTS} 13 | REQUIRES Tactility TactilityC ${TACTILITY_BOARD_PROJECT} 14 | ) 15 | else () 16 | 17 | file(GLOB_RECURSE SOURCES "Source/*.c*") 18 | add_executable(AppSim ${SOURCES}) 19 | target_link_libraries(AppSim 20 | PRIVATE Tactility 21 | PRIVATE TactilityCore 22 | PRIVATE Simulator 23 | PRIVATE SDL2::SDL2-static SDL2-static 24 | ) 25 | 26 | add_definitions(-D_Nullable=) 27 | add_definitions(-D_Nonnull=) 28 | endif () 29 | -------------------------------------------------------------------------------- /App/Source/HelloWorld/HelloWorld.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace tt::app; 6 | 7 | class HelloWorldApp : public App { 8 | 9 | void onShow(AppContext& context, lv_obj_t* parent) override { 10 | lv_obj_t* toolbar = tt::lvgl::toolbar_create(parent, context); 11 | lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0); 12 | 13 | lv_obj_t* label = lv_label_create(parent); 14 | lv_label_set_text(label, "Hello, world!"); 15 | lv_obj_align(label, LV_ALIGN_CENTER, 0, 0); 16 | } 17 | }; 18 | 19 | extern const AppManifest hello_world_app = { 20 | .id = "HelloWorld", 21 | .name = "Hello World", 22 | .createApp = create 23 | }; 24 | -------------------------------------------------------------------------------- /App/Source/Main.cpp: -------------------------------------------------------------------------------- 1 | #include "Boards.h" 2 | #include 3 | 4 | #ifdef ESP_PLATFORM 5 | #include "tt_init.h" 6 | #endif 7 | 8 | // extern const tt::app::AppManifest hello_world_app; 9 | 10 | extern "C" { 11 | 12 | void app_main() { 13 | static const tt::Configuration config = { 14 | /** 15 | * Auto-select a board based on the ./sdkconfig.board.* file 16 | * that you copied to ./sdkconfig before you opened this project. 17 | */ 18 | .hardware = TT_BOARD_HARDWARE, 19 | .apps = { 20 | // &hello_world_app, 21 | } 22 | }; 23 | 24 | #ifdef ESP_PLATFORM 25 | tt_init_tactility_c(); // ELF bindings for side-loading on ESP32 26 | #endif 27 | 28 | tt::run(config); 29 | } 30 | 31 | } // extern 32 | -------------------------------------------------------------------------------- /App/idf_component.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | espressif/esp_lcd_ili9341: "2.0.0" 3 | atanisoft/esp_lcd_ili9488: "1.0.10" 4 | espressif/esp_lcd_touch: "1.1.2" 5 | atanisoft/esp_lcd_touch_xpt2046: "1.0.5" 6 | espressif/esp_lcd_touch_cst816s: "1.0.3" 7 | espressif/esp_lcd_touch_gt911: "1.1.3" 8 | espressif/esp_lcd_touch_ft5x06: "1.0.6~1" 9 | espressif/esp_io_expander: "1.0.1" 10 | espressif/esp_io_expander_tca95xx_16bit: "1.0.1" 11 | espressif/esp_lcd_st7701: 12 | version: "1.1.1" 13 | rules: 14 | - if: "target in [esp32s3, esp32p4]" 15 | espressif/esp_lcd_panel_io_additions: "1.0.1" 16 | espressif/esp_tinyusb: 17 | version: "1.5.0" 18 | rules: 19 | - if: "target == esp32s3" 20 | idf: '5.4' 21 | -------------------------------------------------------------------------------- /Boards/CYD-2432S024C/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port ILI934x CST816S PwmBacklight driver vfs fatfs 7 | ) 8 | -------------------------------------------------------------------------------- /Boards/CYD-2432S024C/Source/CYD2432S024C.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | // Capacitive touch version of the 2.4" yellow board 6 | extern const tt::hal::Configuration cyd_2432s024c_config; 7 | -------------------------------------------------------------------------------- /Boards/CYD-2432S024C/Source/hal/YellowDisplay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/display/DisplayDevice.h" 4 | #include 5 | 6 | std::shared_ptr createDisplay(); 7 | -------------------------------------------------------------------------------- /Boards/CYD-2432S024C/Source/hal/YellowDisplayConstants.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define TWODOTFOUR_LCD_PIN_BACKLIGHT GPIO_NUM_27 4 | 5 | // Display 6 | #define TWODOTFOUR_LCD_SPI_HOST SPI2_HOST 7 | #define TWODOTFOUR_LCD_HORIZONTAL_RESOLUTION 240 8 | #define TWODOTFOUR_LCD_VERTICAL_RESOLUTION 320 9 | #define TWODOTFOUR_LCD_DRAW_BUFFER_HEIGHT (TWODOTFOUR_LCD_VERTICAL_RESOLUTION / 10) 10 | #define TWODOTFOUR_LCD_DRAW_BUFFER_SIZE (TWODOTFOUR_LCD_HORIZONTAL_RESOLUTION * TWODOTFOUR_LCD_DRAW_BUFFER_HEIGHT) 11 | #define TWODOTFOUR_LCD_PIN_CS GPIO_NUM_15 12 | #define TWODOTFOUR_LCD_PIN_DC GPIO_NUM_2 13 | 14 | -------------------------------------------------------------------------------- /Boards/CYD-2432S024C/Source/hal/YellowSdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "YellowSdCard.h" 2 | 3 | #define TAG "twodotfour_sdcard" 4 | 5 | #include 6 | 7 | #define SDCARD_SPI_HOST SPI3_HOST 8 | #define SDCARD_PIN_CS GPIO_NUM_5 9 | 10 | using tt::hal::sdcard::SpiSdCardDevice; 11 | 12 | std::shared_ptr createYellowSdCard() { 13 | auto* configuration = new SpiSdCardDevice::Config( 14 | SDCARD_PIN_CS, 15 | GPIO_NUM_NC, 16 | GPIO_NUM_NC, 17 | GPIO_NUM_NC, 18 | SdCardDevice::MountBehaviour::AtBoot, 19 | std::make_shared(), 20 | std::vector(), 21 | SDCARD_SPI_HOST 22 | ); 23 | 24 | auto* sdcard = (SdCardDevice*) new SpiSdCardDevice( 25 | std::unique_ptr(configuration) 26 | ); 27 | 28 | return std::shared_ptr(sdcard); 29 | } 30 | 31 | -------------------------------------------------------------------------------- /Boards/CYD-2432S024C/Source/hal/YellowSdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createYellowSdCard(); 8 | 9 | -------------------------------------------------------------------------------- /Boards/CYD-2432S024C/Source/hal/YellowTouchConstants.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Touch 4 | #define TWODOTFOUR_TOUCH_I2C_PORT I2C_NUM_0 5 | 6 | -------------------------------------------------------------------------------- /Boards/CYD-2432S032C/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port ILI934x GT911 PwmBacklight driver vfs fatfs 7 | ) 8 | -------------------------------------------------------------------------------- /Boards/CYD-2432S032C/Source/CYD2432S032C.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | // Capacitive touch version of the 2.4" yellow board 6 | extern const tt::hal::Configuration cyd_2432S032c_config; 7 | -------------------------------------------------------------------------------- /Boards/CYD-2432S032C/Source/hal/CydDisplay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/display/DisplayDevice.h" 4 | #include 5 | 6 | std::shared_ptr createDisplay(); 7 | -------------------------------------------------------------------------------- /Boards/CYD-2432S032C/Source/hal/CydSdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "CydSdCard.h" 2 | 3 | #include 4 | #include 5 | 6 | #define SDCARD_SPI_HOST SPI3_HOST 7 | #define SDCARD_PIN_CS GPIO_NUM_5 8 | 9 | using tt::hal::sdcard::SpiSdCardDevice; 10 | 11 | std::shared_ptr createSdCard() { 12 | auto* configuration = new SpiSdCardDevice::Config( 13 | SDCARD_PIN_CS, 14 | GPIO_NUM_NC, 15 | GPIO_NUM_NC, 16 | GPIO_NUM_NC, 17 | SdCardDevice::MountBehaviour::AtBoot, 18 | std::make_shared(), 19 | std::vector(), 20 | SDCARD_SPI_HOST 21 | ); 22 | 23 | auto* sdcard = (SdCardDevice*) new SpiSdCardDevice( 24 | std::unique_ptr(configuration) 25 | ); 26 | 27 | return std::shared_ptr(sdcard); 28 | } 29 | 30 | -------------------------------------------------------------------------------- /Boards/CYD-2432S032C/Source/hal/CydSdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createSdCard(); 8 | 9 | -------------------------------------------------------------------------------- /Boards/CYD-4848S040C/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port esp_lcd esp_lcd_st7701 esp_lcd_panel_io_additions GT911 PwmBacklight driver vfs fatfs 7 | ) 8 | -------------------------------------------------------------------------------- /Boards/CYD-4848S040C/Source/CYD4848S040C.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | // Capacitive touch version of the 4" square yellow board 6 | extern const tt::hal::Configuration cyd_4848s040c_config; 7 | -------------------------------------------------------------------------------- /Boards/CYD-4848S040C/Source/hal/CydDisplay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/display/DisplayDevice.h" 4 | #include 5 | #include 6 | 7 | class CydDisplay : public tt::hal::display::DisplayDevice { 8 | 9 | private: 10 | 11 | esp_lcd_panel_io_handle_t ioHandle = nullptr; 12 | esp_lcd_panel_handle_t panelHandle = nullptr; 13 | lv_display_t* displayHandle = nullptr; 14 | 15 | public: 16 | 17 | std::string getName() const final { return "ST7701S"; } 18 | std::string getDescription() const final { return "RGB Display"; } 19 | 20 | bool start() override; 21 | 22 | bool stop() override; 23 | 24 | std::shared_ptr _Nullable createTouch() override; 25 | 26 | void setBacklightDuty(uint8_t backlightDuty) override; 27 | bool supportsBacklightDuty() const override { return true; } 28 | 29 | lv_display_t* _Nullable getLvglDisplay() const override { return displayHandle; } 30 | }; 31 | 32 | std::shared_ptr createDisplay(); 33 | -------------------------------------------------------------------------------- /Boards/CYD-4848S040C/Source/hal/CydSdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "CydSdCard.h" 2 | 3 | #include 4 | #include 5 | 6 | using tt::hal::sdcard::SpiSdCardDevice; 7 | 8 | std::shared_ptr createSdCard() { 9 | auto config = std::make_unique( 10 | GPIO_NUM_42, 11 | GPIO_NUM_NC, 12 | GPIO_NUM_NC, 13 | GPIO_NUM_NC, 14 | SdCardDevice::MountBehaviour::AtBoot 15 | ); 16 | 17 | auto sdcard = std::make_shared( 18 | std::move(config) 19 | ); 20 | 21 | return std::static_pointer_cast(sdcard); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /Boards/CYD-4848S040C/Source/hal/CydSdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createSdCard(); 8 | 9 | -------------------------------------------------------------------------------- /Boards/CYD-8048S043C/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port esp_lcd RgbDisplay GT911 PwmBacklight driver vfs fatfs 7 | ) 8 | -------------------------------------------------------------------------------- /Boards/CYD-8048S043C/Source/CYD8048S043C.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | // Capacitive touch version of the 4.3" yellow board 6 | extern const tt::hal::Configuration cyd_8048s043c_config; 7 | -------------------------------------------------------------------------------- /Boards/CYD-8048S043C/Source/hal/CydDisplay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/display/DisplayDevice.h" 4 | 5 | std::shared_ptr createDisplay(); 6 | -------------------------------------------------------------------------------- /Boards/CYD-8048S043C/Source/hal/CydSdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "CydSdCard.h" 2 | 3 | #include 4 | #include 5 | 6 | using tt::hal::sdcard::SpiSdCardDevice; 7 | 8 | std::shared_ptr createSdCard() { 9 | auto config = std::make_unique( 10 | GPIO_NUM_10, 11 | GPIO_NUM_NC, 12 | GPIO_NUM_NC, 13 | GPIO_NUM_NC, 14 | SdCardDevice::MountBehaviour::AtBoot 15 | ); 16 | 17 | auto sdcard = std::make_shared( 18 | std::move(config) 19 | ); 20 | 21 | return std::static_pointer_cast(sdcard); 22 | } 23 | -------------------------------------------------------------------------------- /Boards/CYD-8048S043C/Source/hal/CydSdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createSdCard(); 8 | -------------------------------------------------------------------------------- /Boards/CYD-JC2432W328C/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port ST7789 CST816S PwmBacklight driver vfs fatfs 7 | ) 8 | -------------------------------------------------------------------------------- /Boards/CYD-JC2432W328C/Source/JC2432W328C.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | // Capacitive touch version of the 2.8" yellow board 6 | extern const tt::hal::Configuration cyd_jc2432w328c_config; 7 | -------------------------------------------------------------------------------- /Boards/CYD-JC2432W328C/Source/hal/YellowDisplay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/display/DisplayDevice.h" 4 | #include 5 | 6 | std::shared_ptr createDisplay(); 7 | -------------------------------------------------------------------------------- /Boards/CYD-JC2432W328C/Source/hal/YellowDisplayConstants.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Display backlight (PWM) 4 | #define JC2432W328C_LCD_PIN_BACKLIGHT GPIO_NUM_27 5 | 6 | // Display 7 | #define JC2432W328C_LCD_SPI_HOST SPI2_HOST 8 | #define JC2432W328C_LCD_HORIZONTAL_RESOLUTION 240 9 | #define JC2432W328C_LCD_VERTICAL_RESOLUTION 320 10 | #define JC2432W328C_LCD_DRAW_BUFFER_HEIGHT (JC2432W328C_LCD_VERTICAL_RESOLUTION / 10) 11 | #define JC2432W328C_LCD_DRAW_BUFFER_SIZE (JC2432W328C_LCD_HORIZONTAL_RESOLUTION * JC2432W328C_LCD_DRAW_BUFFER_HEIGHT) 12 | #define JC2432W328C_LCD_PIN_CS GPIO_NUM_15 13 | #define JC2432W328C_LCD_PIN_DC GPIO_NUM_2 14 | 15 | -------------------------------------------------------------------------------- /Boards/CYD-JC2432W328C/Source/hal/YellowSdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "YellowSdCard.h" 2 | 3 | #define TAG "jc2432w328c_sdcard" 4 | 5 | #include 6 | #include 7 | 8 | #define SDCARD_SPI_HOST SPI3_HOST 9 | #define SDCARD_PIN_CS GPIO_NUM_5 10 | 11 | using tt::hal::sdcard::SpiSdCardDevice; 12 | 13 | std::shared_ptr createYellowSdCard() { 14 | auto* configuration = new SpiSdCardDevice::Config( 15 | SDCARD_PIN_CS, 16 | GPIO_NUM_NC, 17 | GPIO_NUM_NC, 18 | GPIO_NUM_NC, 19 | SdCardDevice::MountBehaviour::AtBoot, 20 | std::make_shared(), 21 | std::vector(), 22 | SDCARD_SPI_HOST 23 | ); 24 | 25 | auto* sdcard = (SdCardDevice*) new SpiSdCardDevice( 26 | std::unique_ptr(configuration) 27 | ); 28 | 29 | return std::shared_ptr(sdcard); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /Boards/CYD-JC2432W328C/Source/hal/YellowSdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createYellowSdCard(); 8 | 9 | -------------------------------------------------------------------------------- /Boards/CYD-JC8048W550C/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port esp_lcd RgbDisplay GT911 PwmBacklight driver vfs fatfs 7 | ) 8 | -------------------------------------------------------------------------------- /Boards/CYD-JC8048W550C/Source/JC8048W550C.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | // Capacitive touch version of the 5" black board 6 | extern const tt::hal::Configuration cyd_jc8048w550c_config; 7 | -------------------------------------------------------------------------------- /Boards/CYD-JC8048W550C/Source/hal/CydDisplay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/display/DisplayDevice.h" 4 | 5 | std::shared_ptr createDisplay(); 6 | -------------------------------------------------------------------------------- /Boards/CYD-JC8048W550C/Source/hal/CydSdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "CydSdCard.h" 2 | 3 | #include 4 | #include 5 | 6 | using tt::hal::sdcard::SpiSdCardDevice; 7 | 8 | std::shared_ptr createSdCard() { 9 | auto config = std::make_unique( 10 | GPIO_NUM_10, 11 | GPIO_NUM_NC, 12 | GPIO_NUM_NC, 13 | GPIO_NUM_NC, 14 | SdCardDevice::MountBehaviour::AtBoot, 15 | std::make_shared(), 16 | std::vector(), 17 | SPI2_HOST 18 | ); 19 | 20 | auto sdcard = std::make_shared( 21 | std::move(config) 22 | ); 23 | 24 | return std::static_pointer_cast(sdcard); 25 | } 26 | -------------------------------------------------------------------------------- /Boards/CYD-JC8048W550C/Source/hal/CydSdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createSdCard(); 8 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelAdvance28/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port FT5x06 ST7789 PwmBacklight driver 7 | ) 8 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelAdvance28/Source/CrowPanelAdvance28.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | extern const tt::hal::Configuration crowpanel_advance_28; 6 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelAdvance28/Source/hal/CrowPanelDisplayConstants.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define CROWPANEL_LCD_SPI_HOST SPI2_HOST 4 | #define CROWPANEL_LCD_PIN_CS GPIO_NUM_40 5 | #define CROWPANEL_LCD_PIN_DC GPIO_NUM_41 // RS 6 | #define CROWPANEL_LCD_HORIZONTAL_RESOLUTION 320 7 | #define CROWPANEL_LCD_VERTICAL_RESOLUTION 240 8 | #define CROWPANEL_LCD_SPI_TRANSFER_HEIGHT (CROWPANEL_LCD_VERTICAL_RESOLUTION / 10) 9 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelAdvance28/Source/hal/CrowPanelSdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "CrowPanelSdCard.h" 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | using tt::hal::sdcard::SpiSdCardDevice; 9 | 10 | #define CROWPANEL_SDCARD_PIN_CS GPIO_NUM_7 11 | 12 | std::shared_ptr createSdCard() { 13 | auto* configuration = new SpiSdCardDevice::Config( 14 | CROWPANEL_SDCARD_PIN_CS, 15 | GPIO_NUM_NC, 16 | GPIO_NUM_NC, 17 | GPIO_NUM_NC, 18 | SdCardDevice::MountBehaviour::AtBoot, 19 | tt::lvgl::getSyncLock(), 20 | {}, 21 | SPI3_HOST 22 | ); 23 | 24 | auto* sdcard = (SdCardDevice*) new SpiSdCardDevice( 25 | std::unique_ptr(configuration) 26 | ); 27 | 28 | return std::shared_ptr(sdcard); 29 | } 30 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelAdvance28/Source/hal/CrowPanelSdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createSdCard(); 8 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelAdvance35/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port ILI9488 GT911 PwmBacklight driver 7 | ) 8 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelAdvance35/Source/CrowPanelAdvance35.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | extern const tt::hal::Configuration crowpanel_advance_35; 6 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelAdvance35/Source/hal/CrowPanelDisplayConstants.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define CROWPANEL_LCD_SPI_HOST SPI2_HOST 4 | #define CROWPANEL_LCD_PIN_CS GPIO_NUM_40 5 | #define CROWPANEL_LCD_PIN_DC GPIO_NUM_41 // RS 6 | #define CROWPANEL_LCD_HORIZONTAL_RESOLUTION 320 7 | #define CROWPANEL_LCD_VERTICAL_RESOLUTION 480 8 | #define CROWPANEL_LCD_SPI_TRANSFER_HEIGHT (CROWPANEL_LCD_VERTICAL_RESOLUTION / 10) 9 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelAdvance35/Source/hal/CrowPanelSdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "CrowPanelSdCard.h" 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | using tt::hal::sdcard::SpiSdCardDevice; 9 | 10 | #define CROWPANEL_SDCARD_PIN_CS GPIO_NUM_7 11 | 12 | std::shared_ptr createSdCard() { 13 | auto* configuration = new SpiSdCardDevice::Config( 14 | CROWPANEL_SDCARD_PIN_CS, 15 | GPIO_NUM_NC, 16 | GPIO_NUM_NC, 17 | GPIO_NUM_NC, 18 | SdCardDevice::MountBehaviour::AtBoot, 19 | tt::lvgl::getSyncLock(), 20 | {}, 21 | SPI3_HOST 22 | ); 23 | 24 | auto* sdcard = (SdCardDevice*) new SpiSdCardDevice( 25 | std::unique_ptr(configuration) 26 | ); 27 | 28 | return std::shared_ptr(sdcard); 29 | } 30 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelAdvance35/Source/hal/CrowPanelSdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createSdCard(); 8 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelAdvance50/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port RgbDisplay GT911 TCA9534 driver 7 | ) 8 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelAdvance50/Source/CrowPanelAdvance50.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | extern const tt::hal::Configuration crowpanel_advance_50; 6 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelAdvance50/Source/hal/CrowPanelDisplay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/display/DisplayDevice.h" 4 | 5 | std::shared_ptr createDisplay(); 6 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelAdvance50/Source/hal/CrowPanelSdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "CrowPanelSdCard.h" 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | using tt::hal::sdcard::SpiSdCardDevice; 9 | 10 | std::shared_ptr createSdCard() { 11 | auto* configuration = new SpiSdCardDevice::Config( 12 | // See https://github.com/Elecrow-RD/CrowPanel-Advance-HMI-ESP32-AI-Display/blob/master/5.0/factory_code/factory_code.ino 13 | GPIO_NUM_0, // It's actually not connected, but in the demo pin 0 is used 14 | GPIO_NUM_NC, 15 | GPIO_NUM_NC, 16 | GPIO_NUM_NC, 17 | SdCardDevice::MountBehaviour::AtBoot 18 | ); 19 | 20 | auto* sdcard = (SdCardDevice*) new SpiSdCardDevice( 21 | std::unique_ptr(configuration) 22 | ); 23 | 24 | return std::shared_ptr(sdcard); 25 | } 26 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelAdvance50/Source/hal/CrowPanelSdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createSdCard(); 8 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelBasic28/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port ILI934x XPT2046 PwmBacklight driver 7 | ) 8 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelBasic28/Source/CrowPanelBasic28.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | extern const tt::hal::Configuration crowpanel_basic_28; 6 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelBasic28/Source/hal/CrowPanelDisplayConstants.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define CROWPANEL_LCD_SPI_HOST SPI2_HOST 4 | #define CROWPANEL_LCD_PIN_CS GPIO_NUM_15 5 | #define CROWPANEL_TOUCH_PIN_CS GPIO_NUM_33 6 | #define CROWPANEL_LCD_PIN_DC GPIO_NUM_2 // RS 7 | #define CROWPANEL_LCD_HORIZONTAL_RESOLUTION 320 8 | #define CROWPANEL_LCD_VERTICAL_RESOLUTION 240 9 | #define CROWPANEL_LCD_SPI_TRANSFER_HEIGHT (CROWPANEL_LCD_VERTICAL_RESOLUTION / 10) 10 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelBasic28/Source/hal/CrowPanelSdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "CrowPanelSdCard.h" 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | using tt::hal::sdcard::SpiSdCardDevice; 9 | 10 | std::shared_ptr createSdCard() { 11 | auto* configuration = new SpiSdCardDevice::Config( 12 | GPIO_NUM_5, 13 | GPIO_NUM_NC, 14 | GPIO_NUM_NC, 15 | GPIO_NUM_NC, 16 | SdCardDevice::MountBehaviour::AtBoot, 17 | tt::lvgl::getSyncLock(), 18 | {}, 19 | SPI3_HOST 20 | ); 21 | 22 | auto* sdcard = (SdCardDevice*) new SpiSdCardDevice( 23 | std::unique_ptr(configuration) 24 | ); 25 | 26 | return std::shared_ptr(sdcard); 27 | } 28 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelBasic28/Source/hal/CrowPanelSdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createSdCard(); 8 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelBasic35/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port ILI9488 XPT2046 PwmBacklight driver 7 | ) 8 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelBasic35/Source/CrowPanelBasic35.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | extern const tt::hal::Configuration crowpanel_basic_35; 6 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelBasic35/Source/hal/CrowPanelDisplayConstants.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define CROWPANEL_LCD_SPI_HOST SPI2_HOST 4 | #define CROWPANEL_LCD_PIN_CS GPIO_NUM_15 5 | #define CROWPANEL_TOUCH_PIN_CS GPIO_NUM_12 6 | #define CROWPANEL_LCD_PIN_DC GPIO_NUM_2 // RS 7 | #define CROWPANEL_LCD_HORIZONTAL_RESOLUTION 320 8 | #define CROWPANEL_LCD_VERTICAL_RESOLUTION 240 9 | #define CROWPANEL_LCD_SPI_TRANSFER_HEIGHT (CROWPANEL_LCD_VERTICAL_RESOLUTION / 10) 10 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelBasic35/Source/hal/CrowPanelSdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "CrowPanelSdCard.h" 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | using tt::hal::sdcard::SpiSdCardDevice; 9 | 10 | std::shared_ptr createSdCard() { 11 | auto* configuration = new SpiSdCardDevice::Config( 12 | GPIO_NUM_5, 13 | GPIO_NUM_NC, 14 | GPIO_NUM_NC, 15 | GPIO_NUM_NC, 16 | SdCardDevice::MountBehaviour::AtBoot, 17 | tt::lvgl::getSyncLock(), 18 | {}, 19 | SPI3_HOST 20 | ); 21 | 22 | auto* sdcard = (SdCardDevice*) new SpiSdCardDevice( 23 | std::unique_ptr(configuration) 24 | ); 25 | 26 | return std::shared_ptr(sdcard); 27 | } 28 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelBasic35/Source/hal/CrowPanelSdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createSdCard(); 8 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelBasic50/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port RgbDisplay GT911 PwmBacklight driver 7 | ) 8 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelBasic50/Source/CrowPanelBasic50.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | extern const tt::hal::Configuration crowpanel_basic_50; 6 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelBasic50/Source/hal/CrowPanelDisplay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/display/DisplayDevice.h" 4 | 5 | std::shared_ptr createDisplay(); 6 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelBasic50/Source/hal/CrowPanelSdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "CrowPanelSdCard.h" 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | using tt::hal::sdcard::SpiSdCardDevice; 9 | 10 | std::shared_ptr createSdCard() { 11 | auto* configuration = new SpiSdCardDevice::Config( 12 | GPIO_NUM_10, 13 | GPIO_NUM_NC, 14 | GPIO_NUM_NC, 15 | GPIO_NUM_NC, 16 | SdCardDevice::MountBehaviour::AtBoot 17 | ); 18 | 19 | auto* sdcard = (SdCardDevice*) new SpiSdCardDevice( 20 | std::unique_ptr(configuration) 21 | ); 22 | 23 | return std::shared_ptr(sdcard); 24 | } 25 | -------------------------------------------------------------------------------- /Boards/ElecrowCrowpanelBasic50/Source/hal/CrowPanelSdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createSdCard(); 8 | -------------------------------------------------------------------------------- /Boards/LilygoTdeck/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port esp_lcd ST7789 GT911 PwmBacklight driver esp_adc 7 | ) 8 | -------------------------------------------------------------------------------- /Boards/LilygoTdeck/Source/LilygoTdeck.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | extern const tt::hal::Configuration lilygo_tdeck; 6 | -------------------------------------------------------------------------------- /Boards/LilygoTdeck/Source/hal/TdeckDisplayConstants.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define TDECK_LCD_SPI_HOST SPI2_HOST 4 | #define TDECK_LCD_PIN_CS GPIO_NUM_12 5 | #define TDECK_LCD_PIN_DC GPIO_NUM_11 // RS 6 | #define TDECK_LCD_HORIZONTAL_RESOLUTION 320 7 | #define TDECK_LCD_VERTICAL_RESOLUTION 240 8 | #define TDECK_LCD_SPI_TRANSFER_HEIGHT (TDECK_LCD_VERTICAL_RESOLUTION / 10) 9 | -------------------------------------------------------------------------------- /Boards/LilygoTdeck/Source/hal/TdeckKeyboard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | class TdeckKeyboard : public tt::hal::keyboard::KeyboardDevice { 9 | 10 | private: 11 | 12 | lv_indev_t* _Nullable deviceHandle = nullptr; 13 | 14 | public: 15 | 16 | std::string getName() const final { return "T-Deck Keyboard"; } 17 | std::string getDescription() const final { return "I2C keyboard"; } 18 | 19 | bool start(lv_display_t* display) override; 20 | bool stop() override; 21 | bool isAttached() const override; 22 | lv_indev_t* _Nullable getLvglIndev() override { return deviceHandle; } 23 | }; 24 | 25 | std::shared_ptr createKeyboard(); 26 | -------------------------------------------------------------------------------- /Boards/LilygoTdeck/Source/hal/TdeckPower.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/power/PowerDevice.h" 4 | #include 5 | #include 6 | 7 | using tt::hal::power::PowerDevice; 8 | 9 | class TdeckPower : public PowerDevice { 10 | 11 | adc_oneshot_unit_handle_t adcHandle = nullptr; 12 | 13 | public: 14 | 15 | TdeckPower(); 16 | ~TdeckPower(); 17 | 18 | std::string getName() const final { return "ADC Power Measurement"; } 19 | std::string getDescription() const final { return "Power measurement interface via ADC pin"; } 20 | 21 | bool supportsMetric(MetricType type) const override; 22 | bool getMetric(MetricType type, MetricData& data) override; 23 | 24 | private: 25 | 26 | bool readBatteryVoltageSampled(uint32_t& output); 27 | bool readBatteryVoltageOnce(uint32_t& output); 28 | }; 29 | 30 | std::shared_ptr tdeck_get_power(); 31 | -------------------------------------------------------------------------------- /Boards/LilygoTdeck/Source/hal/TdeckSdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "TdeckSdCard.h" 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | using tt::hal::sdcard::SpiSdCardDevice; 9 | 10 | #define TDECK_SDCARD_PIN_CS GPIO_NUM_39 11 | #define TDECK_LCD_PIN_CS GPIO_NUM_12 12 | #define TDECK_RADIO_PIN_CS GPIO_NUM_9 13 | 14 | std::shared_ptr createTdeckSdCard() { 15 | auto* configuration = new SpiSdCardDevice::Config( 16 | TDECK_SDCARD_PIN_CS, 17 | GPIO_NUM_NC, 18 | GPIO_NUM_NC, 19 | GPIO_NUM_NC, 20 | SdCardDevice::MountBehaviour::AtBoot, 21 | tt::lvgl::getSyncLock(), 22 | { 23 | TDECK_RADIO_PIN_CS, 24 | TDECK_LCD_PIN_CS 25 | } 26 | ); 27 | 28 | auto* sdcard = (SdCardDevice*) new SpiSdCardDevice( 29 | std::unique_ptr(configuration) 30 | ); 31 | 32 | return std::shared_ptr(sdcard); 33 | } 34 | -------------------------------------------------------------------------------- /Boards/LilygoTdeck/Source/hal/TdeckSdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createTdeckSdCard(); 8 | -------------------------------------------------------------------------------- /Boards/M5stackCore2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port esp_lcd ILI934x FT6x36 driver vfs fatfs 7 | ) 8 | -------------------------------------------------------------------------------- /Boards/M5stackCore2/README.md: -------------------------------------------------------------------------------- 1 | # M5Stack Core2 2 | 3 | This board implementation concerns the original Core2 hardware and **not** the v1.1 variant. 4 | 5 | Reference implementations: 6 | - [ESP-BSP](https://github.com/espressif/esp-bsp/tree/master/bsp/m5stack_core_2) 7 | 8 | Docs: 9 | - [M5Stack.com](https://docs.m5stack.com/en/core/Core2) 10 | -------------------------------------------------------------------------------- /Boards/M5stackCore2/Source/InitBoot.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | bool initBoot(); 4 | -------------------------------------------------------------------------------- /Boards/M5stackCore2/Source/M5stackCore2.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | extern const tt::hal::Configuration m5stack_core2; 6 | -------------------------------------------------------------------------------- /Boards/M5stackCore2/Source/axp192/README.md: -------------------------------------------------------------------------------- 1 | From https://github.com/tuupola/axp192 2 | 3 | Changed some code for Tactility: 4 | - `axp192_write()` now accepts a byte value instead of a byte pointer -------------------------------------------------------------------------------- /Boards/M5stackCore2/Source/hal/Core2Display.cpp: -------------------------------------------------------------------------------- 1 | #include "Core2Display.h" 2 | 3 | #include 4 | #include 5 | 6 | std::shared_ptr createTouch() { 7 | auto configuration = std::make_unique( 8 | I2C_NUM_0, 9 | GPIO_NUM_39 10 | ); 11 | 12 | return std::make_shared(std::move(configuration)); 13 | } 14 | 15 | std::shared_ptr createDisplay() { 16 | auto touch = createTouch(); 17 | 18 | auto configuration = std::make_unique( 19 | CORE2_LCD_SPI_HOST, 20 | CORE2_LCD_PIN_CS, 21 | CORE2_LCD_PIN_DC, 22 | CORE2_LCD_HORIZONTAL_RESOLUTION, 23 | CORE2_LCD_VERTICAL_RESOLUTION, 24 | touch, 25 | false, 26 | false, 27 | false, 28 | true 29 | ); 30 | 31 | return std::make_shared(std::move(configuration)); 32 | } 33 | -------------------------------------------------------------------------------- /Boards/M5stackCore2/Source/hal/Core2Display.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/display/DisplayDevice.h" 4 | #include 5 | 6 | #define CORE2_LCD_SPI_HOST SPI2_HOST 7 | #define CORE2_LCD_PIN_CS GPIO_NUM_5 8 | #define CORE2_LCD_PIN_DC GPIO_NUM_15 9 | #define CORE2_LCD_HORIZONTAL_RESOLUTION 320 10 | #define CORE2_LCD_VERTICAL_RESOLUTION 240 11 | #define CORE2_LCD_DRAW_BUFFER_HEIGHT (CORE2_LCD_VERTICAL_RESOLUTION / 10) 12 | #define CORE2_LCD_DRAW_BUFFER_SIZE (CORE2_LCD_HORIZONTAL_RESOLUTION * CORE2_LCD_DRAW_BUFFER_HEIGHT) 13 | 14 | std::shared_ptr createDisplay(); 15 | -------------------------------------------------------------------------------- /Boards/M5stackCore2/Source/hal/Core2Power.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/power/PowerDevice.h" 4 | #include 5 | 6 | using tt::hal::power::PowerDevice; 7 | 8 | class Core2Power : public PowerDevice { 9 | 10 | public: 11 | 12 | Core2Power() = default; 13 | ~Core2Power() override = default; 14 | 15 | std::string getName() const final { return "AXP192 Power"; } 16 | std::string getDescription() const final { return "Power management via I2C"; } 17 | 18 | bool supportsMetric(MetricType type) const override; 19 | bool getMetric(MetricType type, MetricData& data) override; 20 | 21 | bool supportsChargeControl() const override { return true; } 22 | bool isAllowedToCharge() const override; 23 | void setAllowedToCharge(bool canCharge) override; 24 | }; 25 | 26 | std::shared_ptr createPower(); 27 | -------------------------------------------------------------------------------- /Boards/M5stackCore2/Source/hal/Core2SdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "Core2SdCard.h" 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | #define CORE2_SDCARD_PIN_CS GPIO_NUM_4 9 | #define CORE2_LCD_PIN_CS GPIO_NUM_5 10 | 11 | using tt::hal::sdcard::SpiSdCardDevice; 12 | 13 | std::shared_ptr createSdCard() { 14 | auto* configuration = new SpiSdCardDevice::Config( 15 | CORE2_SDCARD_PIN_CS, 16 | GPIO_NUM_NC, 17 | GPIO_NUM_NC, 18 | GPIO_NUM_NC, 19 | SdCardDevice::MountBehaviour::AtBoot, 20 | tt::lvgl::getSyncLock(), 21 | { 22 | CORE2_LCD_PIN_CS 23 | } 24 | ); 25 | 26 | auto* sdcard = (SdCardDevice*) new SpiSdCardDevice( 27 | std::unique_ptr(configuration) 28 | ); 29 | 30 | return std::shared_ptr(sdcard); 31 | } 32 | -------------------------------------------------------------------------------- /Boards/M5stackCore2/Source/hal/Core2SdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createSdCard(); 8 | -------------------------------------------------------------------------------- /Boards/M5stackCoreS3/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | SRC_DIRS "Source" "Source/hal" 3 | INCLUDE_DIRS "Source" 4 | REQUIRES Tactility esp_lvgl_port ILI934x FT5x06 AXP2101 AW9523 driver vfs fatfs 5 | ) 6 | -------------------------------------------------------------------------------- /Boards/M5stackCoreS3/README.md: -------------------------------------------------------------------------------- 1 | # M5Stack CoreS3 2 | 3 | Reference implementations: 4 | - [ESP-BSP](https://github.com/espressif/esp-bsp/tree/master/bsp/m5stack_core_s3) 5 | 6 | Docs: 7 | - [M5Stack.com](https://docs.m5stack.com/en/core/CoreS3) 8 | -------------------------------------------------------------------------------- /Boards/M5stackCoreS3/Source/CoreS3Constants.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define AXP2101_ADDRESS 0x34 4 | #define AW9523_ADDRESS 0x58 5 | -------------------------------------------------------------------------------- /Boards/M5stackCoreS3/Source/InitBoot.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | bool initBoot(); 4 | -------------------------------------------------------------------------------- /Boards/M5stackCoreS3/Source/M5stackCoreS3.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | extern const tt::hal::Configuration m5stack_cores3; 6 | -------------------------------------------------------------------------------- /Boards/M5stackCoreS3/Source/hal/CoreS3Display.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/display/DisplayDevice.h" 4 | 5 | std::shared_ptr createDisplay(); 6 | -------------------------------------------------------------------------------- /Boards/M5stackCoreS3/Source/hal/CoreS3DisplayConstants.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Display 4 | #define CORES3_LCD_SPI_HOST SPI3_HOST 5 | #define CORES3_LCD_PIN_CS GPIO_NUM_3 6 | #define CORES3_LCD_PIN_DC GPIO_NUM_35 7 | #define CORES3_LCD_HORIZONTAL_RESOLUTION 320 8 | #define CORES3_LCD_VERTICAL_RESOLUTION 240 9 | #define CORES3_LCD_DRAW_BUFFER_HEIGHT (CORES3_LCD_VERTICAL_RESOLUTION / 10) 10 | #define CORES3_LCD_DRAW_BUFFER_SIZE (CORES3_LCD_HORIZONTAL_RESOLUTION * CORES3_LCD_DRAW_BUFFER_HEIGHT) 11 | -------------------------------------------------------------------------------- /Boards/M5stackCoreS3/Source/hal/CoreS3Power.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/power/PowerDevice.h" 4 | #include 5 | #include 6 | #include 7 | 8 | using tt::hal::power::PowerDevice; 9 | 10 | class CoreS3Power final : public PowerDevice { 11 | 12 | std::shared_ptr axpDevice; 13 | 14 | public: 15 | 16 | explicit CoreS3Power(std::shared_ptr axp) : axpDevice(std::move(axp)) {} 17 | ~CoreS3Power() override = default; 18 | 19 | std::string getName() const final { return "AXP2101 Power"; } 20 | std::string getDescription() const final { return "Power management via I2C"; } 21 | 22 | bool supportsMetric(MetricType type) const override; 23 | bool getMetric(MetricType type, MetricData& data) override; 24 | 25 | bool supportsChargeControl() const override { return true; } 26 | bool isAllowedToCharge() const override; 27 | void setAllowedToCharge(bool canCharge) override; 28 | }; 29 | 30 | std::shared_ptr createPower(); 31 | -------------------------------------------------------------------------------- /Boards/M5stackCoreS3/Source/hal/CoreS3SdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "CoreS3SdCard.h" 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | #define CORES3_SDCARD_PIN_CS GPIO_NUM_4 9 | #define CORES3_LCD_PIN_CS GPIO_NUM_3 10 | 11 | using tt::hal::sdcard::SpiSdCardDevice; 12 | 13 | std::shared_ptr createSdCard() { 14 | auto* configuration = new SpiSdCardDevice::Config( 15 | CORES3_SDCARD_PIN_CS, 16 | GPIO_NUM_NC, 17 | GPIO_NUM_NC, 18 | GPIO_NUM_NC, 19 | SdCardDevice::MountBehaviour::AtBoot, 20 | tt::lvgl::getSyncLock(), 21 | { 22 | CORES3_LCD_PIN_CS 23 | }, 24 | SPI3_HOST 25 | ); 26 | 27 | auto* sdcard = (SdCardDevice*) new SpiSdCardDevice( 28 | std::unique_ptr(configuration) 29 | ); 30 | 31 | return std::shared_ptr(sdcard); 32 | } 33 | -------------------------------------------------------------------------------- /Boards/M5stackCoreS3/Source/hal/CoreS3SdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createSdCard(); 8 | -------------------------------------------------------------------------------- /Boards/Simulator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | if (NOT DEFINED ENV{ESP_IDF_VERSION}) 4 | 5 | file(GLOB_RECURSE SOURCES "Source/*.c*") 6 | file(GLOB_RECURSE HEADERS "Source/*.h*") 7 | 8 | add_library(Simulator OBJECT) 9 | 10 | target_sources(Simulator 11 | PRIVATE ${SOURCES} 12 | PUBLIC ${HEADERS} 13 | ) 14 | 15 | target_link_libraries(Simulator 16 | PRIVATE Tactility 17 | PRIVATE TactilityCore 18 | PRIVATE lvgl 19 | PRIVATE SDL2-static 20 | ) 21 | 22 | target_link_libraries(Simulator PRIVATE ${SDL2_LIBRARIES}) 23 | 24 | add_definitions(-D_Nullable=) 25 | add_definitions(-D_Nonnull=) 26 | 27 | endif() 28 | -------------------------------------------------------------------------------- /Boards/Simulator/Source/LvglTask.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | void lvgl_task_start(); 4 | bool lvgl_task_is_running(); 5 | void lvgl_task_interrupt(); 6 | -------------------------------------------------------------------------------- /Boards/Simulator/Source/Main.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | typedef void (*MainFunction)(); 4 | -------------------------------------------------------------------------------- /Boards/Simulator/Source/Simulator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Main.h" 4 | 5 | namespace simulator { 6 | /** Set the function pointer of the real app_main() */ 7 | void setMain(MainFunction mainFunction); 8 | /** The actual main task */ 9 | void freertosMain(); 10 | } 11 | 12 | extern "C" { 13 | void app_main(); // ESP-IDF's main function, implemented in the application 14 | } 15 | 16 | int main() { 17 | // Actual main function that passes on app_main() (to be executed in a FreeRTOS task) and bootstraps FreeRTOS 18 | simulator::setMain(app_main); 19 | simulator::freertosMain(); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /Boards/Simulator/Source/hal/SdlDisplay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "SdlTouch.h" 4 | #include "Tactility/hal/display/DisplayDevice.h" 5 | #include 6 | 7 | /** Hack: variable comes from LvglTask.cpp */ 8 | extern lv_disp_t* displayHandle; 9 | 10 | class SdlDisplay final : public tt::hal::display::DisplayDevice { 11 | 12 | public: 13 | 14 | std::string getName() const final { return "SDL Display"; } 15 | std::string getDescription() const final { return ""; } 16 | 17 | bool start() override { 18 | return displayHandle != nullptr; 19 | } 20 | 21 | bool stop() override { tt_crash("Not supported"); } 22 | 23 | std::shared_ptr _Nullable createTouch() override { return std::make_shared(); } 24 | 25 | lv_display_t* _Nullable getLvglDisplay() const override { return displayHandle; } 26 | }; 27 | 28 | std::shared_ptr createDisplay() { 29 | return std::make_shared(); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /Boards/Simulator/Source/hal/SdlKeyboard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | class SdlKeyboard final : public tt::hal::keyboard::KeyboardDevice { 7 | private: 8 | lv_indev_t* _Nullable handle = nullptr; 9 | 10 | public: 11 | 12 | std::string getName() const final { return "SDL Keyboard"; } 13 | std::string getDescription() const final { return "SDL keyboard device"; } 14 | 15 | bool start(lv_display_t* display) override { 16 | handle = lv_sdl_keyboard_create(); 17 | return handle != nullptr; 18 | } 19 | 20 | bool stop() override { tt_crash("Not supported"); } 21 | 22 | bool isAttached() const override { return true; } 23 | 24 | lv_indev_t* _Nullable getLvglIndev() override { return handle; } 25 | }; 26 | 27 | std::shared_ptr createKeyboard() { 28 | return std::make_shared(); 29 | } 30 | -------------------------------------------------------------------------------- /Boards/Simulator/Source/hal/SdlTouch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/touch/TouchDevice.h" 4 | #include 5 | 6 | class SdlTouch final : public tt::hal::touch::TouchDevice { 7 | private: 8 | lv_indev_t* _Nullable handle = nullptr; 9 | 10 | public: 11 | 12 | std::string getName() const final { return "SDL Pointer"; } 13 | std::string getDescription() const final { return "SDL mouse/touch pointer device"; } 14 | 15 | bool start(lv_display_t* display) override { 16 | handle = lv_sdl_mouse_create(); 17 | return handle != nullptr; 18 | } 19 | 20 | bool stop() override { tt_crash("Not supported"); } 21 | 22 | lv_indev_t* _Nullable getLvglIndev() override { return handle; } 23 | }; 24 | 25 | -------------------------------------------------------------------------------- /Boards/Simulator/Source/hal/SimulatorPower.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/power/PowerDevice.h" 4 | #include 5 | 6 | using tt::hal::power::PowerDevice; 7 | 8 | class SimulatorPower final : public PowerDevice { 9 | 10 | bool allowedToCharge = false; 11 | 12 | public: 13 | 14 | SimulatorPower() = default; 15 | ~SimulatorPower() override = default; 16 | 17 | std::string getName() const final { return "Power Mock"; } 18 | std::string getDescription() const final { return ""; } 19 | 20 | bool supportsMetric(MetricType type) const override; 21 | bool getMetric(MetricType type, MetricData& data) override; 22 | 23 | bool supportsChargeControl() const override { return true; } 24 | bool isAllowedToCharge() const override { return allowedToCharge; } 25 | void setAllowedToCharge(bool canCharge) override { allowedToCharge = canCharge; } 26 | }; 27 | 28 | std::shared_ptr simulatorPower(); 29 | -------------------------------------------------------------------------------- /Boards/UnPhone/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port esp_io_expander esp_io_expander_tca95xx_16bit BQ24295 XPT2046 7 | ) 8 | -------------------------------------------------------------------------------- /Boards/UnPhone/Source/UnPhone.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | extern const tt::hal::Configuration unPhone; 6 | -------------------------------------------------------------------------------- /Boards/UnPhone/Source/hal/UnPhoneDisplay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/display/DisplayDevice.h" 4 | #include 5 | #include 6 | 7 | class UnPhoneDisplay : public tt::hal::display::DisplayDevice { 8 | 9 | private: 10 | 11 | lv_display_t* displayHandle = nullptr; 12 | uint8_t* buffer = nullptr; 13 | 14 | public: 15 | 16 | std::string getName() const final { return "HX8357"; } 17 | std::string getDescription() const final { return "SPI display"; } 18 | 19 | bool start() override; 20 | 21 | bool stop() override; 22 | 23 | std::shared_ptr _Nullable createTouch() override; 24 | 25 | lv_display_t* _Nullable getLvglDisplay() const override { return displayHandle; } 26 | }; 27 | 28 | std::shared_ptr createDisplay(); 29 | -------------------------------------------------------------------------------- /Boards/UnPhone/Source/hal/UnPhoneDisplayConstants.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define UNPHONE_LCD_SPI_HOST SPI2_HOST 4 | #define UNPHONE_LCD_PIN_CS GPIO_NUM_48 5 | #define UNPHONE_LCD_PIN_DC GPIO_NUM_47 6 | #define UNPHONE_LCD_PIN_RESET GPIO_NUM_46 7 | #define UNPHONE_LCD_SPI_FREQUENCY 27000000 8 | #define UNPHONE_LCD_HORIZONTAL_RESOLUTION 320 9 | #define UNPHONE_LCD_VERTICAL_RESOLUTION 480 10 | #define UNPHONE_LCD_DRAW_BUFFER_HEIGHT (UNPHONE_LCD_VERTICAL_RESOLUTION / 15) 11 | #define UNPHONE_LCD_SPI_TRANSFER_HEIGHT (UNPHONE_LCD_VERTICAL_RESOLUTION / 15) 12 | -------------------------------------------------------------------------------- /Boards/UnPhone/Source/hal/UnPhoneSdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createUnPhoneSdCard(); 8 | -------------------------------------------------------------------------------- /Boards/UnPhone/Source/hal/UnPhoneTouch.cpp: -------------------------------------------------------------------------------- 1 | #include "UnPhoneTouch.h" 2 | #include "UnPhoneDisplayConstants.h" 3 | 4 | #include 5 | 6 | std::shared_ptr createTouch() { 7 | auto configuration = std::make_unique( 8 | UNPHONE_LCD_SPI_HOST, 9 | GPIO_NUM_38, 10 | 320, 11 | 480 12 | ); 13 | 14 | return std::make_shared(std::move(configuration)); 15 | } 16 | -------------------------------------------------------------------------------- /Boards/UnPhone/Source/hal/UnPhoneTouch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | extern std::shared_ptr touchInstance; 7 | 8 | std::shared_ptr createTouch(); 9 | -------------------------------------------------------------------------------- /Boards/UnPhone/Source/hx8357/README.md: -------------------------------------------------------------------------------- 1 | The files in this folder are from https://github.com/lvgl/lvgl_esp32_drivers 2 | The original license is an MIT license: https://github.com/lvgl/lvgl_esp32_drivers/blob/master/LICENSE 3 | 4 | You may use the files in this folder under the original license, or under GPL v3 from the main Tactility project. -------------------------------------------------------------------------------- /Boards/UnPhone/Source/lvgl_spi_conf.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define SPI_TFT_CLOCK_SPEED_HZ (26*1000*1000) 4 | #define SPI_TFT_SPI_MODE (0) 5 | #define DISP_SPI_CS GPIO_NUM_48 6 | #define DISP_SPI_INPUT_DELAY_NS 0 7 | 8 | -------------------------------------------------------------------------------- /Boards/WaveshareS3Touch43/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port RgbDisplay GT911 driver 7 | ) 8 | -------------------------------------------------------------------------------- /Boards/WaveshareS3Touch43/Source/WaveshareS3Touch43.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | extern const tt::hal::Configuration waveshare_s3_touch_43; 6 | -------------------------------------------------------------------------------- /Boards/WaveshareS3Touch43/Source/hal/WaveshareDisplay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/display/DisplayDevice.h" 4 | 5 | std::shared_ptr createDisplay(); 6 | -------------------------------------------------------------------------------- /Boards/WaveshareS3Touch43/Source/hal/WaveshareSdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "WaveshareSdCard.h" 2 | 3 | #include 4 | 5 | using tt::hal::sdcard::SpiSdCardDevice; 6 | 7 | std::shared_ptr createSdCard() { 8 | auto* configuration = new SpiSdCardDevice::Config( 9 | GPIO_NUM_10, 10 | GPIO_NUM_NC, 11 | GPIO_NUM_NC, 12 | GPIO_NUM_NC, 13 | SdCardDevice::MountBehaviour::AtBoot 14 | ); 15 | 16 | auto* sdcard = (SdCardDevice*) new SpiSdCardDevice( 17 | std::unique_ptr(configuration) 18 | ); 19 | 20 | return std::shared_ptr(sdcard); 21 | } 22 | -------------------------------------------------------------------------------- /Boards/WaveshareS3Touch43/Source/hal/WaveshareSdCard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/sdcard/SdCardDevice.h" 4 | 5 | using tt::hal::sdcard::SdCardDevice; 6 | 7 | std::shared_ptr createSdCard(); 8 | -------------------------------------------------------------------------------- /Buildscripts/CMake/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | INCLUDE_DIRS "Libraries/TactilityC/Include" "Libraries/lvgl/Include" 3 | ) 4 | 5 | add_prebuilt_library(TactilityC Libraries/TactilityC/Binary/libTactilityC.a) 6 | add_prebuilt_library(lvgl Libraries/lvgl/Binary/liblvgl.a) 7 | 8 | target_link_libraries(${COMPONENT_LIB} INTERFACE TactilityC) 9 | target_link_libraries(${COMPONENT_LIB} INTERFACE lvgl) 10 | -------------------------------------------------------------------------------- /Buildscripts/CMake/TactilitySDK.cmake: -------------------------------------------------------------------------------- 1 | function(tactility_project) 2 | endfunction() 3 | 4 | function(_tactility_project) 5 | endfunction() 6 | 7 | macro(tactility_project project_name) 8 | set(TACTILITY_SKIP_SPIFFS 1) 9 | 10 | include("${TACTILITY_SDK_PATH}/Libraries/elf_loader/elf_loader.cmake") 11 | project_elf($project_name) 12 | 13 | file(READ ${TACTILITY_SDK_PATH}/idf-version.txt TACTILITY_SDK_IDF_VERSION) 14 | if (NOT "$ENV{ESP_IDF_VERSION}" STREQUAL "${TACTILITY_SDK_IDF_VERSION}") 15 | message(FATAL_ERROR "ESP-IDF version of Tactility SDK (${TACTILITY_SDK_IDF_VERSION}) does not match current ESP-IDF version ($ENV{ESP_IDF_VERSION})") 16 | endif() 17 | endmacro() 18 | -------------------------------------------------------------------------------- /Buildscripts/Flashing/flash.ps1: -------------------------------------------------------------------------------- 1 | param( 2 | $port 3 | ) 4 | 5 | if ((Get-Command "esptool" -ErrorAction SilentlyContinue) -eq $null) 6 | { 7 | Write-Host "Unable to find esptool in your path. Make sure you have Python installed and on your path. Then run `pip install esptool`." 8 | } 9 | 10 | # Create flash command based on partitions 11 | $json = Get-Content .\Binaries\flasher_args.json -Raw | ConvertFrom-Json 12 | $jsonClean = $json.flash_files -replace '[\{\}\@\;]', '' 13 | $jsonClean = $jsonClean -replace '[\=]', ' ' 14 | 15 | cd Binaries 16 | $command = "esptool --port $port erase_flash" 17 | Invoke-Expression $command 18 | $command = "esptool --port $port write_flash $jsonClean" 19 | Invoke-Expression $command 20 | cd .. 21 | 22 | -------------------------------------------------------------------------------- /Buildscripts/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Usage: build.sh [boardname] 5 | # Example: build.sh lilygo-tdeck 6 | # Description: Makes a clean build for the specified board. 7 | # 8 | 9 | echoNewPhase() { 10 | echo -e "⏳ \e[36m${1}\e[0m" 11 | } 12 | 13 | fatalError() { 14 | echo -e "⚠️ \e[31m${1}\e[0m" 15 | exit 0 16 | } 17 | 18 | sdkconfig_file="sdkconfig.board.${1}" 19 | 20 | if [ $# -lt 1 ]; then 21 | fatalError "Must pass board name as first argument. (e.g. lilygo_tdeck)" 22 | fi 23 | 24 | if [ ! -f $sdkconfig_file ]; then 25 | fatalError "Board not found: ${sdkconfig_file}" 26 | fi 27 | 28 | echoNewPhase "Cleaning build folder" 29 | 30 | rm -rf build 31 | 32 | echoNewPhase "Building $sdkconfig_file" 33 | 34 | cp $sdkconfig_file sdkconfig 35 | if not idf.py build; then 36 | fatalError "Failed to build esp32s3 SDK" 37 | fi 38 | 39 | -------------------------------------------------------------------------------- /Buildscripts/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm -rf build 4 | rm -rf cmake-* 5 | 6 | -------------------------------------------------------------------------------- /Buildscripts/colors.cmake: -------------------------------------------------------------------------------- 1 | if (NOT WIN32) 2 | string(ASCII 27 Esc) 3 | set(ColorReset "${Esc}[m") 4 | set(Cyan "${Esc}[36m") 5 | set(Grey "${Esc}[37m") 6 | set(LightPurple "${Esc}[1;35m") 7 | set(White "${Esc}[1;37m") 8 | else () 9 | set(ColorReset "") 10 | set(Cyan "") 11 | set(Grey "") 12 | set(LightPurple "") 13 | set(White "") 14 | endif () 15 | -------------------------------------------------------------------------------- /Buildscripts/release-sdk-current.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Description: Releases the current build files as an SDK in release/TactilitySDK 5 | # This deployment is used when compiling apps in ./ExternalApps 6 | # 7 | 8 | ./Buildscripts/release-sdk.sh release/TactilitySDK 9 | 10 | -------------------------------------------------------------------------------- /Buildscripts/release-simulator.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Usage: release-simulator.sh [builddir] [target_path] 5 | # Example: release-simulator.sh buildsim release/Simulator-linux-amd64 6 | # Description: Releases the current simulator build files in the specified folder. 7 | # 8 | 9 | build_path=$1 10 | target_path=$2 11 | 12 | mkdir -p $target_path 13 | 14 | cp version.txt $target_path 15 | cp $build_path/App/AppSim $target_path/ 16 | cp -r Data/data $target_path/ 17 | cp -r Data/system $target_path/ 18 | -------------------------------------------------------------------------------- /Buildscripts/runtests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cmake -S ./ -B build-sim 4 | cmake --build build-sim --target build-tests -j 14 5 | build-sim/Tests/TactilityCore/TactilityCoreTests --exit 6 | build-sim/Tests/Tactility/TactilityTests --exit 7 | 8 | -------------------------------------------------------------------------------- /Data/data/test.txt: -------------------------------------------------------------------------------- 1 | This file exists to test the partition. 2 | It can be deleted when the partition contains other files. 3 | -------------------------------------------------------------------------------- /Data/system/app/Boot/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app/Boot/logo.png -------------------------------------------------------------------------------- /Data/system/app/Boot/logo_usb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app/Boot/logo_usb.png -------------------------------------------------------------------------------- /Data/system/app/Launcher/icon_apps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app/Launcher/icon_apps.png -------------------------------------------------------------------------------- /Data/system/app/Launcher/icon_files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app/Launcher/icon_files.png -------------------------------------------------------------------------------- /Data/system/app/Launcher/icon_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app/Launcher/icon_settings.png -------------------------------------------------------------------------------- /Data/system/app/TimeZone/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app/TimeZone/search.png -------------------------------------------------------------------------------- /Data/system/app_icon_calculator_dark_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app_icon_calculator_dark_mode.png -------------------------------------------------------------------------------- /Data/system/app_icon_chat_dark_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app_icon_chat_dark_mode.png -------------------------------------------------------------------------------- /Data/system/app_icon_display_settings_dark_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app_icon_display_settings_dark_mode.png -------------------------------------------------------------------------------- /Data/system/app_icon_fallback_dark_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app_icon_fallback_dark_mode.png -------------------------------------------------------------------------------- /Data/system/app_icon_files_dark_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app_icon_files_dark_mode.png -------------------------------------------------------------------------------- /Data/system/app_icon_gpio_dark_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app_icon_gpio_dark_mode.png -------------------------------------------------------------------------------- /Data/system/app_icon_i2c_dark_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app_icon_i2c_dark_mode.png -------------------------------------------------------------------------------- /Data/system/app_icon_notes_dark_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app_icon_notes_dark_mode.png -------------------------------------------------------------------------------- /Data/system/app_icon_power_settings_dark_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app_icon_power_settings_dark_mode.png -------------------------------------------------------------------------------- /Data/system/app_icon_settings_dark_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app_icon_settings_dark_mode.png -------------------------------------------------------------------------------- /Data/system/app_icon_system_info_dark_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app_icon_system_info_dark_mode.png -------------------------------------------------------------------------------- /Data/system/app_icon_time_date_settings_dark_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/app_icon_time_date_settings_dark_mode.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/location.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/power_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/power_0.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/power_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/power_10.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/power_100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/power_100.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/power_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/power_20.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/power_30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/power_30.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/power_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/power_40.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/power_50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/power_50.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/power_60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/power_60.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/power_70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/power_70.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/power_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/power_80.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/power_90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/power_90.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/sdcard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/sdcard.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/sdcard_alert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/sdcard_alert.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/wifi_off_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/wifi_off_white.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/wifi_scan_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/wifi_scan_white.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/wifi_signal_medium_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/wifi_signal_medium_white.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/wifi_signal_strong_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/wifi_signal_strong_white.png -------------------------------------------------------------------------------- /Data/system/service/Statusbar/wifi_signal_weak_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/service/Statusbar/wifi_signal_weak_white.png -------------------------------------------------------------------------------- /Data/system/spinner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system/spinner.png -------------------------------------------------------------------------------- /Data/system_sources/Old Light Mode Icons/app_icon_calculator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system_sources/Old Light Mode Icons/app_icon_calculator.png -------------------------------------------------------------------------------- /Data/system_sources/Old Light Mode Icons/app_icon_chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system_sources/Old Light Mode Icons/app_icon_chat.png -------------------------------------------------------------------------------- /Data/system_sources/Old Light Mode Icons/app_icon_display_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system_sources/Old Light Mode Icons/app_icon_display_settings.png -------------------------------------------------------------------------------- /Data/system_sources/Old Light Mode Icons/app_icon_fallback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system_sources/Old Light Mode Icons/app_icon_fallback.png -------------------------------------------------------------------------------- /Data/system_sources/Old Light Mode Icons/app_icon_files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system_sources/Old Light Mode Icons/app_icon_files.png -------------------------------------------------------------------------------- /Data/system_sources/Old Light Mode Icons/app_icon_gpio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system_sources/Old Light Mode Icons/app_icon_gpio.png -------------------------------------------------------------------------------- /Data/system_sources/Old Light Mode Icons/app_icon_i2c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system_sources/Old Light Mode Icons/app_icon_i2c.png -------------------------------------------------------------------------------- /Data/system_sources/Old Light Mode Icons/app_icon_notes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system_sources/Old Light Mode Icons/app_icon_notes.png -------------------------------------------------------------------------------- /Data/system_sources/Old Light Mode Icons/app_icon_power_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system_sources/Old Light Mode Icons/app_icon_power_settings.png -------------------------------------------------------------------------------- /Data/system_sources/Old Light Mode Icons/app_icon_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system_sources/Old Light Mode Icons/app_icon_settings.png -------------------------------------------------------------------------------- /Data/system_sources/Old Light Mode Icons/app_icon_system_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system_sources/Old Light Mode Icons/app_icon_system_info.png -------------------------------------------------------------------------------- /Data/system_sources/Old Light Mode Icons/app_icon_time_date_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system_sources/Old Light Mode Icons/app_icon_time_date_settings.png -------------------------------------------------------------------------------- /Data/system_sources/Statusbar Battery.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system_sources/Statusbar Battery.kra -------------------------------------------------------------------------------- /Data/system_sources/Statusbar sdcard.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Data/system_sources/Statusbar sdcard.kra -------------------------------------------------------------------------------- /Data/system_sources/app_icon_chat.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Data/system_sources/app_icon_gpio.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Data/system_sources/app_icon_notes.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | note-line 5 | 6 | 7 | -------------------------------------------------------------------------------- /Documentation/gps.md: -------------------------------------------------------------------------------- 1 | # GPS Reference 2 | 3 | ## Devices 4 | 5 | ### Beitian BH-222Q 6 | 7 | 115200 baud, U-Blox 10 clone, defaults to binary messages 8 | 9 | https://www.beitian.com/en/pd.jsp?id=1677 10 | 11 | ### Beitian BN-357ZF 12 | 13 | 9600 baud, L76K clone 14 | 15 | https://www.beitian.com/en/sys-pd/879.html 16 | 17 | ### GY-GPS6MV2 18 | 19 | 9600 baud, U-Blox 6 (original/clone) 20 | 21 | https://www.datasheethub.com/gy-neo6mv2-flight-control-gps-module/ 22 | 23 | ### M5Stack GPS 24 | 25 | 9600 baud, AT6558 + MAX2659 (LNA) 26 | 27 | https://docs.m5stack.com/en/unit/gps 28 | -------------------------------------------------------------------------------- /Documentation/pics/screenshot-AppList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Documentation/pics/screenshot-AppList.png -------------------------------------------------------------------------------- /Documentation/pics/screenshot-Desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Documentation/pics/screenshot-Desktop.png -------------------------------------------------------------------------------- /Documentation/pics/screenshot-Files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Documentation/pics/screenshot-Files.png -------------------------------------------------------------------------------- /Documentation/pics/screenshot-HelloWorld.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Documentation/pics/screenshot-HelloWorld.png -------------------------------------------------------------------------------- /Documentation/pics/screenshot-Settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Documentation/pics/screenshot-Settings.png -------------------------------------------------------------------------------- /Documentation/pics/screenshot-WifiManage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Documentation/pics/screenshot-WifiManage.png -------------------------------------------------------------------------------- /Documentation/pics/tactility-devices.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Documentation/pics/tactility-devices.webp -------------------------------------------------------------------------------- /Documentation/wiring.md: -------------------------------------------------------------------------------- 1 | # 4 Pin connectors 2 | 3 | Many devices have 4-pin connectors: 4 | Either a [Grove](https://docs.m5stack.com/en/start/interface/grove) connector or a [JST](https://en.wikipedia.org/wiki/JST_connector) one. 5 | 6 | Boards that implement an I2C/UART configuration for such a connector are advised to always implement both. 7 | To make it consistent, it's important that the pins are mapped in the same manner: 8 | 9 | ## I2C Pins 10 | 11 | Follow the Grove layout: 12 | 13 | Black(GND) - Red(5V) - Yellow(SDA) - White(SCL) 14 | 15 | ## I2C Pins 16 | 17 | Follow this Grove layout on the MCU board: 18 | 19 | Black(GND) - Red(5V) - Yellow(RX) - White(TX) 20 | 21 | And this Grove layout on the peripheral: 22 | 23 | Black(GND) - Red(5V) - Yellow(TX) - White(RX) 24 | -------------------------------------------------------------------------------- /Drivers/AW9523/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | SRC_DIRS "Source" 3 | INCLUDE_DIRS "Source" 4 | REQUIRES Tactility 5 | ) 6 | -------------------------------------------------------------------------------- /Drivers/AW9523/README.md: -------------------------------------------------------------------------------- 1 | # AW9523 2 | 3 | Multi-functional GPIO expander and LED driver with I2C interface. 4 | 5 | [Datasheet](https://www.alldatasheet.com/datasheet-pdf/download/1148542/AWINIC/AW9523B.html) -------------------------------------------------------------------------------- /Drivers/AW9523/Source/Aw9523.cpp: -------------------------------------------------------------------------------- 1 | #include "Aw9523.h" 2 | 3 | #define AW9523_REGISTER_P0 0x02 4 | #define AW9523_REGISTER_P1 0x03 5 | #define AW9523_REGISTER_CTL 0x11 6 | 7 | bool Aw9523::readP0(uint8_t& output) const { 8 | return readRegister8(AW9523_REGISTER_P0, output); 9 | } 10 | 11 | bool Aw9523::readP1(uint8_t& output) const { 12 | return readRegister8(AW9523_REGISTER_P1, output); 13 | } 14 | 15 | bool Aw9523::readCTL(uint8_t& output) const { 16 | return readRegister8(AW9523_REGISTER_CTL, output); 17 | } 18 | 19 | bool Aw9523::writeP0(uint8_t value) const { 20 | return writeRegister8(AW9523_REGISTER_P0, value); 21 | } 22 | 23 | bool Aw9523::writeP1(uint8_t value) const { 24 | return writeRegister8(AW9523_REGISTER_P1, value); 25 | } 26 | 27 | bool Aw9523::writeCTL(uint8_t value) const { 28 | return writeRegister8(AW9523_REGISTER_CTL, value); 29 | } 30 | 31 | bool Aw9523::bitOnP1(uint8_t bitmask) const { 32 | return bitOn(AW9523_REGISTER_P1, bitmask); 33 | } 34 | -------------------------------------------------------------------------------- /Drivers/AW9523/Source/Aw9523.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #define AW9523_ADDRESS 0x58 6 | 7 | class Aw9523 : public tt::hal::i2c::I2cDevice { 8 | 9 | public: 10 | 11 | explicit Aw9523(i2c_port_t port) : I2cDevice(port, AW9523_ADDRESS) {} 12 | 13 | std::string getName() const final { return "AW9523"; } 14 | std::string getDescription() const final { return "GPIO expander with LED driver and I2C interface."; } 15 | 16 | bool readP0(uint8_t& output) const; 17 | bool readP1(uint8_t& output) const; 18 | bool readCTL(uint8_t& output) const; 19 | 20 | bool writeP0(uint8_t value) const; 21 | bool writeP1(uint8_t value) const; 22 | bool writeCTL(uint8_t value) const; 23 | 24 | bool bitOnP1(uint8_t bitmask) const; 25 | }; 26 | -------------------------------------------------------------------------------- /Drivers/AXP2101/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | SRC_DIRS "Source" 3 | INCLUDE_DIRS "Source" 4 | REQUIRES Tactility 5 | ) 6 | -------------------------------------------------------------------------------- /Drivers/AXP2101/README.md: -------------------------------------------------------------------------------- 1 | # AXP2101 2 | 3 | Power management with I2C interface: a single cell NVDC PMU with E-gauge. 4 | 5 | - [Datasheet](http://file.whycan.com/files/members/6736/AXP2101_Datasheet_V1.0_en_3832.pdf) 6 | - [M5Unified implementation](https://github.com/m5stack/M5Unified/blob/master/src/utility/AXP2101_Class.cpp) 7 | -------------------------------------------------------------------------------- /Drivers/BQ24295/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | SRC_DIRS "Source" 3 | INCLUDE_DIRS "Source" 4 | REQUIRES Tactility 5 | ) 6 | -------------------------------------------------------------------------------- /Drivers/BQ24295/README.md: -------------------------------------------------------------------------------- 1 | # BQ24295 2 | 3 | Power management: I2C-controlled 3A single cell USB charger with narrow VDC 4.5-5.5V adjustable voltage at 1.5A synchronous boost operation. 4 | 5 | [Datasheet](https://www.ti.com/lit/ds/symlink/bq24295.pdf) 6 | -------------------------------------------------------------------------------- /Drivers/CST816S/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | SRC_DIRS "Source" 3 | INCLUDE_DIRS "Source" 4 | REQUIRES Tactility esp_lvgl_port esp_lcd_touch esp_lcd_touch_cst816s driver 5 | ) 6 | -------------------------------------------------------------------------------- /Drivers/CST816S/README.md: -------------------------------------------------------------------------------- 1 | # CST816S 2 | 3 | I2C touch driver for Tactility -------------------------------------------------------------------------------- /Drivers/FT5x06/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | SRC_DIRS "Source" 3 | INCLUDE_DIRS "Source" 4 | REQUIRES Tactility esp_lvgl_port esp_lcd_touch esp_lcd_touch_ft5x06 driver 5 | ) 6 | -------------------------------------------------------------------------------- /Drivers/FT5x06/README.md: -------------------------------------------------------------------------------- 1 | # FT5x06 2 | 3 | A Tactility driver for FT5x06 touch. 4 | -------------------------------------------------------------------------------- /Drivers/FT6x36/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c*) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | INCLUDE_DIRS "Source" 6 | REQUIRES Tactility esp_lvgl_port driver 7 | ) 8 | -------------------------------------------------------------------------------- /Drivers/FT6x36/README.md: -------------------------------------------------------------------------------- 1 | # FT6x36 2 | 3 | A Tactility driver for FT6x36 touch. 4 | -------------------------------------------------------------------------------- /Drivers/FT6x36/Source/ft6x36/README.md: -------------------------------------------------------------------------------- 1 | This project is an adaption of the code at https://github.com/martinberlin/FT6X36-IDF which is an adaptation of https://github.com/strange-v/FT6X36 2 | The original license is an MIT license and is included in this directory. 3 | 4 | Changes: 5 | - Remove Kconfig-based configuratio 6 | - Removed I2C init code 7 | - Allow for passing a different I2C port 8 | -------------------------------------------------------------------------------- /Drivers/GT911/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | SRC_DIRS "Source" 3 | INCLUDE_DIRS "Source" 4 | REQUIRES Tactility esp_lvgl_port esp_lcd_touch esp_lcd_touch_gt911 driver 5 | ) 6 | -------------------------------------------------------------------------------- /Drivers/GT911/README.md: -------------------------------------------------------------------------------- 1 | # GT911 2 | 3 | GT911 touch driver for Tactility. -------------------------------------------------------------------------------- /Drivers/ILI934x/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | SRC_DIRS "Source" 3 | INCLUDE_DIRS "Source" 4 | REQUIRES Tactility esp_lvgl_port esp_lcd esp_lcd_ili9341 driver 5 | ) 6 | -------------------------------------------------------------------------------- /Drivers/ILI934x/README.md: -------------------------------------------------------------------------------- 1 | # ILI934x 2 | 3 | A basic ESP32 LVGL driver for ILI9341 and ILI9342 displays. 4 | -------------------------------------------------------------------------------- /Drivers/ILI9488/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | SRC_DIRS "Source" 3 | INCLUDE_DIRS "Source" 4 | REQUIRES Tactility esp_lvgl_port esp_lcd esp_lcd_ili9488 driver 5 | ) 6 | -------------------------------------------------------------------------------- /Drivers/ILI9488/README.md: -------------------------------------------------------------------------------- 1 | # ILI9488 2 | 3 | A basic Tactility display driver for ILI9488 panels. 4 | 5 | **Warning:** This driver uses 3 or 18 bits per pixel in SPI mode. This requires a software pixel conversion at runtime 6 | and comes with a big performance penalty. It lowers the rate of rendering and it also requires an extra display buffer. 7 | -------------------------------------------------------------------------------- /Drivers/PwmBacklight/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | SRC_DIRS "Source" 3 | INCLUDE_DIRS "Source" 4 | REQUIRES TactilityCore driver 5 | ) 6 | -------------------------------------------------------------------------------- /Drivers/PwmBacklight/README.md: -------------------------------------------------------------------------------- 1 | # PWM Backlight Driver 2 | 3 | A very basic driver to control an LCD panel backlight with a PWM signal. 4 | -------------------------------------------------------------------------------- /Drivers/PwmBacklight/Source/PwmBacklight.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace driver::pwmbacklight { 7 | 8 | bool init(gpio_num_t pin, uint32_t frequencyHz = 40000, ledc_timer_t timer = LEDC_TIMER_0, ledc_channel_t channel = LEDC_CHANNEL_0); 9 | 10 | bool setBacklightDuty(uint8_t duty); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Drivers/RgbDisplay/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | SRC_DIRS "Source" 3 | INCLUDE_DIRS "Source" 4 | REQUIRES Tactility esp_lvgl_port esp_lcd 5 | ) 6 | -------------------------------------------------------------------------------- /Drivers/RgbDisplay/README.md: -------------------------------------------------------------------------------- 1 | # RGB Display Driver 2 | 3 | This driver is used for displays that use multiple parallel data lanes. 4 | -------------------------------------------------------------------------------- /Drivers/ST7789/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | SRC_DIRS "Source" 3 | INCLUDE_DIRS "Source" 4 | REQUIRES Tactility esp_lvgl_port esp_lcd driver 5 | ) 6 | -------------------------------------------------------------------------------- /Drivers/ST7789/README.md: -------------------------------------------------------------------------------- 1 | # ST7789 2 | 3 | A basic ESP32 LVGL driver for ST7789 displays. 4 | -------------------------------------------------------------------------------- /Drivers/TCA9534/.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Object files 5 | *.o 6 | *.ko 7 | *.obj 8 | *.elf 9 | 10 | # Linker output 11 | *.ilk 12 | *.map 13 | *.exp 14 | 15 | # Precompiled Headers 16 | *.gch 17 | *.pch 18 | 19 | # Libraries 20 | *.lib 21 | *.a 22 | *.la 23 | *.lo 24 | 25 | # Shared objects (inc. Windows DLLs) 26 | *.dll 27 | *.so 28 | *.so.* 29 | *.dylib 30 | 31 | # Executables 32 | *.exe 33 | *.out 34 | *.app 35 | *.i*86 36 | *.x86_64 37 | *.hex 38 | 39 | # Debug files 40 | *.dSYM/ 41 | *.su 42 | *.idb 43 | *.pdb 44 | 45 | # Kernel Module Compile Results 46 | *.mod* 47 | *.cmd 48 | .tmp_versions/ 49 | modules.order 50 | Module.symvers 51 | Mkfile.old 52 | dkms.conf 53 | .vscode/ 54 | .idea/ 55 | build/ 56 | cmake-build-debug-esp-idf/ -------------------------------------------------------------------------------- /Drivers/TCA9534/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCES src/*.c) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCES} 5 | INCLUDE_DIRS include 6 | REQUIRES driver 7 | ) 8 | -------------------------------------------------------------------------------- /Drivers/TCA9534/Kconfig.projbuild: -------------------------------------------------------------------------------- 1 | menu "Example Configuration" 2 | 3 | config I2C_MASTER_SCL 4 | int "SCL GPIO Num" 5 | default 6 if IDF_TARGET_ESP32C3 6 | default 19 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 7 | help 8 | GPIO number for I2C Master clock line. 9 | 10 | config I2C_MASTER_SDA 11 | int "SDA GPIO Num" 12 | default 5 if IDF_TARGET_ESP32C3 13 | default 18 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 14 | help 15 | GPIO number for I2C Master data line. 16 | 17 | endmenu 18 | -------------------------------------------------------------------------------- /Drivers/TCA9534/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a 3 | # project subdirectory. 4 | # 5 | 6 | PROJECT_NAME := i2c-simple 7 | 8 | include $(IDF_PATH)/make/project.mk 9 | -------------------------------------------------------------------------------- /Drivers/TCA9534/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main Makefile. This is basically the same as a component makefile . 3 | # 4 | -------------------------------------------------------------------------------- /Drivers/TCA9534/examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines of boilerplate have to be in your project's CMakeLists 2 | # in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.5) 4 | set(EXTRA_COMPONENT_DIRS read) 5 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 6 | project(TCA9534_Examples) 7 | -------------------------------------------------------------------------------- /Drivers/XPT2046/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | SRC_DIRS "Source" 3 | INCLUDE_DIRS "Source" 4 | REQUIRES Tactility esp_lcd_touch esp_lcd_touch_xpt2046 5 | ) 6 | -------------------------------------------------------------------------------- /Drivers/XPT2046/README.md: -------------------------------------------------------------------------------- 1 | # XPT2046 2 | 3 | A basic XPT2046 touch driver. 4 | -------------------------------------------------------------------------------- /Drivers/XPT2046/Source/Xpt2046Power.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | using tt::hal::power::PowerDevice; 7 | 8 | /** 9 | * Power management based on the voltage measurement at the LCD panel. 10 | * This estimates the battery power left. 11 | */ 12 | class Xpt2046Power : public PowerDevice { 13 | 14 | public: 15 | 16 | Xpt2046Power() = default; 17 | ~Xpt2046Power() = default; 18 | 19 | std::string getName() const final { return "XPT2046 Power Measurement"; } 20 | std::string getDescription() const final { return "Power interface via XPT2046 voltage measurement"; } 21 | 22 | bool supportsMetric(MetricType type) const override; 23 | bool getMetric(MetricType type, MetricData& data) override; 24 | 25 | private: 26 | 27 | bool readBatteryVoltageOnce(uint32_t& output) const; 28 | bool readBatteryVoltageSampled(uint32_t& output) const; 29 | }; 30 | 31 | std::shared_ptr getOrCreatePower(); 32 | -------------------------------------------------------------------------------- /ExternalApps/HelloWorld/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 4 | 5 | if (DEFINED ENV{TACTILITY_SDK_PATH}) 6 | set(TACTILITY_SDK_PATH $ENV{TACTILITY_SDK_PATH}) 7 | else() 8 | set(TACTILITY_SDK_PATH "../../release/TactilitySDK") 9 | message(WARNING "⚠️ TACTILITY_SDK_PATH environment variable is not set, defaulting to ${TACTILITY_SDK_PATH}") 10 | endif() 11 | 12 | include("${TACTILITY_SDK_PATH}/TactilitySDK.cmake") 13 | set(EXTRA_COMPONENT_DIRS ${TACTILITY_SDK_PATH}) 14 | 15 | project(HelloWorld) 16 | tactility_project(HelloWorld) 17 | -------------------------------------------------------------------------------- /ExternalApps/HelloWorld/build.sh: -------------------------------------------------------------------------------- 1 | rm sdkconfig 2 | cp ../../sdkconfig sdkconfig 3 | cat sdkconfig.override >> sdkconfig 4 | # First we must run "build" because otherwise "idf.py elf" is not a valid command 5 | idf.py build 6 | idf.py elf 7 | -------------------------------------------------------------------------------- /ExternalApps/HelloWorld/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCE_FILES Source/*.c) 2 | 3 | idf_component_register( 4 | SRCS ${SOURCE_FILES} 5 | REQUIRES TactilitySDK 6 | ) 7 | -------------------------------------------------------------------------------- /ExternalApps/HelloWorld/main/Source/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /** 5 | * Note: LVGL and Tactility methods need to be exposed manually from TactilityC/Source/tt_init.cpp 6 | * Only C is supported for now (C++ symbols fail to link) 7 | */ 8 | static void onShow(AppHandle app, void* data, lv_obj_t* parent) { 9 | lv_obj_t* toolbar = tt_lvgl_toolbar_create_for_app(parent, app); 10 | lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0); 11 | 12 | lv_obj_t* label = lv_label_create(parent); 13 | lv_label_set_text(label, "Hello, world!"); 14 | lv_obj_align(label, LV_ALIGN_CENTER, 0, 0); 15 | } 16 | 17 | ExternalAppManifest manifest = { 18 | .name = "Hello World", 19 | .onShow = onShow 20 | }; 21 | 22 | int main(int argc, char* argv[]) { 23 | tt_app_register(&manifest); 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /ExternalApps/HelloWorld/sdkconfig.override: -------------------------------------------------------------------------------- 1 | CONFIG_PARTITION_TABLE_SINGLE_APP=y 2 | CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=n 3 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # Tactility 2 | 3 | The Tactility project is available under the [GNU General Public License v3](Documentation/license-tactility.md). 4 | Distributions and forks must adhere to the license terms. 5 | 6 | The Tactility logo copyrights are owned by Ken Van Hoeylandt. 7 | Firmwares built from [the original repository](https://github.com/ByteWelder/Tactility) can be redistributed with the Tactility logo. 8 | For other usages, [contact me](https://kenvanhoeylandt.net). 9 | 10 | # TactilityC & TactilitySDK 11 | 12 | TactilityC (source & binaries) and the TactilitySDK distribution files are available under an [MIT License](Documentation/license-tactilitysdk.md). 13 | 14 | # Other licenses & copyrights 15 | 16 | See [COPYRIGHT.md](COPYRIGHT.md). 17 | 18 | # FAQ 19 | 20 | - Q: Can I build closed source applications? 21 | - A: Yes, but only if you build them as external apps with the TactilitySDK. Internal apps are part of the OS and currently remain licensed under GPL v3. 22 | -------------------------------------------------------------------------------- /Libraries/QRCode/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /Libraries/QRCode/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | if (DEFINED ENV{ESP_IDF_VERSION}) 4 | file(GLOB_RECURSE SOURCE_FILES src/*.c) 5 | 6 | idf_component_register( 7 | SRCS ${SOURCE_FILES} 8 | INCLUDE_DIRS "src/" 9 | ) 10 | 11 | if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") 12 | target_compile_options(${COMPONENT_LIB} PUBLIC -Wno-unknown-pragmas) 13 | endif() 14 | else() 15 | file(GLOB SOURCES "src/*.c") 16 | file(GLOB HEADERS "src/*.h") 17 | 18 | add_library(QRCode STATIC) 19 | 20 | target_sources(QRCode 21 | PRIVATE ${SOURCES} 22 | PUBLIC ${HEADERS} 23 | ) 24 | 25 | target_include_directories(QRCode 26 | PUBLIC src 27 | ) 28 | endif() 29 | -------------------------------------------------------------------------------- /Libraries/QRCode/keywords.txt: -------------------------------------------------------------------------------- 1 | 2 | # Datatypes (KEYWORD1) 3 | 4 | bool KEYWORD1 5 | uint8_t KEYWORD1 6 | QRCode KEYWORD1 7 | 8 | 9 | # Methods and Functions (KEYWORD2) 10 | 11 | qrcode_getBufferSize KEYWORD2 12 | qrcode_initText KEYWORD2 13 | qrcode_initBytes KEYWORD2 14 | qrcode_getModule KEYWORD2 15 | 16 | 17 | # Instances (KEYWORD2) 18 | 19 | 20 | # Constants (LITERAL1) 21 | 22 | false LITERAL1 23 | true LITERAL1 24 | 25 | ECC_LOW LITERAL1 26 | ECC_MEDIUM LITERAL1 27 | ECC_QUARTILE LITERAL1 28 | ECC_HIGH LITERAL1 29 | MODE_NUMERIC LITERAL1 30 | MODE_ALPHANUMERIC LITERAL1 31 | MODE_BYTE LITERAL1 32 | -------------------------------------------------------------------------------- /Libraries/QRCode/library.properties: -------------------------------------------------------------------------------- 1 | name=QRCode 2 | version=0.0.1 3 | author=Richard Moore 4 | maintainer=Richard Moore 5 | sentence=A simple QR code generation library. 6 | paragraph=A simple QR code generation library. 7 | category=Other 8 | url=https://github.com/ricmoo/qrcode/ 9 | architectures=* 10 | includes=qrcode.h 11 | -------------------------------------------------------------------------------- /Libraries/QRCode/tests/README.md: -------------------------------------------------------------------------------- 1 | Testing 2 | ======= 3 | 4 | The testcases work by using the Nayuki QR code generating library, generating a QR code 5 | in both libraries and comparing them. 6 | 7 | Running 8 | ------- 9 | 10 | ``` 11 | ./run.sh 12 | ``` 13 | -------------------------------------------------------------------------------- /Libraries/QRCode/tests/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | clang++ run-tests.cpp QrCode.cpp QrSegment.cpp BitBuffer.cpp ../src/qrcode.c -o test && ./test 4 | clang++ run-tests.cpp QrCode.cpp QrSegment.cpp BitBuffer.cpp ../src/qrcode.c -o test -D LOCK_VERSION=3 && ./test 5 | 6 | -------------------------------------------------------------------------------- /Libraries/elf_loader/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # ChangeLog 2 | 3 | ## v1.0.0 - 2024-12-09 4 | 5 | * Added support for the following RISC-V chips: ESP32-P4 and ESP32-C6 6 | * Added support for linking other components to ELF file 7 | * Fixed the issue of getting wrong symbol type 8 | 9 | ## v0.1.0 - 2023-08-14 10 | 11 | * Add basic ELF loader component 12 | -------------------------------------------------------------------------------- /Libraries/elf_loader/idf_component.yml: -------------------------------------------------------------------------------- 1 | version: "1.0.0" 2 | description: Espressif ELF(Executable and Linkable Format) Loader 3 | url: https://github.com/espressif/esp-iot-solution/tree/master/components/elf_loader 4 | dependencies: 5 | idf: ">=4.4.3" 6 | espressif/cmake_utilities: "0.*" 7 | examples: 8 | - path: ../../examples/elf_loader/build_elf_file_example 9 | - path: ../../examples/elf_loader/elf_loader_example 10 | sbom: 11 | supplier: 'Organization: Espressif Systems (Shanghai) CO LTD' 12 | originator: 'Organization: Espressif Systems (Shanghai) CO LTD' 13 | -------------------------------------------------------------------------------- /Libraries/elf_loader/linker.lf: -------------------------------------------------------------------------------- 1 | [sections:elf_loader_got_plt] 2 | entries: 3 | .got.plt 4 | .got 5 | 6 | [scheme:elf_loader_default] 7 | entries: 8 | elf_loader_got_plt -> flash_rodata 9 | 10 | [mapping:elf_loader] 11 | archive: * 12 | entries: 13 | * (elf_loader_default); 14 | elf_loader_got_plt -> flash_rodata KEEP() SURROUND(_esp_elf_loader_got_plt) 15 | -------------------------------------------------------------------------------- /Libraries/elf_loader/project_include.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH}) 2 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/docs/frame_buffer_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Libraries/esp_lvgl_port/docs/frame_buffer_settings.png -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/i2c_oled/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.16) 2 | 3 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 4 | project(i2c_oled) 5 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/i2c_oled/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | SRCS "i2c_oled_example_main.c" "lvgl_demo_ui.c" 3 | INCLUDE_DIRS "." 4 | REQUIRES driver 5 | ) 6 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/i2c_oled/main/idf_component.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | idf: ">=4.4" 3 | lvgl/lvgl: "^8" 4 | esp_lcd_sh1107: "^1" 5 | esp_lvgl_port: 6 | version: "*" 7 | override_path: "../../../" 8 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/i2c_oled/main/lvgl_demo_ui.c: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD 3 | * 4 | * SPDX-License-Identifier: CC0-1.0 5 | */ 6 | 7 | #include "lvgl.h" 8 | 9 | void example_lvgl_demo_ui(lv_disp_t *disp) 10 | { 11 | lv_obj_t *scr = lv_disp_get_scr_act(disp); 12 | lv_obj_t *label = lv_label_create(scr); 13 | lv_label_set_long_mode(label, LV_LABEL_LONG_SCROLL_CIRCULAR); /* Circular scroll */ 14 | lv_label_set_text(label, "Hello Espressif, Hello LVGL."); 15 | /* Size of the screen (if you use rotation 90 or 270, please set disp->driver->ver_res) */ 16 | #if LVGL_VERSION_MAJOR >= 9 17 | lv_obj_set_width(label, lv_display_get_physical_horizontal_resolution(disp)); 18 | #else 19 | lv_obj_set_width(label, disp->driver->hor_res); 20 | #endif 21 | lv_obj_align(label, LV_ALIGN_TOP_MID, 0, 0); 22 | } 23 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/i2c_oled/sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | # This file was generated using idf.py save-defconfig. It can be edited manually. 2 | # Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration 3 | # 4 | CONFIG_LV_USE_USER_DATA=y 5 | CONFIG_LV_COLOR_DEPTH_1=y 6 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/rgb_lcd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines of boilerplate have to be in your project's CMakeLists 2 | # in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.16) 4 | 5 | # "Trim" the build. Include the minimal set of components, main and anything it depends on. 6 | set(COMPONENTS main) 7 | 8 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 9 | project(rgb_lcd) 10 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/rgb_lcd/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRCS "main.c" 2 | INCLUDE_DIRS "." ${LV_DEMO_DIR}) 3 | 4 | lvgl_port_create_c_image("images/esp_logo.png" "images/" "ARGB8888" "NONE") 5 | lvgl_port_add_images(${COMPONENT_LIB} "images/") 6 | 7 | set_source_files_properties( 8 | PROPERTIES COMPILE_OPTIONS 9 | "-DLV_LVGL_H_INCLUDE_SIMPLE;-Wno-format;" 10 | ) 11 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/rgb_lcd/main/idf_component.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | idf: ">=5.0" 3 | esp_lcd_touch_gt1151: 4 | version: "^1" 5 | override_path: "../../../../lcd_touch/esp_lcd_touch_gt1151/" 6 | esp_lvgl_port: 7 | version: "*" 8 | override_path: "../../../" 9 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/rgb_lcd/main/images/.gitignore: -------------------------------------------------------------------------------- 1 | *.c -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/rgb_lcd/main/images/esp_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Libraries/esp_lvgl_port/examples/rgb_lcd/main/images/esp_logo.png -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/rgb_lcd/partitions.csv: -------------------------------------------------------------------------------- 1 | # Name, Type, SubType, Offset, Size, Flags 2 | # Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild 3 | nvs, data, nvs, 0x9000, 0x6000, 4 | phy_init, data, phy, 0xf000, 0x1000, 5 | factory, app, factory, 0x10000, 2M, 6 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/touchscreen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines of boilerplate have to be in your project's CMakeLists 2 | # in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.16) 4 | 5 | # "Trim" the build. Include the minimal set of components, main and anything it depends on. 6 | set(COMPONENTS main) 7 | 8 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 9 | project(touchscreen) 10 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/touchscreen/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRCS "main.c" 2 | INCLUDE_DIRS ".") 3 | 4 | lvgl_port_create_c_image("images/esp_logo.png" "images/" "ARGB8888" "NONE") 5 | lvgl_port_add_images(${COMPONENT_LIB} "images/") 6 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/touchscreen/main/idf_component.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | idf: ">=4.4" 3 | esp_lcd_touch_tt21100: 4 | version: "^1" 5 | override_path: "../../../../lcd_touch/esp_lcd_touch_tt21100/" 6 | esp_lvgl_port: 7 | version: "*" 8 | override_path: "../../../" 9 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/touchscreen/main/images/.gitignore: -------------------------------------------------------------------------------- 1 | *.c -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/touchscreen/main/images/esp_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Libraries/esp_lvgl_port/examples/touchscreen/main/images/esp_logo.png -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/examples/touchscreen/sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | CONFIG_IDF_TARGET="esp32s3" 2 | CONFIG_ESPTOOLPY_FLASHMODE_QIO=y 3 | CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y 4 | CONFIG_LV_COLOR_16_SWAP=y 5 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/idf_component.yml: -------------------------------------------------------------------------------- 1 | version: "2.4.4" 2 | description: ESP LVGL port 3 | url: https://github.com/espressif/esp-bsp/tree/master/components/esp_lvgl_port 4 | dependencies: 5 | idf: ">=4.4" 6 | lvgl/lvgl: 7 | version: ">=8,<10" 8 | public: true 9 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/images/img_cursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Libraries/esp_lvgl_port/images/img_cursor.png -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/images/img_cursor_20px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ByteWelder/Tactility/3dfc27e93ee75c935ab200d1d346aacf1c815a79/Libraries/esp_lvgl_port/images/img_cursor_20px.png -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/include/esp_lvgl_port_compatibility.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @file 9 | * @brief ESP LVGL port compatibility 10 | */ 11 | 12 | #pragma once 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | /** 19 | * @brief Backward compatibility with LVGL 8 20 | */ 21 | typedef lv_disp_t lv_display_t; 22 | typedef enum { 23 | LV_DISPLAY_ROTATION_0 = LV_DISP_ROT_NONE, 24 | LV_DISPLAY_ROTATION_90 = LV_DISP_ROT_90, 25 | LV_DISPLAY_ROTATION_180 = LV_DISP_ROT_180, 26 | LV_DISPLAY_ROTATION_270 = LV_DISP_ROT_270 27 | } lv_disp_rotation_t; 28 | typedef lv_disp_rotation_t lv_display_rotation_t; 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/test_apps/lvgl_port/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines of boilerplate have to be in your project's CMakeLists 2 | # in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.5) 4 | set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components") 5 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 6 | project(test_esp_lvgl_port) 7 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/test_apps/lvgl_port/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRCS "test.c") 2 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/test_apps/lvgl_port/main/idf_component.yml: -------------------------------------------------------------------------------- 1 | ## IDF Component Manager Manifest File 2 | dependencies: 3 | idf: ">=4.4" 4 | esp_lcd_touch_tt21100: 5 | version: "^1" 6 | override_path: "../../../../lcd_touch/esp_lcd_touch_tt21100/" 7 | esp_lvgl_port: 8 | version: "*" 9 | override_path: "../../../" 10 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/test_apps/lvgl_port/sdkconfig.ci.asm_render: -------------------------------------------------------------------------------- 1 | # sdkconfig to enable the SIMD in the lvgl_port 2 | 3 | # Set custom ASM render and provide a header file with function prototypes 4 | CONFIG_LV_DRAW_SW_ASM_CUSTOM=y 5 | CONFIG_LV_USE_DRAW_SW_ASM=255 6 | CONFIG_LV_DRAW_SW_ASM_CUSTOM_INCLUDE="esp_lvgl_port_lv_blend.h" 7 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/test_apps/lvgl_port/sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | CONFIG_IDF_TARGET="esp32s3" 2 | CONFIG_ESPTOOLPY_FLASHMODE_QIO=y 3 | CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y 4 | CONFIG_LV_COLOR_16_SWAP=y 5 | CONFIG_FREERTOS_HZ=1000 6 | CONFIG_ESP_TASK_WDT_EN=n 7 | CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y 8 | -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/test_apps/simd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines of boilerplate have to be in your project's 2 | # CMakeLists in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.16) 4 | 5 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 6 | 7 | project(test_lvgl_simd) -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/test_apps/simd/main/Kconfig.projbuild: -------------------------------------------------------------------------------- 1 | # Creating CONFIG_LV_DRAW_SW_ASM_CUSTOM avaliable in lvgl Kconfig to enable assembler source files by deafult 2 | 3 | config LV_DRAW_SW_ASM_CUSTOM 4 | bool 5 | default y -------------------------------------------------------------------------------- /Libraries/esp_lvgl_port/test_apps/simd/sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | CONFIG_ESP_TASK_WDT=n 2 | CONFIG_OPTIMIZATION_LEVEL_RELEASE=y 3 | CONFIG_COMPILER_OPTIMIZATION_PERF=y -------------------------------------------------------------------------------- /Libraries/lv_screenshot/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | set(CMAKE_CXX_STANDARD 23) 4 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 5 | set(CMAKE_CXX_EXTENSIONS OFF) 6 | 7 | if (DEFINED ENV{ESP_IDF_VERSION}) 8 | idf_component_register( 9 | SRC_DIRS "Source/" 10 | INCLUDE_DIRS "Source/" 11 | PRIV_INCLUDE_DIRS "Private/" 12 | REQUIRES lvgl 13 | ) 14 | 15 | else() 16 | file(GLOB SOURCES "Source/*.c*") 17 | file(GLOB HEADERS "Source/*.h*") 18 | 19 | add_library(lv_screenshot STATIC) 20 | 21 | target_sources(lv_screenshot 22 | PRIVATE ${SOURCES} 23 | PUBLIC ${HEADERS} 24 | ) 25 | 26 | target_include_directories(lv_screenshot 27 | PRIVATE Private 28 | PUBLIC Source 29 | ) 30 | 31 | target_link_libraries(lv_screenshot 32 | PUBLIC lvgl 33 | ) 34 | endif() -------------------------------------------------------------------------------- /Libraries/lv_screenshot/Private/save_bmp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "lvgl.h" 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | bool lve_screenshot_save_bmp_file(const uint8_t* image, uint32_t w, uint32_t h, uint32_t bpp, const char* filename); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | -------------------------------------------------------------------------------- /Libraries/lv_screenshot/Private/save_png.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "lvgl.h" 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | bool lv_screenshot_save_png_file(const uint8_t* image, uint32_t w, uint32_t h, uint32_t bpp, const char* filename); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | -------------------------------------------------------------------------------- /Libraries/lv_screenshot/README.md: -------------------------------------------------------------------------------- 1 | ## lv_screenshot 2 | 3 | This library is adapted from the lv_100ask_screenshot library from 100ask on [GitHub](https://github.com/100askTeam/lv_lib_100ask). 4 | 5 | The original license is available [here](LICENSE-original). 6 | 7 | ## Features 8 | 9 | - Save LVGL screen objects (full screen) as image files: lv_scr_act(),layer_sys(),layer_top() 10 | - Capture and save the specified LVGL object and its children as an image file 11 | - Supported save as: BMP, PNG, JPG 12 | - more todo... 13 | -------------------------------------------------------------------------------- /Libraries/lv_screenshot/Source/lv_screenshot.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "lvgl.h" 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | typedef enum { 10 | LV_100ASK_SCREENSHOT_SV_BMP = 0, 11 | LV_100ASK_SCREENSHOT_SV_PNG = 1, 12 | LV_100ASK_SCREENSHOT_SV_LAST 13 | } lv_100ask_screenshot_sv_t; 14 | 15 | bool lv_screenshot_create(lv_obj_t* obj, lv_100ask_screenshot_sv_t screenshot_sv, const char* filename); 16 | 17 | #ifdef __cplusplus 18 | } /*extern "C"*/ 19 | #endif 20 | -------------------------------------------------------------------------------- /Libraries/lv_screenshot/Source/save_png.c: -------------------------------------------------------------------------------- 1 | #include "src/libs/lodepng/lodepng.h" 2 | 3 | bool lv_screenshot_save_png_file(const uint8_t* image, uint32_t w, uint32_t h, uint32_t bpp, const char* filename) { 4 | if (bpp == 32) { 5 | return lodepng_encode32_file(filename, image, w, h) == 0; 6 | } else if (bpp == 24) { 7 | return lodepng_encode24_file(filename, image, w, h) == 0; 8 | } else { 9 | return false; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Libraries/minmea/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | set(CMAKE_CXX_STANDARD 23) 4 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 5 | set(CMAKE_CXX_EXTENSIONS OFF) 6 | 7 | if (DEFINED ENV{ESP_IDF_VERSION}) 8 | idf_component_register( 9 | SRC_DIRS "Source/" 10 | INCLUDE_DIRS "Include/" 11 | ) 12 | 13 | else() 14 | file(GLOB SOURCES "Source/*.c*") 15 | file(GLOB HEADERS "Include/*.h*") 16 | 17 | add_library(minmea STATIC) 18 | 19 | target_sources(minmea PRIVATE ${SOURCES}) 20 | include_directories(minmea "Include/") 21 | target_include_directories(minmea PUBLIC "Include/") 22 | 23 | endif() 24 | -------------------------------------------------------------------------------- /Libraries/minmea/COPYING: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | -------------------------------------------------------------------------------- /Libraries/minmea/LICENSE.grants: -------------------------------------------------------------------------------- 1 | At your option, if WTFPL is unacceptable for your legal department, I hereby 2 | explicitly grant you the right to use any the following licenses for minmea: 3 | 4 | 1. MIT License 5 | 2. LGPL-3.0 License or later 6 | 7 | See accompanying license files for full license text. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | 3 | Tactility is an operating system that focuses on the ESP32 microcontroller family. 4 | 5 | See [https://tactility.one](https://tactility.one) for more information. 6 | 7 | ![photo of devices running Tactility](Documentation/pics/tactility-devices.webp)  ![screenshot of desktop app](Documentation/pics/screenshot-Desktop.png) 8 | 9 | You can run built-in apps or start them from an SD card: 10 | 11 | ![screenshot off app list app](Documentation/pics/screenshot-AppList.png)  ![screenshot of files app](Documentation/pics/screenshot-Files.png) 12 | 13 | It's easy to manage system settings: 14 | 15 | ![screenshot of settings app](Documentation/pics/screenshot-Settings.png)  ![screenshot of wifi management app](Documentation/pics/screenshot-WifiManage.png) 16 | 17 | ## License 18 | 19 | [GNU General Public License Version 3](LICENSE.md) 20 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | | Version | Supported | 6 | | ------- | ------------------ | 7 | | main branch | :white_check_mark: | 8 | 9 | ## Reporting a Vulnerability 10 | 11 | We appreciate your efforts to responsibly disclose your findings, and we will make every effort to acknowledge your contributions. 12 | 13 | To report a security issue, please use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/bytewelder/tactility/security/advisories/new) tab. 14 | 15 | You can expect a response indicating the next steps in handling your report. After the initial reply to your report, you'll be kept informed of the progress towards a fix and full announcement, and may ask for additional information or guidance. 16 | 17 | Report security bugs in third-party dependencies to the person or team maintaining the module. 18 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/Partitions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt { 4 | 5 | #define SYSTEM_PARTITION_NAME "system" 6 | 7 | #ifdef ESP_PLATFORM 8 | #define MOUNT_POINT_SYSTEM "/system" 9 | #else 10 | #define MOUNT_POINT_SYSTEM "system" 11 | #endif 12 | 13 | #define DATA_PARTITION_NAME "data" 14 | 15 | #ifdef ESP_PLATFORM 16 | #define MOUNT_POINT_DATA "/data" 17 | #else 18 | #define MOUNT_POINT_DATA "data" 19 | #endif 20 | 21 | } // namespace 22 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/Preferences.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace tt { 7 | 8 | /** 9 | * Settings that persist on NVS flash for ESP32. 10 | * On simulator, the settings are only in-memory. 11 | */ 12 | class Preferences { 13 | private: 14 | const char* namespace_; 15 | 16 | public: 17 | explicit Preferences(const char* namespace_) { 18 | this->namespace_ = namespace_; 19 | } 20 | 21 | bool hasBool(const std::string& key) const; 22 | bool hasInt32(const std::string& key) const; 23 | bool hasString(const std::string& key) const; 24 | 25 | bool optBool(const std::string& key, bool& out) const; 26 | bool optInt32(const std::string& key, int32_t& out) const; 27 | bool optString(const std::string& key, std::string& out) const; 28 | 29 | void putBool(const std::string& key, bool value); 30 | void putInt32(const std::string& key, int32_t value); 31 | void putString(const std::string& key, const std::string& value); 32 | }; 33 | 34 | } // namespace 35 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/TactilityConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef ESP_PLATFORM 4 | #include 5 | #endif 6 | 7 | #define TT_CONFIG_FORCE_ONSCREEN_KEYBOARD false // for development/debug purposes 8 | 9 | #ifdef ESP_PLATFORM 10 | #define TT_FEATURE_SCREENSHOT_ENABLED (CONFIG_LV_USE_SNAPSHOT == 1 && CONFIG_SPIRAM_USE_MALLOC == 1) 11 | #else // Sim 12 | #define TT_FEATURE_SCREENSHOT_ENABLED true 13 | #endif 14 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/TactilityHeadless.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/Configuration.h" 4 | 5 | #include 6 | #include 7 | 8 | namespace tt { 9 | 10 | /** Initialize the hardware and started the internal services. */ 11 | void initHeadless(const hal::Configuration& config); 12 | 13 | /** Provides access to the dispatcher that runs on the main task. 14 | * @warning This dispatcher is used for WiFi and might block for some time during WiFi connection. 15 | * @return the dispatcher 16 | */ 17 | Dispatcher& getMainDispatcher(); 18 | 19 | } // namespace 20 | 21 | namespace tt::hal { 22 | 23 | /** While technically this configuration is nullable, it's never null after initHeadless() is called. */ 24 | const Configuration* _Nullable getConfiguration(); 25 | 26 | } // namespace 27 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/app/ManifestRegistry.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "App.h" 4 | #include 5 | #include 6 | 7 | namespace tt::app { 8 | 9 | struct AppManifest; 10 | 11 | /** Register an application with its manifest */ 12 | void addApp(const AppManifest& manifest); 13 | 14 | /** Find an application manifest by its id 15 | * @param[in] id the manifest id 16 | * @return the application manifest if it was found 17 | */ 18 | _Nullable std::shared_ptr findAppById(const std::string& id); 19 | 20 | /** @return a list of all registered apps. This includes user and system apps. */ 21 | std::vector> getApps(); 22 | 23 | } // namespace 24 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/app/addgps/AddGps.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/app/display/DisplaySettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace tt::app::display { 6 | 7 | void setBacklightDuty(uint8_t value); 8 | 9 | bool getBacklightDuty(uint8_t& duty); 10 | 11 | void setGammaCurve(uint8_t curveIndex); 12 | 13 | bool getGammaCurve(uint8_t& curveIndex); 14 | 15 | void setRotation(lv_display_rotation_t rotation); 16 | 17 | lv_display_rotation_t getRotation(); 18 | 19 | } // namespace 20 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/app/filebrowser/FileBrowser.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt::app::filebrowser { 4 | 5 | void start(); 6 | 7 | } // namespace 8 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/app/fileselection/FileSelection.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt::app::fileselection { 4 | 5 | /** 6 | * Show a file selection dialog that allows the user to select an existing file. 7 | * This app returns the absolute file path as a result. 8 | */ 9 | LaunchId startForExistingFile(); 10 | 11 | /** 12 | * Show a file selection dialog that allows the user to select a new or existing file. 13 | * This app returns the absolute file path as a result. 14 | */ 15 | LaunchId startForExistingOrNewFile(); 16 | 17 | /** 18 | * @param bundle the result bundle of an app 19 | * @return the path from the bundle, or empty string if none is present 20 | */ 21 | std::string getResultPath(const Bundle& bundle); 22 | 23 | } // namespace 24 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/app/gpssettings/GpsSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt::app::gpssettings { 4 | 5 | void start(); 6 | 7 | } -------------------------------------------------------------------------------- /Tactility/Include/Tactility/app/imageviewer/ImageViewer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt::app::imageviewer { 4 | 5 | void start(const std::string& file); 6 | 7 | }; -------------------------------------------------------------------------------- /Tactility/Include/Tactility/app/inputdialog/InputDialog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | /** 9 | * Start the app by its ID and provide: 10 | * - a title 11 | * - a text 12 | */ 13 | namespace tt::app::inputdialog { 14 | 15 | void start(const std::string& title, const std::string& message, const std::string& prefilled = ""); 16 | 17 | /** 18 | * @return the text that was in the field when OK was pressed, or otherwise empty string 19 | */ 20 | std::string getResult(const Bundle& bundle); 21 | } 22 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/app/selectiondialog/SelectionDialog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | /** 9 | * Start the app by its ID and provide: 10 | * - an optional title 11 | * - 2 or more items 12 | * 13 | * If you provide 0 items, the app will auto-close. 14 | * If you provide 1 item, the app will auto-close with result index 0 15 | */ 16 | namespace tt::app::selectiondialog { 17 | 18 | void start(const std::string& title, const std::vector& items); 19 | 20 | /** 21 | * Get the index of the item that the user selected. 22 | * 23 | * @return a value greater than 0 when a selection was done, or -1 when the app was closed without selecting an item. 24 | */ 25 | int32_t getResultIndex(const Bundle& bundle); 26 | } 27 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/app/serialconsole/View.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace tt::app::serialconsole { 6 | 7 | class View { 8 | public: 9 | virtual void onStop() = 0; 10 | }; 11 | 12 | } -------------------------------------------------------------------------------- /Tactility/Include/Tactility/app/textviewer/TextViewer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt::app::textviewer { 4 | 5 | void start(const std::string& file); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/app/wifimanage/WifiManage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt::app::wifimanage { 4 | 5 | void start(); 6 | 7 | } // namespace 8 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/hal/Gpio.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef ESP_PLATFORM 4 | #include 5 | #else 6 | typedef unsigned int gpio_num_t; 7 | #endif -------------------------------------------------------------------------------- /Tactility/Include/Tactility/hal/gps/GpsConfiguration.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | namespace tt::hal::gps { 8 | 9 | enum class GpsModel { 10 | Unknown = 0, 11 | AG3335, 12 | AG3352, 13 | ATGM336H, // Casic (might work with AT6558, Neoway N58 LTE Cat.1, Neoway G2, Neoway G7A) 14 | LS20031, 15 | MTK, 16 | MTK_L76B, 17 | MTK_PA1616S, 18 | UBLOX6, 19 | UBLOX7, 20 | UBLOX8, 21 | UBLOX9, 22 | UBLOX10, 23 | UC6580, 24 | }; 25 | 26 | const char* toString(GpsModel model); 27 | 28 | std::vector getModels(); 29 | 30 | struct GpsConfiguration { 31 | char uartName[32]; // e.g. "Internal" or "/dev/ttyUSB0" 32 | uint32_t baudRate; 33 | GpsModel model; // Choosing "Unknown" will result in a probe 34 | }; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/hal/i2c/I2cCompat.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef ESP_PLATFORM 4 | 5 | #include 6 | #include 7 | 8 | #else 9 | 10 | #include 11 | 12 | enum i2c_port_t { 13 | I2C_NUM_0 = 0, 14 | I2C_NUM_1, 15 | LP_I2C_NUM_0, 16 | I2C_NUM_MAX, 17 | }; 18 | 19 | enum i2c_mode_t { 20 | I2C_MODE_MASTER, 21 | I2C_MODE_MAX, 22 | }; 23 | 24 | struct i2c_config_t { 25 | i2c_mode_t mode; 26 | int sda_io_num; 27 | int scl_io_num; 28 | bool sda_pullup_en; 29 | bool scl_pullup_en; 30 | union { 31 | struct { 32 | uint32_t clk_speed; 33 | } master; 34 | }; 35 | uint32_t clk_flags; 36 | }; 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/hal/keyboard/KeyboardDevice.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Device.h" 4 | 5 | #include 6 | 7 | namespace tt::hal::keyboard { 8 | 9 | class Display; 10 | 11 | class KeyboardDevice : public Device { 12 | 13 | public: 14 | 15 | Type getType() const override { return Type::Keyboard; } 16 | 17 | virtual bool start(lv_display_t* display) = 0; 18 | virtual bool stop() = 0; 19 | virtual bool isAttached() const = 0; 20 | 21 | virtual lv_indev_t* _Nullable getLvglIndev() = 0; 22 | }; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/hal/spi/SpiCompat.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Gpio.h" 4 | 5 | #ifdef ESP_PLATFORM 6 | #include 7 | #else 8 | 9 | #define SPI_HOST_MAX 3 10 | 11 | typedef int spi_host_device_t; 12 | struct spi_bus_config_t { 13 | gpio_num_t miso_io_num; 14 | gpio_num_t mosi_io_num; 15 | gpio_num_t sclk_io_num; 16 | }; 17 | struct spi_common_dma_t {}; 18 | 19 | #endif -------------------------------------------------------------------------------- /Tactility/Include/Tactility/hal/touch/TouchDevice.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Device.h" 4 | 5 | #include 6 | 7 | namespace tt::hal::touch { 8 | 9 | class Display; 10 | 11 | class TouchDevice : public Device { 12 | 13 | public: 14 | 15 | Type getType() const override { return Type::Touch; } 16 | 17 | virtual bool start(lv_display_t* display) = 0; 18 | virtual bool stop() = 0; 19 | 20 | virtual lv_indev_t* _Nullable getLvglIndev() = 0; 21 | }; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/hal/uart/Configuration.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt::hal::uart { 4 | 5 | #ifdef ESP_PLATFORM 6 | 7 | struct Configuration { 8 | /** The unique name for this UART */ 9 | std::string name; 10 | /** The port idenitifier (e.g. UART_NUM_0) */ 11 | uart_port_t port; 12 | /** Receive GPIO pin */ 13 | gpio_num_t rxPin; 14 | /** Transmit GPIO pin */ 15 | gpio_num_t txPin; 16 | /** Read-To-Send GPIO pin */ 17 | gpio_num_t rtsPin; 18 | /** Clear-To-Send Send GPIO pin */ 19 | gpio_num_t ctsPin; 20 | /** Receive buffer size in bytes */ 21 | unsigned int rxBufferSize; 22 | /** Transmit buffer size in bytes */ 23 | unsigned int txBufferSize; 24 | /** Native configuration */ 25 | uart_config_t config; 26 | }; 27 | 28 | 29 | #else 30 | 31 | struct Configuration { 32 | /** The unique name for this UART */ 33 | std::string name; 34 | /** Initial baud rate in bits per second */ 35 | uint32_t baudRate; 36 | }; 37 | 38 | #endif 39 | 40 | } -------------------------------------------------------------------------------- /Tactility/Include/Tactility/hal/uart/UartCompat.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef ESP_PLATFORM 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #else 10 | 11 | #define UART_NUM_MAX 3 12 | typedef int uart_port_t; 13 | 14 | typedef struct { 15 | } uart_config_t; 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/hal/usb/Usb.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt::hal::usb { 4 | 5 | enum class Mode { 6 | Default, // Default state of USB stack 7 | None, // State after TinyUSB was used and (partially) deinitialized 8 | MassStorageSdmmc 9 | }; 10 | 11 | bool startMassStorageWithSdmmc(); 12 | void stop(); 13 | Mode getMode(); 14 | bool isSupported(); 15 | 16 | bool canRebootIntoMassStorageSdmmc(); 17 | void rebootIntoMassStorageSdmmc(); 18 | bool isUsbBootMode(); 19 | void resetUsbBootMode(); 20 | 21 | } -------------------------------------------------------------------------------- /Tactility/Include/Tactility/lvgl/Color.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | lv_color_t lv_color_foreground(); 6 | 7 | lv_color_t lv_color_background(); 8 | 9 | lv_color_t lv_color_background_darkest(); 10 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/lvgl/LabelUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace tt::lvgl { 6 | 7 | bool label_set_text_file(lv_obj_t* label, const char* filepath); 8 | 9 | } // namespace 10 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/lvgl/Lvgl.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "./Colors.h" 6 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/lvgl/Spinner.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace tt::lvgl { 4 | 5 | /** 6 | * Create the Tactility spinner widget 7 | * @param parent pointer to an object, it will be the parent of the new spinner. 8 | * @return the created spinner 9 | */ 10 | lv_obj_t* spinner_create(lv_obj_t* parent); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/lvgl/Statusbar.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/app/AppContext.h" 4 | 5 | #include 6 | 7 | namespace tt::lvgl { 8 | 9 | #define STATUSBAR_ICON_LIMIT 8 10 | #define STATUSBAR_ICON_SIZE 20 11 | #define STATUSBAR_HEIGHT (STATUSBAR_ICON_SIZE + 4) // 4 extra pixels for border and outline 12 | 13 | lv_obj_t* statusbar_create(lv_obj_t* parent); 14 | int8_t statusbar_icon_add(const std::string& image); 15 | int8_t statusbar_icon_add(); 16 | void statusbar_icon_remove(int8_t id); 17 | void statusbar_icon_set_image(int8_t id, const std::string& image); 18 | void statusbar_icon_set_visibility(int8_t id, bool visible); 19 | 20 | } // namespace 21 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/lvgl/Style.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace tt::lvgl { 6 | 7 | void obj_set_style_bg_blacken(lv_obj_t* obj); 8 | void obj_set_style_bg_invisible(lv_obj_t* obj); 9 | 10 | [[deprecated("use _pad_all() and _pad_gap() individually")]] 11 | void obj_set_style_no_padding(lv_obj_t* obj); 12 | 13 | } // namespace 14 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/service/Service.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace tt::service { 6 | 7 | // Forward declaration 8 | class ServiceContext; 9 | 10 | class Service { 11 | 12 | public: 13 | 14 | Service() = default; 15 | virtual ~Service() = default; 16 | 17 | virtual void onStart(ServiceContext& serviceContext) {} 18 | virtual void onStop(ServiceContext& serviceContext) {} 19 | }; 20 | 21 | template 22 | std::shared_ptr create() { return std::shared_ptr(new T); } 23 | 24 | } -------------------------------------------------------------------------------- /Tactility/Include/Tactility/service/ServiceManifest.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/service/Service.h" 4 | 5 | #include 6 | 7 | namespace tt::service { 8 | 9 | // Forward declarations 10 | class ServiceContext; 11 | 12 | typedef std::shared_ptr(*CreateService)(); 13 | 14 | /** A ledger that describes the main parts of a service. */ 15 | struct ServiceManifest { 16 | /** The identifier by which the app is launched by the system and other apps. */ 17 | std::string id {}; 18 | 19 | /** Create the instance of the app */ 20 | CreateService createService = nullptr; 21 | }; 22 | 23 | } // namespace 24 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/service/gps/GpsState.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt::service::gps { 4 | 5 | enum class State { 6 | OnPending, 7 | On, 8 | OffPending, 9 | Off 10 | }; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/service/gps/GpsUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace tt::hal::gps { 6 | 7 | /** @return true when the input float is valid (contains non-zero values) */ 8 | inline bool isValid(const minmea_float& inFloat) { return inFloat.value != 0 && inFloat.scale != 0; } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/service/wifi/WifiGlobals.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define TT_WIFI_AUTO_CONNECT true // Default setting for new Wi-Fi entries 4 | 5 | #define TT_WIFI_SCAN_RECORD_LIMIT 16 // default, can be overridden 6 | 7 | #define TT_WIFI_SSID_LIMIT 32 // 32 characters/octets, according to IEEE 802.11-2020 spec 8 | #define TT_WIFI_CREDENTIALS_PASSWORD_LIMIT 64 // 64 characters/octets, according to IEEE 802.11-2020 spec 9 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/service/wifi/WifiSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "WifiGlobals.h" 4 | #include 5 | 6 | namespace tt::service::wifi::settings { 7 | 8 | /** 9 | * This struct is stored as-is into NVS flash. 10 | * 11 | * The SSID and secret are increased by 1 byte to facilitate string null termination. 12 | * This makes it easier to use the char array as a string in various places. 13 | */ 14 | struct WifiApSettings { 15 | char ssid[TT_WIFI_SSID_LIMIT + 1] = { 0 }; 16 | char password[TT_WIFI_CREDENTIALS_PASSWORD_LIMIT + 1] = { 0 }; 17 | int32_t channel = 0; 18 | bool auto_connect = true; 19 | }; 20 | 21 | bool contains(const char* ssid); 22 | 23 | bool load(const char* ssid, WifiApSettings* settings); 24 | 25 | bool save(const WifiApSettings* settings); 26 | 27 | bool remove(const char* ssid); 28 | 29 | void setEnableOnBoot(bool enable); 30 | 31 | bool shouldEnableOnBoot(); 32 | 33 | } // namespace 34 | -------------------------------------------------------------------------------- /Tactility/Include/Tactility/time/Time.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace tt::time { 6 | 7 | /** 8 | * Set the timezone 9 | * @param[in] name human-readable name 10 | * @param[in] code the technical code (from timezones.csv) 11 | */ 12 | void setTimeZone(const std::string& name, const std::string& code); 13 | 14 | /** 15 | * Get the name of the timezone 16 | */ 17 | std::string getTimeZoneName(); 18 | 19 | /** 20 | * Get the code of the timezone (see timezones.csv) 21 | */ 22 | std::string getTimeZoneCode(); 23 | 24 | /** @return true when clocks should be shown as a 24 hours one instead of 12 hours */ 25 | bool isTimeFormat24Hour(); 26 | 27 | /** Set whether clocks should be shown as a 24 hours instead of 12 hours 28 | * @param[in] show24Hour 29 | */ 30 | void setTimeFormat24Hour(bool show24Hour); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/InitEsp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef ESP_PLATFORM 4 | 5 | namespace tt { 6 | 7 | void initEsp(); 8 | 9 | } // namespace 10 | 11 | #endif // ESP_PLATFORM -------------------------------------------------------------------------------- /Tactility/Private/Tactility/PartitionsEsp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef ESP_PLATFORM 4 | 5 | #include "esp_err.h" 6 | 7 | namespace tt { 8 | 9 | esp_err_t initPartitionsEsp(); 10 | 11 | } // namespace 12 | 13 | #endif // ESP_PLATFORM -------------------------------------------------------------------------------- /Tactility/Private/Tactility/TactilityPrivate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace tt { 6 | 7 | void initFromBootApp(); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/AppInstancePaths.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/app/AppInstance.h" 4 | 5 | namespace tt::app { 6 | 7 | class AppInstancePaths final : public Paths { 8 | 9 | private: 10 | 11 | const AppManifest& manifest; 12 | 13 | public: 14 | 15 | explicit AppInstancePaths(const AppManifest& manifest) : manifest(manifest) {} 16 | ~AppInstancePaths() final = default; 17 | 18 | std::string getDataDirectory() const final; 19 | std::string getDataDirectoryLvgl() const final; 20 | std::string getDataPath(const std::string& childPath) const final; 21 | std::string getDataPathLvgl(const std::string& childPath) const final; 22 | std::string getSystemDirectory() const final; 23 | std::string getSystemDirectoryLvgl() const final; 24 | std::string getSystemPath(const std::string& childPath) const final; 25 | std::string getSystemPathLvgl(const std::string& childPath) const final; 26 | }; 27 | 28 | } -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/crashdiagnostics/CrashDiagnostics.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef ESP_PLATFORM 4 | 5 | namespace tt::app::crashdiagnostics { 6 | 7 | void start(); 8 | 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/crashdiagnostics/QrHelpers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | bool getQrVersionForBinaryDataLength(size_t inLength, int& outVersion); 6 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/crashdiagnostics/QrUrl.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | std::string getUrlFromCrashData(); 6 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/filebrowser/SupportedFiles.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace tt::app::filebrowser { 6 | 7 | bool isSupportedExecutableFile(const std::string& filename); 8 | bool isSupportedImageFile(const std::string& filename); 9 | bool isSupportedTextFile(const std::string& filename); 10 | 11 | } // namespace 12 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/fileselection/FileSelectionPrivate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace tt::app::fileselection { 6 | 7 | enum class Mode { 8 | Existing = 0, 9 | ExistingOrNew = 1 10 | }; 11 | 12 | Mode getMode(const Bundle& bundle); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/gpio/GpioHal.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef ESP_PLATFORM 4 | #include "driver/gpio.h" 5 | #define GPIO_NUM_MIN GPIO_NUM_0 6 | #else 7 | #define GPIO_NUM_MIN 0 8 | #define GPIO_NUM_MAX 50 9 | #endif 10 | 11 | #ifndef ESP_PLATFORM 12 | int gpio_get_level(int gpio_num); 13 | #endif 14 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/i2cscanner/I2cHelpers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace tt::app::i2cscanner { 7 | 8 | std::string getAddressText(uint8_t address); 9 | 10 | std::string getPortNamesForDropdown(); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/i2cscanner/I2cScanner.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt::app::i2cscanner { 4 | 5 | void start(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/i2cscanner/I2cScannerPrivate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | namespace tt::app::i2cscanner { 13 | 14 | #define TAG "i2cscanner" 15 | 16 | enum ScanState { 17 | ScanStateInitial, 18 | ScanStateScanning, 19 | ScanStateStopped 20 | }; 21 | 22 | struct Data { 23 | 24 | }; 25 | 26 | void onScanTimerFinished(std::shared_ptr data); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/i2cscanner/I2cScannerThread.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "./I2cScannerPrivate.h" 4 | #include 5 | 6 | namespace tt::app::i2cscanner { 7 | 8 | bool hasScanTimer(std::shared_ptr data); 9 | void startScanning(std::shared_ptr data); 10 | void stopScanning(std::shared_ptr data); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/launcher/Launcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt::app::launcher { 4 | 5 | void start(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/timedatesettings/TimeDateSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt::app::timedatesettings { 4 | 5 | void start(); 6 | 7 | } -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/timezone/TimeZone.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace tt::app::timezone { 6 | 7 | void start(); 8 | 9 | std::string getResultName(const Bundle& bundle); 10 | std::string getResultCode(const Bundle& bundle); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/wifiapsettings/WifiApSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | namespace tt::app::wifiapsettings { 8 | 9 | void start(const std::string& ssid); 10 | 11 | } // namespace 12 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/wificonnect/Bindings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/service/wifi/WifiSettings.h" 4 | 5 | namespace tt::app::wificonnect { 6 | 7 | typedef void (*OnConnectSsid)(const service::wifi::settings::WifiApSettings* settings, bool store, void* context); 8 | 9 | typedef struct { 10 | OnConnectSsid onConnectSsid; 11 | void* onConnectSsidContext; 12 | } Bindings; 13 | 14 | } // namespace 15 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/wificonnect/State.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | namespace tt::app::wificonnect { 8 | 9 | class State { 10 | Mutex lock; 11 | service::wifi::settings::WifiApSettings apSettings = { 12 | .ssid = { 0 }, 13 | .password = { 0 }, 14 | .auto_connect = false 15 | }; 16 | bool connectionError = false; 17 | bool connecting = false; 18 | public: 19 | 20 | void setConnectionError(bool error); 21 | bool hasConnectionError() const; 22 | 23 | void setApSettings(const service::wifi::settings::WifiApSettings* newSettings); 24 | 25 | void setConnecting(bool isConnecting); 26 | bool isConnecting() const; 27 | }; 28 | 29 | } // namespace 30 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/wifimanage/Bindings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt::app::wifimanage { 4 | 5 | typedef void (*OnWifiToggled)(bool enable); 6 | typedef void (*OnConnectSsid)(const char* ssid); 7 | typedef void (*OnDisconnect)(); 8 | typedef void (*OnShowApSettings)(const char* ssid); 9 | typedef void (*OnConnectToHidden)(); 10 | 11 | struct Bindings{ 12 | OnWifiToggled onWifiToggled; 13 | OnConnectSsid onConnectSsid; 14 | OnDisconnect onDisconnect; 15 | OnShowApSettings onShowApSettings; 16 | OnConnectToHidden onConnectToHidden; 17 | }; 18 | 19 | } // namespace 20 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/app/wifimanage/WifiManagePrivate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "./View.h" 4 | #include "./State.h" 5 | 6 | #include "Tactility/app/App.h" 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | namespace tt::app::wifimanage { 13 | 14 | class WifiManage : public App { 15 | 16 | private: 17 | 18 | PubSub::SubscriptionHandle wifiSubscription = nullptr; 19 | Mutex mutex; 20 | Bindings bindings = { }; 21 | State state; 22 | View view = View(&bindings, &state); 23 | bool isViewEnabled = false; 24 | 25 | public: 26 | 27 | WifiManage(); 28 | 29 | void lock(); 30 | void unlock(); 31 | 32 | void onShow(AppContext& app, lv_obj_t* parent) override; 33 | void onHide(AppContext& app) override; 34 | 35 | Bindings& getBindings() { return bindings; } 36 | State& getState() { return state; } 37 | 38 | void requestViewUpdate(); 39 | }; 40 | 41 | } // namespace 42 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/hal/Hal_i.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/Configuration.h" 4 | 5 | namespace tt::hal { 6 | 7 | void init(const Configuration& configuration); 8 | 9 | } // namespace 10 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/hal/gps/GpsInit.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/gps/GpsDevice.h" 4 | 5 | namespace tt::hal::uart { class Uart; } 6 | 7 | namespace tt::hal::gps { 8 | 9 | /** 10 | * Init sequence on UART for a specific GPS model. 11 | */ 12 | bool init(uart::Uart& uart, GpsModel type); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/hal/gps/Probe.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/gps/GpsDevice.h" 4 | #include "Tactility/hal/uart/Uart.h" 5 | 6 | namespace tt::hal::gps { 7 | 8 | GpsModel probe(uart::Uart& iart); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/hal/gps/Ublox.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/gps/GpsDevice.h" 4 | #include "Tactility/hal/uart/Uart.h" 5 | 6 | #include 7 | #include 8 | 9 | namespace tt::hal::gps::ublox { 10 | 11 | void checksum(uint8_t* message, size_t length); 12 | 13 | // From https://github.com/meshtastic/firmware/blob/7648391f91f2b84e367ae2b38220b30936fb45b1/src/gps/GPS.cpp#L128 14 | uint8_t makePacket(uint8_t classId, uint8_t messageId, const uint8_t* payload, uint8_t payloadSize, uint8_t* bufferOut); 15 | 16 | template 17 | inline void sendPacket(uart_port_t port, uint8_t type, uint8_t id, uint8_t data[DataSize], const char* errorMessage, TickType_t timeout) { 18 | static uint8_t buffer[250] = {0}; 19 | size_t length = makePacket(type, id, data, DataSize, buffer); 20 | // hal::uart::writeBytes(port, buffer, length); 21 | } 22 | 23 | GpsModel probe(uart::Uart& uart); 24 | 25 | bool init(uart::Uart& uart, GpsModel model); 26 | 27 | } // namespace tt::service::gps 28 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/hal/i2c/I2cInit.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/i2c/I2c.h" 4 | #include 5 | 6 | namespace tt::hal::i2c { 7 | 8 | /** 9 | * Called by main HAL init to ready the internal state of the I2C HAL. 10 | * @param[in] configurations HAL configuration for a board 11 | * @return true on success 12 | */ 13 | bool init(const std::vector& configurations); 14 | 15 | } -------------------------------------------------------------------------------- /Tactility/Private/Tactility/hal/spi/SpiInit.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/spi/Spi.h" 4 | 5 | #include 6 | #include 7 | 8 | namespace tt::hal::spi { 9 | 10 | /** 11 | * Called by main HAL init to ready the internal state of the SPI HAL. 12 | * @param[in] configurations HAL configuration for a board 13 | * @return true on success 14 | */ 15 | bool init(const std::vector& configurations); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/hal/uart/UartInit.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/hal/uart/Uart.h" 4 | 5 | namespace tt::hal::uart { 6 | 7 | bool init(const std::vector& configurations); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/hal/usb/UsbTusb.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | bool tusbIsSupported(); 4 | bool tusbStartMassStorageWithSdmmc(); 5 | void tusbStop(); 6 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/lvgl/EspLvglPort.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef ESP_PLATFORM 4 | 5 | namespace tt::lvgl { 6 | 7 | bool initEspLvglPort(); 8 | 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/lvgl/Init_i.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace tt::lvgl { 6 | 7 | void init(const hal::Configuration& config); 8 | 9 | } // namespace 10 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/network/NtpPrivate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt::network::ntp { 4 | 5 | void init(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/service/ServiceInstance.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/service/ServiceContext.h" 4 | #include "Tactility/service/Service.h" 5 | 6 | namespace tt::service { 7 | 8 | class ServiceInstance : public ServiceContext { 9 | 10 | private: 11 | 12 | Mutex mutex = Mutex(Mutex::Type::Normal); 13 | std::shared_ptr manifest; 14 | std::shared_ptr service; 15 | 16 | public: 17 | 18 | explicit ServiceInstance(std::shared_ptr manifest); 19 | ~ServiceInstance() override = default; 20 | 21 | /** @return a reference ot the service's manifest */ 22 | const service::ServiceManifest& getManifest() const override; 23 | 24 | /** Retrieve the paths that are relevant to this service */ 25 | std::unique_ptr getPaths() const override; 26 | 27 | std::shared_ptr getService() const { return service; } 28 | }; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/service/ServiceInstancePaths.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/service/ServiceInstance.h" 4 | 5 | namespace tt::service { 6 | 7 | class ServiceInstancePaths final : public Paths { 8 | 9 | private: 10 | 11 | std::shared_ptr manifest; 12 | 13 | public: 14 | 15 | explicit ServiceInstancePaths(std::shared_ptr manifest) : manifest(std::move(manifest)) {} 16 | ~ServiceInstancePaths() final = default; 17 | 18 | std::string getDataDirectory() const final; 19 | std::string getDataDirectoryLvgl() const final; 20 | std::string getDataPath(const std::string& childPath) const final; 21 | std::string getDataPathLvgl(const std::string& childPath) const final; 22 | std::string getSystemDirectory() const final; 23 | std::string getSystemDirectoryLvgl() const final; 24 | std::string getSystemPath(const std::string& childPath) const final; 25 | std::string getSystemPathLvgl(const std::string& childPath) const final; 26 | }; 27 | 28 | } -------------------------------------------------------------------------------- /Tactility/Private/Tactility/service/espnow/EspNowWifi.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Tactility/service/espnow/EspNow.h" 4 | 5 | namespace tt::service::espnow { 6 | 7 | bool initWifi(const EspNowConfig& config); 8 | 9 | bool deinitWifi(); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /Tactility/Private/Tactility/time/TimePrivate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt::time { 4 | 5 | void init(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /Tactility/Source/TactilityHeadlessEsp.cpp: -------------------------------------------------------------------------------- 1 | #ifdef ESP_PLATFORM 2 | 3 | #include "Tactility/PartitionsEsp.h" 4 | #include "Tactility/TactilityCore.h" 5 | 6 | #include "esp_event.h" 7 | #include "esp_netif.h" 8 | #include "nvs_flash.h" 9 | 10 | namespace tt { 11 | 12 | #define TAG "tactility" 13 | 14 | // Initialize NVS 15 | static void initNvs() { 16 | esp_err_t ret = nvs_flash_init(); 17 | if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) { 18 | TT_LOG_I(TAG, "nvs erasing"); 19 | ESP_ERROR_CHECK(nvs_flash_erase()); 20 | ret = nvs_flash_init(); 21 | } 22 | ESP_ERROR_CHECK(ret); 23 | TT_LOG_I(TAG, "nvs initialized"); 24 | } 25 | 26 | static void initNetwork() { 27 | ESP_ERROR_CHECK(esp_netif_init()); 28 | ESP_ERROR_CHECK(esp_event_loop_create_default()); 29 | } 30 | 31 | void initEsp() { 32 | initNvs(); 33 | initPartitionsEsp(); 34 | initNetwork(); 35 | } 36 | 37 | } // namespace 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /Tactility/Source/app/App.cpp: -------------------------------------------------------------------------------- 1 | #include "Tactility/app/App.h" 2 | 3 | #include 4 | 5 | namespace tt::app { 6 | 7 | LaunchId start(const std::string& id, std::shared_ptr _Nullable parameters) { 8 | return service::loader::startApp(id, std::move(parameters)); 9 | } 10 | 11 | void stop() { 12 | service::loader::stopApp(); 13 | } 14 | 15 | std::shared_ptr _Nullable getCurrentAppContext() { 16 | return service::loader::getCurrentAppContext(); 17 | } 18 | 19 | std::shared_ptr _Nullable getCurrentApp() { 20 | return service::loader::getCurrentApp(); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Tactility/Source/app/gpio/GpioHal.cpp: -------------------------------------------------------------------------------- 1 | #ifndef ESP_PLATFORM 2 | 3 | int gpio_get_level(int gpio_num) { 4 | return gpio_num % 3; 5 | } 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /Tactility/Source/app/wificonnect/State.cpp: -------------------------------------------------------------------------------- 1 | #include "Tactility/app/wificonnect/State.h" 2 | 3 | #include 4 | 5 | namespace tt::app::wificonnect { 6 | 7 | void State::setConnectionError(bool error) { 8 | lock.lock(); 9 | connectionError = error; 10 | lock.unlock(); 11 | } 12 | 13 | bool State::hasConnectionError() const { 14 | lock.lock(); 15 | auto result = connectionError; 16 | lock.unlock(); 17 | return result; 18 | } 19 | 20 | void State::setApSettings(const service::wifi::settings::WifiApSettings* newSettings) { 21 | lock.lock(); 22 | memcpy(&this->apSettings, newSettings, sizeof(service::wifi::settings::WifiApSettings)); 23 | lock.unlock(); 24 | } 25 | 26 | void State::setConnecting(bool isConnecting) { 27 | lock.lock(); 28 | connecting = isConnecting; 29 | lock.unlock(); 30 | } 31 | 32 | bool State::isConnecting() const { 33 | lock.lock(); 34 | auto result = connecting; 35 | lock.unlock(); 36 | return result; 37 | } 38 | 39 | } // namespace 40 | -------------------------------------------------------------------------------- /Tactility/Source/hal/sdcard/SdCard.cpp: -------------------------------------------------------------------------------- 1 | #include "Tactility/hal/Device.h" 2 | #include "Tactility/hal/sdcard/SdCardDevice.h" 3 | 4 | namespace tt::hal::sdcard { 5 | 6 | std::shared_ptr _Nullable find(const std::string& path) { 7 | auto sdcards = findDevices(Device::Type::SdCard); 8 | for (auto& sdcard : sdcards) { 9 | if (sdcard->isMounted() && path.starts_with(sdcard->getMountPath())) { 10 | return sdcard; 11 | } 12 | } 13 | 14 | return nullptr; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Tactility/Source/hal/usb/UsbMock.cpp: -------------------------------------------------------------------------------- 1 | #ifndef ESP_PLATFORM 2 | 3 | #include "Tactility/hal/usb/Usb.h" 4 | 5 | #define TAG "usb" 6 | 7 | namespace tt::hal::usb { 8 | 9 | bool startMassStorageWithSdmmc() { return false; } 10 | void stop() {} 11 | Mode getMode() { return Mode::Default; } 12 | bool isSupported() { return false; } 13 | 14 | bool canRebootIntoMassStorageSdmmc() { return false; } 15 | void rebootIntoMassStorageSdmmc() {} 16 | bool isUsbBootMode() { return false; } 17 | void resetUsbBootMode() {} 18 | 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /Tactility/Source/lvgl/Color.cpp: -------------------------------------------------------------------------------- 1 | #include "Tactility/lvgl/Color.h" 2 | 3 | lv_color_t lv_color_foreground() { 4 | return lv_color_make(0xFF, 0xFF, 0xFF); 5 | } 6 | 7 | lv_color_t lv_color_background() { 8 | return lv_color_make(0x28, 0x2B, 0x30); 9 | } 10 | 11 | lv_color_t lv_color_background_darkest() { 12 | return lv_color_make(0x00, 0x00, 0x00); 13 | } 14 | -------------------------------------------------------------------------------- /Tactility/Source/lvgl/LabelUtils.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | namespace tt::lvgl { 6 | 7 | #define TAG "tt_lv_label" 8 | 9 | bool label_set_text_file(lv_obj_t* label, const char* filepath) { 10 | auto text = hal::sdcard::withSdCardLock>(std::string(filepath), [filepath]() { 11 | return file::readString(filepath); 12 | }); 13 | 14 | if (text != nullptr) { 15 | lv_label_set_text(label, reinterpret_cast(text.get())); 16 | return true; 17 | } else { 18 | return false; 19 | } 20 | } 21 | 22 | } // namespace 23 | -------------------------------------------------------------------------------- /Tactility/Source/lvgl/Style.cpp: -------------------------------------------------------------------------------- 1 | #include "Tactility/lvgl/Style.h" 2 | 3 | namespace tt::lvgl { 4 | 5 | void obj_set_style_bg_blacken(lv_obj_t* obj) { 6 | lv_obj_set_style_bg_color(obj, lv_color_black(), 0); 7 | lv_obj_set_style_border_color(obj, lv_color_black(), 0); 8 | } 9 | 10 | void obj_set_style_bg_invisible(lv_obj_t* obj) { 11 | lv_obj_set_style_bg_opa(obj, 0, 0); 12 | lv_obj_set_style_border_width(obj, 0, 0); 13 | } 14 | 15 | void obj_set_style_no_padding(lv_obj_t* obj) { 16 | lv_obj_set_style_pad_all(obj, 0, 0); 17 | lv_obj_set_style_pad_gap(obj, 0, 0); 18 | } 19 | 20 | } // namespace 21 | -------------------------------------------------------------------------------- /Tactility/Source/network/Ntp.cpp: -------------------------------------------------------------------------------- 1 | #include "Tactility/network/NtpPrivate.h" 2 | 3 | #ifdef ESP_PLATFORM 4 | #include 5 | #include 6 | #include 7 | #include 8 | #endif 9 | 10 | #define TAG "ntp" 11 | 12 | namespace tt::network::ntp { 13 | 14 | #ifdef ESP_PLATFORM 15 | 16 | static void onTimeSynced(struct timeval* tv) { 17 | TT_LOG_I(TAG, "Time synced (%llu)", tv->tv_sec); 18 | kernel::publishSystemEvent(kernel::SystemEvent::Time); 19 | } 20 | 21 | void init() { 22 | esp_sntp_config_t config = ESP_NETIF_SNTP_DEFAULT_CONFIG("pool.ntp.org"); 23 | config.sync_cb = onTimeSynced; 24 | esp_netif_sntp_init(&config); 25 | } 26 | 27 | #else 28 | 29 | void init() { 30 | } 31 | 32 | #endif 33 | 34 | } 35 | -------------------------------------------------------------------------------- /Tactility/Source/service/ServiceInstance.cpp: -------------------------------------------------------------------------------- 1 | #include "Tactility/service/ServiceInstance.h" 2 | #include "Tactility/service/ServiceInstancePaths.h" 3 | 4 | namespace tt::service { 5 | 6 | ServiceInstance::ServiceInstance(std::shared_ptr manifest) : 7 | manifest(manifest), 8 | service(manifest->createService()) 9 | {} 10 | 11 | const service::ServiceManifest& ServiceInstance::getManifest() const { return *manifest; } 12 | 13 | std::unique_ptr ServiceInstance::getPaths() const { 14 | return std::make_unique(manifest); 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /Tactility/Source/service/wifi/Wifi.cpp: -------------------------------------------------------------------------------- 1 | #include "Tactility/service/wifi/Wifi.h" 2 | 3 | namespace tt::service::wifi { 4 | 5 | const char* radioStateToString(RadioState state) { 6 | switch (state) { 7 | using enum RadioState; 8 | case OnPending: 9 | return TT_STRINGIFY(OnPending); 10 | case On: 11 | return TT_STRINGIFY(On); 12 | case ConnectionPending: 13 | return TT_STRINGIFY(ConnectionPending); 14 | case ConnectionActive: 15 | return TT_STRINGIFY(ConnectionActive); 16 | case OffPending: 17 | return TT_STRINGIFY(OnPending); 18 | case Off: 19 | return TT_STRINGIFY(Off); 20 | } 21 | tt_crash("not implemented"); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Tactility/Source/service/wifi/WifiSettings.cpp: -------------------------------------------------------------------------------- 1 | #include "Tactility/Preferences.h" 2 | 3 | #define WIFI_PREFERENCES_NAMESPACE "wifi" 4 | #define WIFI_PREFERENCES_KEY_ENABLE_ON_BOOT "enable_on_boot" 5 | 6 | namespace tt::service::wifi::settings { 7 | 8 | void setEnableOnBoot(bool enable) { 9 | Preferences(WIFI_PREFERENCES_NAMESPACE).putBool(WIFI_PREFERENCES_KEY_ENABLE_ON_BOOT, enable); 10 | } 11 | 12 | bool shouldEnableOnBoot() { 13 | bool enable = false; 14 | Preferences(WIFI_PREFERENCES_NAMESPACE).optBool(WIFI_PREFERENCES_KEY_ENABLE_ON_BOOT, enable); 15 | return enable; 16 | } 17 | 18 | } // namespace 19 | -------------------------------------------------------------------------------- /Tactility/Source/service/wifi/WifiSettingsMock.cpp: -------------------------------------------------------------------------------- 1 | #ifndef ESP_PLATFORM 2 | 3 | #include "Tactility/service/wifi/WifiSettings.h" 4 | 5 | namespace tt::service::wifi::settings { 6 | 7 | #define TAG "wifi_settings_mock" 8 | 9 | bool contains(const char* ssid) { 10 | return false; 11 | } 12 | 13 | bool load(const char* ssid, WifiApSettings* settings) { 14 | return false; 15 | } 16 | 17 | bool save(const WifiApSettings* settings) { 18 | return true; 19 | } 20 | 21 | bool remove(const char* ssid) { 22 | return true; 23 | } 24 | 25 | } // namespace 26 | 27 | #endif // ESP_PLATFORM -------------------------------------------------------------------------------- /TactilityC/Include/tt_app_alertdialog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "tt_bundle.h" 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #include 10 | 11 | /** 12 | * Show a dialog with the provided title, message and 0, 1 or more buttons. 13 | * @param[in] title the title to show in the toolbar 14 | * @param[in] message the message to display 15 | * @param[in] buttonLabels the buttons to show, or null when there are none to show 16 | * @param[in] buttonLabelCount the amount of buttons (0 or more) 17 | */ 18 | void tt_app_alertdialog_start(const char* title, const char* message, const char* buttonLabels[], uint32_t buttonLabelCount); 19 | 20 | /** 21 | * @return the index of the button that was clicked (the index in the array when start() was called) 22 | */ 23 | int32_t tt_app_alertdialog_get_result_index(BundleHandle handle); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif -------------------------------------------------------------------------------- /TactilityC/Include/tt_app_selectiondialog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "tt_bundle.h" 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | /** 10 | * Start an app that displays a list of items and allows the user to select one. 11 | * @param[in] title the title to show in the toolbar 12 | * @param[in] argc the amount of items that the list contains 13 | * @param[in] argv the labels of the items in the list 14 | */ 15 | void tt_app_selectiondialog_start(const char* title, int argc, const char* argv[]); 16 | 17 | /** @return the index of the item that was clicked by the user, or -1 when the user didn't select anything */ 18 | int32_t tt_app_selectiondialog_get_result_index(BundleHandle handle); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif -------------------------------------------------------------------------------- /TactilityC/Include/tt_init.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | /** 8 | * Initialization method for TactilityC 9 | * @warning This is called from the main firmware. Don't call this from an external app! 10 | */ 11 | void tt_init_tactility_c(); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | -------------------------------------------------------------------------------- /TactilityC/Include/tt_lvgl_spinner.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | /** Create a spinner widget. */ 10 | lv_obj_t* tt_lvgl_spinner_create(lv_obj_t* parent); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif -------------------------------------------------------------------------------- /TactilityC/Source/tt_app_alertdialog.cpp: -------------------------------------------------------------------------------- 1 | #include "tt_app_alertdialog.h" 2 | #include 3 | 4 | extern "C" { 5 | 6 | void tt_app_alertdialog_start(const char* title, const char* message, const char* buttonLabels[], uint32_t buttonLabelCount) { 7 | std::vector list; 8 | for (int i = 0; i < buttonLabelCount; i++) { 9 | list.emplace_back(buttonLabels[i]); 10 | } 11 | tt::app::alertdialog::start(title, message, list); 12 | } 13 | 14 | int32_t tt_app_alertdialog_get_result_index(BundleHandle handle) { 15 | return tt::app::alertdialog::getResultIndex(*(tt::Bundle*)handle); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /TactilityC/Source/tt_app_manifest.cpp: -------------------------------------------------------------------------------- 1 | #include "tt_app_manifest.h" 2 | 3 | #include 4 | #include 5 | 6 | #define TAG "tt_app" 7 | 8 | extern "C" { 9 | 10 | void tt_app_register( 11 | const ExternalAppManifest* manifest 12 | ) { 13 | #ifdef ESP_PLATFORM 14 | assert((manifest->createData == nullptr) == (manifest->destroyData == nullptr)); 15 | setElfAppManifest( 16 | manifest->name, 17 | manifest->icon, 18 | manifest->createData, 19 | manifest->destroyData, 20 | manifest->onCreate, 21 | manifest->onDestroy, 22 | manifest->onShow, 23 | manifest->onHide, 24 | reinterpret_cast(manifest->onResult) 25 | ); 26 | #else 27 | tt_crash("TactilityC is not intended for PC/Simulator"); 28 | #endif 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /TactilityC/Source/tt_app_selectiondialog.cpp: -------------------------------------------------------------------------------- 1 | #include "tt_app_selectiondialog.h" 2 | #include 3 | 4 | extern "C" { 5 | 6 | void tt_app_selectiondialog_start(const char* title, int argc, const char* argv[]) { 7 | std::vector list; 8 | for (int i = 0; i < argc; i++) { 9 | list.emplace_back(argv[i]); 10 | } 11 | tt::app::selectiondialog::start(title, list); 12 | } 13 | 14 | int32_t tt_app_selectiondialog_get_result_index(BundleHandle handle) { 15 | return tt::app::selectiondialog::getResultIndex(*(tt::Bundle*)handle); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /TactilityC/Source/tt_lvgl_spinner.cpp: -------------------------------------------------------------------------------- 1 | #include "tt_lvgl_spinner.h" 2 | #include 3 | 4 | extern "C" { 5 | 6 | lv_obj_t* tt_lvgl_spinner_create(lv_obj_t* parent) { 7 | return tt::lvgl::spinner_create(parent); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /TactilityC/Source/tt_mutex.cpp: -------------------------------------------------------------------------------- 1 | #include "tt_mutex.h" 2 | #include 3 | 4 | extern "C" { 5 | 6 | #define HANDLE_AS_MUTEX(handle) ((tt::Mutex*)(handle)) 7 | 8 | MutexHandle tt_mutex_alloc(enum TtMutexType type) { 9 | switch (type) { 10 | case TtMutexType::MUTEX_TYPE_NORMAL: 11 | return new tt::Mutex(tt::Mutex::Type::Normal); 12 | case TtMutexType::MUTEX_TYPE_RECURSIVE: 13 | return new tt::Mutex(tt::Mutex::Type::Recursive); 14 | default: 15 | tt_crash("Type not supported"); 16 | } 17 | } 18 | 19 | void tt_mutex_free(MutexHandle handle) { 20 | delete HANDLE_AS_MUTEX(handle); 21 | } 22 | 23 | bool tt_mutex_lock(MutexHandle handle, TickType_t timeout) { 24 | return HANDLE_AS_MUTEX(handle)->lock((TickType_t)timeout); 25 | } 26 | 27 | bool tt_mutex_unlock(MutexHandle handle) { 28 | return HANDLE_AS_MUTEX(handle)->unlock(); 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /TactilityC/Source/tt_semaphore.cpp: -------------------------------------------------------------------------------- 1 | #include "tt_semaphore.h" 2 | #include 3 | 4 | extern "C" { 5 | 6 | #define HANDLE_AS_SEMAPHORE(handle) ((tt::Semaphore*)(handle)) 7 | 8 | SemaphoreHandle tt_semaphore_alloc(uint32_t maxCount, TickType_t initialCount) { 9 | return new tt::Semaphore(maxCount, initialCount); 10 | } 11 | 12 | void tt_semaphore_free(SemaphoreHandle handle) { 13 | delete HANDLE_AS_SEMAPHORE(handle); 14 | } 15 | 16 | bool tt_semaphore_acquire(SemaphoreHandle handle, TickType_t timeoutTicks) { 17 | return HANDLE_AS_SEMAPHORE(handle)->acquire(timeoutTicks); 18 | } 19 | 20 | bool tt_semaphore_release(SemaphoreHandle handle) { 21 | return HANDLE_AS_SEMAPHORE(handle)->release(); 22 | } 23 | 24 | uint32_t tt_semaphore_get_count(SemaphoreHandle handle) { 25 | return HANDLE_AS_SEMAPHORE(handle)->getAvailable(); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/CoreDefines.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreExtraDefines.h" 4 | 5 | #define TT_UNUSED __attribute__((unused)) 6 | 7 | // region Variable arguments support 8 | 9 | // Adapted from https://stackoverflow.com/a/78848701/3848666 10 | #define TT_ARG_IGNORE(X) 11 | #define TT_ARG_CAT(X,Y) _TT_ARG_CAT(X,Y) 12 | #define _TT_ARG_CAT(X,Y) X ## Y 13 | #define TT_ARGCOUNT(...) _TT_ARGCOUNT ## __VA_OPT__(1(__VA_ARGS__) TT_ARG_IGNORE) (0) 14 | #define _TT_ARGCOUNT1(X,...) _TT_ARGCOUNT ## __VA_OPT__(2(__VA_ARGS__) TT_ARG_IGNORE) (1) 15 | #define _TT_ARGCOUNT2(X,...) _TT_ARGCOUNT ## __VA_OPT__(3(__VA_ARGS__) TT_ARG_IGNORE) (2) 16 | #define _TT_ARGCOUNT3(X,...) _TT_ARGCOUNT ## __VA_OPT__(4(__VA_ARGS__) TT_ARG_IGNORE) (3) 17 | #define _TT_ARGCOUNT4(X,...) _TT_ARGCOUNT ## __VA_OPT__(5(__VA_ARGS__) TT_ARG_IGNORE) (4) 18 | #define _TT_ARGCOUNT5(X,...) 5 19 | #define _TT_ARGCOUNT(X) X 20 | -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/CoreExtraDefines.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define TT_STRINGIFY(x) #x 4 | -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/DispatcherThread.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Dispatcher.h" 4 | 5 | namespace tt { 6 | 7 | /** Starts a Thread to process dispatched messages */ 8 | class DispatcherThread { 9 | 10 | Dispatcher dispatcher; 11 | std::unique_ptr thread; 12 | bool interruptThread = false; 13 | 14 | int32_t threadMain(); 15 | 16 | public: 17 | 18 | explicit DispatcherThread(const std::string& threadName, size_t threadStackSize = 4096); 19 | ~DispatcherThread(); 20 | 21 | /** 22 | * Dispatch a message. 23 | */ 24 | void dispatch(Dispatcher::Function function, TickType_t timeout = portMAX_DELAY); 25 | 26 | /** Start the thread (blocking). */ 27 | void start(); 28 | 29 | /** Stop the thread (blocking). */ 30 | void stop(); 31 | }; 32 | 33 | } -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/Log.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "LogMessages.h" 4 | #include 5 | #include 6 | 7 | #if not defined(ESP_PLATFORM) or (defined(CONFIG_SPIRAM_USE_MALLOC) && CONFIG_SPIRAM_USE_MALLOC == 1) 8 | #define TT_LOG_ENTRY_COUNT 200 9 | #define TT_LOG_MESSAGE_SIZE 128 10 | #else 11 | #define TT_LOG_ENTRY_COUNT 50 12 | #define TT_LOG_MESSAGE_SIZE 50 13 | #endif 14 | 15 | #ifdef ESP_PLATFORM 16 | #include "LogEsp.h" 17 | #else 18 | #include "LogSimulator.h" 19 | #endif 20 | 21 | #include "LogCommon.h" 22 | 23 | namespace tt { 24 | 25 | struct LogEntry { 26 | LogLevel level = LogLevel::Verbose; 27 | char message[TT_LOG_MESSAGE_SIZE] = { 0 }; 28 | }; 29 | 30 | /** Make a copy of the currently stored entries. 31 | * The array size is TT_LOG_ENTRY_COUNT 32 | * @param[out] outIndex the write index for the next log entry. 33 | */ 34 | std::unique_ptr> copyLogEntries(std::size_t& outIndex); 35 | 36 | } // namespace tt 37 | -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/LogCommon.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace tt { 4 | 5 | /** Used for log output filtering */ 6 | enum class LogLevel : int { 7 | Error, /*!< Critical errors, software module can not recover on its own */ 8 | Warning, /*!< Error conditions from which recovery measures have been taken */ 9 | Info, /*!< Information messages which describe normal flow of events */ 10 | Debug, /*!< Extra information which is not necessary for normal use (values, pointers, sizes, etc). */ 11 | Verbose /*!< Bigger chunks of debugging information, or frequent messages which can potentially flood the output. */ 12 | }; 13 | 14 | } -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/LogEsp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef ESP_PLATFORM 4 | 5 | #include 6 | 7 | #define TT_LOG_E(tag, format, ...) \ 8 | ESP_LOGE(tag, format, ##__VA_ARGS__) 9 | #define TT_LOG_W(tag, format, ...) \ 10 | ESP_LOGW(tag, format, ##__VA_ARGS__) 11 | #define TT_LOG_I(tag, format, ...) \ 12 | ESP_LOGI(tag, format, ##__VA_ARGS__) 13 | #define TT_LOG_D(tag, format, ...) \ 14 | ESP_LOGD(tag, format, ##__VA_ARGS__) 15 | #define TT_LOG_V(tag, format, ...) \ 16 | ESP_LOGV(tag, format, ##__VA_ARGS__) 17 | 18 | #endif // ESP_PLATFORM 19 | -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/LogMessages.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains common log messages. 3 | * This helps to keep the binary smaller. 4 | */ 5 | #pragma once 6 | 7 | // Mutex 8 | #define LOG_MESSAGE_MUTEX_LOCK_FAILED "Mutex acquisition timeout" 9 | #define LOG_MESSAGE_MUTEX_LOCK_FAILED_FMT "Mutex acquisition timeout (%s)" 10 | 11 | // SPI 12 | #define LOG_MESSAGE_SPI_INIT_START_FMT "SPI %d init" 13 | #define LOG_MESSAGE_SPI_INIT_FAILED_FMT "SPI %d init failed" 14 | 15 | // I2C 16 | #define LOG_MESSAGE_I2C_INIT_START "I2C init" 17 | #define LOG_MESSAGE_I2C_INIT_CONFIG_FAILED "I2C config failed" 18 | #define LOG_MESSAGE_I2C_INIT_DRIVER_INSTALL_FAILED "I2C driver install failed" 19 | 20 | // Power on 21 | #define LOG_MESSAGE_POWER_ON_START "Power on" 22 | #define LOG_MESSAGE_POWER_ON_FAILED "Power on failed" 23 | -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/LogSimulator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef ESP_PLATFORM 4 | 5 | #include "LogCommon.h" 6 | 7 | #include 8 | #include 9 | 10 | namespace tt { 11 | 12 | void log(LogLevel level, const char* tag, const char* format, ...); 13 | 14 | } // namespace 15 | 16 | #define TT_LOG_E(tag, format, ...) \ 17 | tt::log(tt::LogLevel::Error, tag, format, ##__VA_ARGS__) 18 | #define TT_LOG_W(tag, format, ...) \ 19 | tt::log(tt::LogLevel::Warning, tag, format, ##__VA_ARGS__) 20 | #define TT_LOG_I(tag, format, ...) \ 21 | tt::log(tt::LogLevel::Info, tag, format, ##__VA_ARGS__) 22 | #define TT_LOG_D(tag, format, ...) \ 23 | tt::log(tt::LogLevel::Debug, tag, format, ##__VA_ARGS__) 24 | #define TT_LOG_V(tag, format, ...) \ 25 | tt::log(tt::LogLevel::Verbose, tag, format, ##__VA_ARGS__) 26 | 27 | #endif // ESP_PLATFORM 28 | -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/RtosCompat.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /** 4 | * Compatibility includes for FreeRTOS. 5 | * Custom FreeRTOS from ESP-IDF prefixes paths with "freertos/", 6 | * but this isn't the normal behaviour for the regular FreeRTOS project. 7 | */ 8 | 9 | #ifdef ESP_PLATFORM 10 | #include "freertos/FreeRTOS.h" 11 | #else 12 | #include "FreeRTOS.h" 13 | #endif 14 | -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/RtosCompatEventGroups.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /** 4 | * See explanation in RtosCompat.h 5 | */ 6 | 7 | #ifdef ESP_PLATFORM 8 | #include "freertos/FreeRTOS.h" 9 | #include "freertos/event_groups.h" 10 | #else 11 | #include "FreeRTOS.h" 12 | #include "event_groups.h" 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/RtosCompatSemaphore.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /** 4 | * See explanation in RtosCompat.h 5 | */ 6 | 7 | #ifdef ESP_PLATFORM 8 | #include "freertos/FreeRTOS.h" 9 | #include "freertos/semphr.h" 10 | #else 11 | #include "FreeRTOS.h" 12 | #include "semphr.h" 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/RtosCompatTask.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /** 4 | * See explanation in RtosCompat.h 5 | */ 6 | 7 | #ifdef ESP_PLATFORM 8 | #include "freertos/FreeRTOS.h" 9 | #include "freertos/task.h" 10 | #else 11 | #include "FreeRTOS.h" 12 | #include "task.h" 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/RtosCompatTimers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /** 4 | * See explanation in RtosCompat.h 5 | */ 6 | 7 | #ifdef ESP_PLATFORM 8 | #include "freertos/FreeRTOS.h" 9 | #include "freertos/timers.h" 10 | #else 11 | #include "FreeRTOS.h" 12 | #include "timers.h" 13 | #endif 14 | -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/TactilityCore.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "Check.h" 6 | #include "CoreDefines.h" 7 | #include "CoreExtraDefines.h" 8 | #include "EventFlag.h" 9 | #include "kernel/Kernel.h" 10 | #include "kernel/critical/Critical.h" 11 | #include "Log.h" 12 | #include "Mutex.h" 13 | #include "Thread.h" 14 | -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/TactilityCoreConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define TT_CONFIG_THREAD_MAX_PRIORITIES 10 -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/crypt/Hash.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace tt::crypt { 7 | 8 | /** 9 | * Implementation of DJB2 hashing algorithm. 10 | * @param[in] str the string to calculate the hash for 11 | * @return the hash 12 | */ 13 | uint32_t djb2(const char* str); 14 | 15 | /** 16 | * Implementation of DJB2 hashing algorithm. 17 | * @param[in] data the bytes to calculate the hash for 18 | * @param[in] length the size of data 19 | * @return the hash 20 | */ 21 | uint32_t djb2(const void* data, size_t length); 22 | 23 | } // namespace 24 | -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/kernel/PanicHandler.h: -------------------------------------------------------------------------------- 1 | #ifdef ESP_PLATFORM 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | #define CRASH_DATA_CALLSTACK_LIMIT 64 8 | #define CRASH_DATA_INCLUDES_SP false 9 | 10 | /** Represents a single frame on the callstack. */ 11 | struct CallstackFrame { 12 | uint32_t pc = 0; 13 | #if CRASH_DATA_INCLUDES_SP 14 | uint32_t sp = 0; 15 | #endif 16 | }; 17 | 18 | /** Callstack-related crash data. */ 19 | struct CrashData { 20 | bool callstackCorrupted = false; 21 | uint8_t callstackLength = 0; 22 | CallstackFrame callstack[CRASH_DATA_CALLSTACK_LIMIT]; 23 | }; 24 | 25 | /** @return the crash data */ 26 | const CrashData& getRtcCrashData(); 27 | 28 | #endif -------------------------------------------------------------------------------- /TactilityCore/Include/Tactility/kernel/critical/Critical.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace tt::kernel::critical { 6 | 7 | struct CriticalInfo { 8 | uint32_t isrm; 9 | bool fromIsr; 10 | bool kernelRunning; 11 | }; 12 | 13 | /** Enter a critical section 14 | * @return info on the status 15 | */ 16 | CriticalInfo enter(); 17 | 18 | /** 19 | * Exit a critical section 20 | * @param[in] info the info from when the critical section was started 21 | */ 22 | void exit(CriticalInfo info); 23 | 24 | } // namespace 25 | -------------------------------------------------------------------------------- /TactilityCore/README.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 3 | Some of this code is derived from [Flipper Zero firmware](https://github.com/flipperdevices/flipperzero-firmware/). 4 | Some of it is inspired by the Android operating system. 5 | 6 | ## License 7 | 8 | [GNU General Public License Version 3](LICENSE.md) 9 | -------------------------------------------------------------------------------- /TactilityCore/Source/Lock.cpp: -------------------------------------------------------------------------------- 1 | #include "Tactility/Lock.h" 2 | 3 | namespace tt { 4 | 5 | std::unique_ptr Lock::scoped() const { 6 | return std::make_unique(*this); 7 | } 8 | 9 | ScopedLock Lock::asScopedLock() const { 10 | return ScopedLock(*this); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /TactilityCore/Source/LogEsp.cpp: -------------------------------------------------------------------------------- 1 | #ifdef ESP_PLATFORM 2 | 3 | #include "Tactility/LogCommon.h" 4 | #include 5 | 6 | namespace tt { 7 | void storeLog(LogLevel level, const char* format, va_list args); 8 | } 9 | 10 | extern "C" { 11 | 12 | extern void __real_esp_log_write(esp_log_level_t level, const char* tag, const char* format, ...); 13 | 14 | void __wrap_esp_log_write(esp_log_level_t level, const char* tag, const char* format, ...) { 15 | va_list args; 16 | va_start(args, format); 17 | tt::storeLog((tt::LogLevel)level, format, args); 18 | esp_log_writev(level, tag, format, args); 19 | va_end(args); 20 | } 21 | 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /TactilityCore/Source/crypt/Hash.cpp: -------------------------------------------------------------------------------- 1 | #include "Tactility/crypt/Hash.h" 2 | 3 | namespace tt::crypt { 4 | 5 | uint32_t djb2(const char* str) { 6 | uint32_t hash = 5381; 7 | char c = (char)*str++; 8 | while (c != 0) { 9 | hash = ((hash << 5) + hash) + (uint32_t)c; // hash * 33 + c 10 | c = (char)*str++; 11 | } 12 | return hash; 13 | } 14 | 15 | uint32_t djb2(const void* data, size_t length) { 16 | uint32_t hash = 5381; 17 | auto* data_bytes = static_cast(data); 18 | uint8_t c = *data_bytes++; 19 | size_t index = 0; 20 | while (index < length) { 21 | hash = ((hash << 5) + hash) + (uint32_t)c; // hash * 33 + c 22 | c = *data_bytes++; 23 | index++; 24 | } 25 | return hash; 26 | } 27 | 28 | } // namespace 29 | -------------------------------------------------------------------------------- /Tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(tests) 2 | 3 | set(DOCTESTINC ${PROJECT_SOURCE_DIR}/Include) 4 | 5 | enable_testing() 6 | add_subdirectory(TactilityCore) 7 | add_subdirectory(Tactility) 8 | 9 | add_custom_target(build-tests) 10 | add_dependencies(build-tests TactilityCoreTests) 11 | add_dependencies(build-tests TactilityTests) 12 | -------------------------------------------------------------------------------- /Tests/Tactility/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(TactilityCoreTests) 2 | 3 | enable_language(C CXX ASM) 4 | 5 | set(CMAKE_CXX_COMPILER g++) 6 | 7 | file(GLOB_RECURSE TEST_SOURCES ${PROJECT_SOURCE_DIR}/*.cpp) 8 | add_executable(TactilityTests EXCLUDE_FROM_ALL ${TEST_SOURCES}) 9 | 10 | add_definitions(-D_Nullable=) 11 | add_definitions(-D_Nonnull=) 12 | 13 | target_include_directories(TactilityTests PRIVATE 14 | ${DOCTESTINC} 15 | ) 16 | 17 | add_test(NAME TactilityTests 18 | COMMAND TactilityTests 19 | ) 20 | 21 | target_link_libraries(TactilityTests PRIVATE 22 | Tactility 23 | TactilityCore 24 | Tactility 25 | Simulator 26 | SDL2::SDL2-static SDL2-static 27 | ) 28 | -------------------------------------------------------------------------------- /Tests/TactilityCore/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(TactilityCoreTests) 2 | 3 | enable_language(C CXX ASM) 4 | 5 | set(CMAKE_CXX_COMPILER g++) 6 | 7 | file(GLOB_RECURSE TEST_SOURCES ${PROJECT_SOURCE_DIR}/*.cpp) 8 | add_executable(TactilityCoreTests EXCLUDE_FROM_ALL ${TEST_SOURCES}) 9 | 10 | add_definitions(-D_Nullable=) 11 | add_definitions(-D_Nonnull=) 12 | 13 | target_include_directories(TactilityCoreTests PRIVATE 14 | ${DOCTESTINC} 15 | ) 16 | 17 | add_test(NAME TactilityCoreTests 18 | COMMAND TactilityCoreTests 19 | ) 20 | 21 | target_link_libraries(TactilityCoreTests PUBLIC 22 | TactilityCore 23 | freertos_kernel 24 | ) 25 | -------------------------------------------------------------------------------- /Tests/TactilityCore/FileTest.cpp: -------------------------------------------------------------------------------- 1 | #include "doctest.h" 2 | #include 3 | 4 | using namespace tt; 5 | 6 | TEST_CASE("findOrCreateDirectory can create a directory tree without prefix") { 7 | CHECK_EQ(file::findOrCreateDirectory("test1/test1", 0777), true); 8 | // TODO: delete dirs 9 | } 10 | 11 | TEST_CASE("findOrCreateDirectory can create a directory tree with prefix") { 12 | CHECK_EQ(file::findOrCreateDirectory("/test2/test2", 0777), true); 13 | // TODO: delete dirs 14 | } 15 | -------------------------------------------------------------------------------- /partitions.csv: -------------------------------------------------------------------------------- 1 | # Name, Type, SubType, Offset, Size, Flags 2 | # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap 3 | nvs, data, nvs, 0x9000, 0x6000, 4 | phy_init, data, phy, 0xf000, 0x1000, 5 | factory, app, factory, 0x10000, 3M, 6 | system, data, fat, , 256k, 7 | data, data, fat, , 256k, 8 | -------------------------------------------------------------------------------- /sdkconfig.developer: -------------------------------------------------------------------------------- 1 | CONFIG_STACK_CHECK_STRONG=y 2 | 3 | CONFIG_LV_USE_SYSMON=y 4 | CONFIG_LV_USE_OBSERVER=y 5 | CONFIG_LV_USE_PERF_MONITOR=y 6 | 7 | CONFIG_LV_USE_REFR_DEBUG=y 8 | CONFIG_LV_USE_LAYER_DEBUG=y 9 | 10 | CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y 11 | -------------------------------------------------------------------------------- /sdkconfig.md: -------------------------------------------------------------------------------- 1 | # Get Started 2 | 3 | Copy the relevant `sdkconfig.board.*` file into `sdkconfig`. 4 | This will apply the relevant settings to build the project for your hardware. 5 | 6 | # Useful Parameters 7 | 8 | ## Enable FPS 9 | 10 | ``` 11 | CONFIG_LV_USE_OBSERVER=y 12 | CONFIG_LV_USE_PERF_MONITOR=y 13 | ``` 14 | 15 | ## Halt on error 16 | 17 | ``` 18 | CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y 19 | # CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT is not set 20 | ``` 21 | -------------------------------------------------------------------------------- /version.txt: -------------------------------------------------------------------------------- 1 | 0.4.0 --------------------------------------------------------------------------------