fa4a6e255c
- Added modular device support and devicetree bindings for ILI9341, ILI9488, CST816S, XPT2046, and GPIO button input, updating several board configurations for display/touch/backlight/keyboard/battery. - Added a setting to control deprecated HAL usage (device property + Kconfig).
38 lines
914 B
C++
38 lines
914 B
C++
#include <Tactility/Tactility.h>
|
|
|
|
#include <tactility/driver.h>
|
|
#include <devicetree.h>
|
|
|
|
#ifdef ESP_PLATFORM
|
|
#include <tt_init.h>
|
|
#else
|
|
#include <Simulator.h>
|
|
#endif
|
|
|
|
#ifdef CONFIG_TT_USE_DEPRECATED_HAL
|
|
// Each board project declares this variable
|
|
extern const tt::hal::Configuration hardwareConfiguration;
|
|
#else
|
|
// Legacy placeholder (required until legacy HAL is cleaned up everywhere)
|
|
extern const tt::hal::Configuration hardwareConfiguration = {};
|
|
#endif
|
|
|
|
extern "C" {
|
|
|
|
void app_main() {
|
|
static const tt::Configuration config = {
|
|
/**
|
|
* Auto-select a board based on the ./sdkconfig.board.* file
|
|
* that you copied to ./sdkconfig before you opened this project.
|
|
*/
|
|
.hardware = &hardwareConfiguration
|
|
};
|
|
|
|
#ifdef ESP_PLATFORM
|
|
tt_init_tactility_c(); // ELF bindings for side-loading on ESP32
|
|
#endif
|
|
|
|
tt::run(config, dts_modules, dts_devices);
|
|
}
|
|
|
|
} // extern
|