Ken Van Hoeylandt 87ca888bb4
Create DTS files for all devices and implement I2C changes (#466)
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`
2026-01-29 22:01:19 +01:00

40 lines
1.0 KiB
C++

#include "devices/Display.h"
#include "devices/Power.h"
#include <Tactility/hal/Configuration.h>
#include <Tactility/lvgl/LvglSync.h>
#include <ButtonControl.h>
bool initBoot();
using namespace tt::hal;
static std::vector<std::shared_ptr<Device>> createDevices() {
return {
createPower(),
createDisplay(),
ButtonControl::createTwoButtonControl(0, 14),
};
}
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.spi {
spi::Configuration {
.device = SPI2_HOST,
.dma = SPI_DMA_CH_AUTO,
.config = {
.mosi_io_num = GPIO_NUM_7,
.miso_io_num = GPIO_NUM_NC,
.sclk_io_num = GPIO_NUM_6,
.max_transfer_sz = DISPLAY_HORIZONTAL_RESOLUTION * DISPLAY_VERTICAL_RESOLUTION * 2,
.flags = 0
},
.initMode = spi::InitMode::ByTactility,
.isMutable = false,
.lock = tt::lvgl::getSyncLock()
}
}
};