mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
Devictree changes: - Create DTS files for all remaining devices - Update corresponding `devicetree.yaml` - Remove `i2c` configuration from corresponding `tt::hal::Configuration` Apps & HAL: - Removed I2C Settings (we'll make a new one later after I rework that part of the HAL) - Delete TactilityC GPIO and I2C functionality - Delete Related SystemEvent types - Refactor `tt::hal::i2c` to only use `struct Device*` wrapping Scripting: - Fix DevicetreeCompiler boolean parsing - Create `build-all.py`
32 lines
759 B
C++
32 lines
759 B
C++
#include <PwmBacklight.h>
|
|
#include "devices/Display.h"
|
|
|
|
#include <Tactility/hal/Configuration.h>
|
|
#include <driver/gpio.h>
|
|
#include <freertos/FreeRTOS.h>
|
|
#include <freertos/task.h>
|
|
|
|
using namespace tt::hal;
|
|
|
|
static bool initBoot() {
|
|
//Display Reset
|
|
ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_46, GPIO_MODE_OUTPUT));
|
|
ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_46, 0));
|
|
vTaskDelay(pdMS_TO_TICKS(100));
|
|
ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_46, 1));
|
|
vTaskDelay(pdMS_TO_TICKS(10));
|
|
|
|
return driver::pwmbacklight::init(GPIO_NUM_21);
|
|
}
|
|
|
|
static DeviceVector createDevices() {
|
|
return {
|
|
createDisplay()
|
|
};
|
|
}
|
|
|
|
extern const Configuration hardwareConfiguration = {
|
|
.initBoot = initBoot,
|
|
.createDevices = createDevices
|
|
};
|