50c0a14a93
- Added kernel base drivers for: display, pointer (touch, mouse, etc.), keyboard, adc, power supply and backlight - Implement new kernel driver modules: `st7789-module` and `gt911-module` - Implement ESP32 ADC "oneshot" kernel driver - Implement ESP32 backlight kernel driver with ledc API - Implemented `battery-sense` driver that allows for voltage measurement and creates a power supply child device - Updated github actions - Updated flash scripts - Fix for esp32 legacy driver conflict with ADC - Created separate `lilygo-tdeck` and `lilygo-tdeck-plus` devices - Created `lilygo-module` with LilyGO kernel drivers - Fix for intermittent errors in build related to code generation of `devicetree.c` - `lvgl-module` can now map kernel drivers onto LVGL devices - Created `KernelDisplayApp` as a mirror of `HalDisplayApp` (formerly `DisplayApp`) - Removed `struct` and `enum` prefix in a lot of kernel driver cpp source files - `lilygo-tdeck` and `lilygo-tdeck-plus` are now fully relying on kernel drivers and don't use any of the old HAL
33 lines
899 B
C++
33 lines
899 B
C++
// SPDX-License-Identifier: Apache-2.0
|
|
#include <tactility/check.h>
|
|
#include <tactility/driver.h>
|
|
#include <tactility/module.h>
|
|
|
|
extern "C" {
|
|
|
|
extern Driver st7789_driver;
|
|
|
|
static error_t start() {
|
|
/* We crash when construct fails, because if a single driver fails to construct,
|
|
* there is no guarantee that the previously constructed drivers can be destroyed */
|
|
check(driver_construct_add(&st7789_driver) == ERROR_NONE);
|
|
return ERROR_NONE;
|
|
}
|
|
|
|
static error_t stop() {
|
|
/* We crash when destruct fails, because if a single driver fails to destruct,
|
|
* there is no guarantee that the previously destroyed drivers can be recovered */
|
|
check(driver_remove_destruct(&st7789_driver) == ERROR_NONE);
|
|
return ERROR_NONE;
|
|
}
|
|
|
|
Module st7789_module = {
|
|
.name = "st7789",
|
|
.start = start,
|
|
.stop = stop,
|
|
.symbols = nullptr,
|
|
.internal = nullptr
|
|
};
|
|
|
|
} // extern "C"
|