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`
This commit is contained in:
Ken Van Hoeylandt
2026-01-29 22:01:19 +01:00
committed by GitHub
parent 71f8369377
commit 87ca888bb4
139 changed files with 1226 additions and 1750 deletions
-32
View File
@@ -1,32 +0,0 @@
#include "tt_hal_gpio.h"
#include <Tactility/hal/gpio/Gpio.h>
extern "C" {
using namespace tt::hal;
bool tt_hal_gpio_configure(GpioPin pin, GpioMode mode, bool pullUp, bool pullDown) {
return gpio::configure(pin, static_cast<gpio::Mode>(mode), pullUp, pullDown);
}
bool tt_hal_gpio_configure_with_pin_bitmask(uint64_t pinBitMask, GpioMode mode, bool pullUp, bool pullDown) {
return gpio::configureWithPinBitmask(pinBitMask, static_cast<gpio::Mode>(mode), pullUp, pullDown);
}
bool tt_hal_gpio_set_mode(GpioPin pin, GpioMode mode) {
return gpio::setMode(pin, static_cast<gpio::Mode>(mode));
}
bool tt_hal_gpio_get_level(GpioPin pin) {
return gpio::getLevel(pin);
}
bool tt_hal_gpio_set_level(GpioPin pin, bool level) {
return gpio::setLevel(pin, level);
}
int tt_hal_gpio_get_pin_count() {
return gpio::getPinCount();
}
}
-50
View File
@@ -1,50 +0,0 @@
#include "tt_hal_i2c.h"
#include <Tactility/hal/i2c/I2c.h>
extern "C" {
bool tt_hal_i2c_start(i2c_port_t port) {
return tt::hal::i2c::start(port);
}
bool tt_hal_i2c_stop(i2c_port_t port) {
return tt::hal::i2c::stop(port);
}
bool tt_hal_i2c_is_started(i2c_port_t port) {
return tt::hal::i2c::isStarted(port);
}
bool tt_hal_i2c_master_read(i2c_port_t port, uint8_t address, uint8_t* data, size_t dataSize, TickType_t timeout) {
return tt::hal::i2c::masterRead(port, address, data, dataSize, timeout);
}
bool tt_hal_i2c_master_read_register(i2c_port_t port, uint8_t address, uint8_t reg, uint8_t* data, size_t dataSize, TickType_t timeout) {
return tt::hal::i2c::masterReadRegister(port, address, reg, data, dataSize, timeout);
}
bool tt_hal_i2c_master_write(i2c_port_t port, uint8_t address, const uint8_t* data, uint16_t dataSize, TickType_t timeout) {
return tt::hal::i2c::masterWrite(port, address, data, dataSize, timeout);
}
bool tt_hal_i2c_master_write_register(i2c_port_t port, uint8_t address, uint8_t reg, const uint8_t* data, uint16_t dataSize, TickType_t timeout) {
return tt::hal::i2c::masterWriteRegister(port, address, reg, data, dataSize, timeout);
}
bool tt_hal_i2c_master_write_read(i2c_port_t port, uint8_t address, const uint8_t* writeData, size_t writeDataSize, uint8_t* readData, size_t readDataSize, TickType_t timeout) {
return tt::hal::i2c::masterWriteRead(port, address, writeData, writeDataSize, readData, readDataSize, timeout);
}
bool tt_hal_i2c_master_has_device_at_address(i2c_port_t port, uint8_t address, TickType_t timeout) {
return tt::hal::i2c::masterHasDeviceAtAddress(port, address, timeout);
}
bool tt_hal_i2c_lock(i2c_port_t port, TickType_t timeout) {
return tt::hal::i2c::getLock(port).lock(timeout);
}
void tt_hal_i2c_unlock(i2c_port_t port) {
tt::hal::i2c::getLock(port).unlock();
}
}
-19
View File
@@ -8,8 +8,6 @@
#include "tt_hal.h"
#include "tt_hal_device.h"
#include "tt_hal_display.h"
#include "tt_hal_gpio.h"
#include "tt_hal_i2c.h"
#include "tt_hal_touch.h"
#include "tt_hal_uart.h"
#include <tt_lock.h>
@@ -219,23 +217,6 @@ const esp_elfsym main_symbols[] {
ESP_ELFSYM_EXPORT(tt_hal_display_driver_lock),
ESP_ELFSYM_EXPORT(tt_hal_display_driver_unlock),
ESP_ELFSYM_EXPORT(tt_hal_display_driver_supported),
ESP_ELFSYM_EXPORT(tt_hal_gpio_configure),
ESP_ELFSYM_EXPORT(tt_hal_gpio_configure_with_pin_bitmask),
ESP_ELFSYM_EXPORT(tt_hal_gpio_set_mode),
ESP_ELFSYM_EXPORT(tt_hal_gpio_get_level),
ESP_ELFSYM_EXPORT(tt_hal_gpio_set_level),
ESP_ELFSYM_EXPORT(tt_hal_gpio_get_pin_count),
ESP_ELFSYM_EXPORT(tt_hal_i2c_start),
ESP_ELFSYM_EXPORT(tt_hal_i2c_stop),
ESP_ELFSYM_EXPORT(tt_hal_i2c_is_started),
ESP_ELFSYM_EXPORT(tt_hal_i2c_master_read),
ESP_ELFSYM_EXPORT(tt_hal_i2c_master_read_register),
ESP_ELFSYM_EXPORT(tt_hal_i2c_master_write),
ESP_ELFSYM_EXPORT(tt_hal_i2c_master_write_register),
ESP_ELFSYM_EXPORT(tt_hal_i2c_master_write_read),
ESP_ELFSYM_EXPORT(tt_hal_i2c_master_has_device_at_address),
ESP_ELFSYM_EXPORT(tt_hal_i2c_lock),
ESP_ELFSYM_EXPORT(tt_hal_i2c_unlock),
ESP_ELFSYM_EXPORT(tt_hal_touch_driver_supported),
ESP_ELFSYM_EXPORT(tt_hal_touch_driver_alloc),
ESP_ELFSYM_EXPORT(tt_hal_touch_driver_free),