599fa46766
- New drivers: - SD SPI - spi_peripheral - touch_placeholder - display_placeholder - Devicetree compiler: - Implement phandle-arrays - Implement device addresses - Add placeholder drivers to all devices with a SPI display - SPI driver: add `cs-pins` and set them to high on driver start - FileSystem: add `file_system_set_owner()` and `file_system_get_owner()` - File locking is now checking if the related `FileSystem` is part of a shared SPI bus - Add `device_get_child_count()` - SDMMC driver: Remove default of `slot` value - Fix for Crowpanel Basic 3.5" display (add delay to booting) - Fix for LilyGO T-HMI SD card mounting (delayed mounting by disabling it initially in the dts)
33 lines
721 B
C++
33 lines
721 B
C++
#include "devices/Display.h"
|
|
|
|
#include <Tactility/hal/Configuration.h>
|
|
#include <TCA9534.h>
|
|
|
|
using namespace tt::hal;
|
|
|
|
static bool initBoot() {
|
|
TCA9534_IO_EXP io_expander = {
|
|
.I2C_ADDR = 0x18,
|
|
.i2c_master_port = I2C_NUM_0,
|
|
.interrupt_pin = GPIO_NUM_NC,
|
|
.interrupt_task = nullptr
|
|
};
|
|
|
|
// Enable LCD backlight
|
|
set_tca9534_io_pin_direction(&io_expander, TCA9534_IO1, TCA9534_OUTPUT);
|
|
set_tca9534_io_pin_output_state(&io_expander, TCA9534_IO1, 255);
|
|
|
|
return true;
|
|
}
|
|
|
|
static DeviceVector createDevices() {
|
|
return {
|
|
createDisplay(),
|
|
};
|
|
}
|
|
|
|
extern const Configuration hardwareConfiguration = {
|
|
.initBoot = initBoot,
|
|
.createDevices = createDevices
|
|
};
|