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).
34 lines
745 B
C++
34 lines
745 B
C++
#include <tactility/module.h>
|
|
#include <tactility/error.h>
|
|
|
|
#include <driver/gpio.h>
|
|
|
|
extern "C" {
|
|
|
|
static error_t start() {
|
|
// Set the RGB LED pins to output and turn them off (0 on, 1 off)
|
|
gpio_set_direction(GPIO_NUM_4, GPIO_MODE_OUTPUT); // Red
|
|
gpio_set_direction(GPIO_NUM_16, GPIO_MODE_OUTPUT); // Green
|
|
gpio_set_direction(GPIO_NUM_17, GPIO_MODE_OUTPUT); // Blue
|
|
|
|
gpio_set_level(GPIO_NUM_4, 1); // Red
|
|
gpio_set_level(GPIO_NUM_16, 1); // Green
|
|
gpio_set_level(GPIO_NUM_17, 1); // Blue
|
|
|
|
return ERROR_NONE;
|
|
}
|
|
|
|
static error_t stop() {
|
|
return ERROR_NONE;
|
|
}
|
|
|
|
Module cyd_2432s024c_module = {
|
|
.name = "cyd-2432s024c",
|
|
.start = start,
|
|
.stop = stop,
|
|
.symbols = nullptr,
|
|
.internal = nullptr
|
|
};
|
|
|
|
}
|