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:
committed by
GitHub
parent
71f8369377
commit
87ca888bb4
@@ -28,42 +28,6 @@ extern const Configuration hardwareConfiguration = {
|
||||
.initBoot = initBoot,
|
||||
.uiScale = UiScale::Smallest,
|
||||
.createDevices = createDevices,
|
||||
.i2c = {
|
||||
i2c::Configuration {
|
||||
.name = "Internal",
|
||||
.port = I2C_NUM_0,
|
||||
.initMode = i2c::InitMode::ByTactility,
|
||||
.isMutable = false,
|
||||
.config = (i2c_config_t) {
|
||||
.mode = I2C_MODE_MASTER,
|
||||
.sda_io_num = GPIO_NUM_21,
|
||||
.scl_io_num = GPIO_NUM_22,
|
||||
.sda_pullup_en = true,
|
||||
.scl_pullup_en = true,
|
||||
.master = {
|
||||
.clk_speed = 400000
|
||||
},
|
||||
.clk_flags = 0
|
||||
}
|
||||
},
|
||||
i2c::Configuration {
|
||||
.name = "Grove",
|
||||
.port = I2C_NUM_1,
|
||||
.initMode = i2c::InitMode::ByTactility,
|
||||
.isMutable = true,
|
||||
.config = (i2c_config_t) {
|
||||
.mode = I2C_MODE_MASTER,
|
||||
.sda_io_num = GPIO_NUM_32,
|
||||
.scl_io_num = GPIO_NUM_33,
|
||||
.sda_pullup_en = true,
|
||||
.scl_pullup_en = true,
|
||||
.master = {
|
||||
.clk_speed = 400000
|
||||
},
|
||||
.clk_flags = 0
|
||||
}
|
||||
}
|
||||
},
|
||||
.spi {
|
||||
spi::Configuration {
|
||||
.device = SPI2_HOST,
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
dependencies:
|
||||
- TactilityKernel
|
||||
dts: ../placeholder.dts
|
||||
- Platforms/PlatformEsp32
|
||||
dts: m5stack,stickc-plus.dts
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include <tactility/bindings/root.h>
|
||||
#include <tactility/bindings/esp32_gpio.h>
|
||||
#include <tactility/bindings/esp32_i2c.h>
|
||||
|
||||
/ {
|
||||
compatible = "root";
|
||||
model = "M5Stack StickC Plus";
|
||||
|
||||
gpio0 {
|
||||
compatible = "espressif,esp32-gpio";
|
||||
gpio-count = <40>;
|
||||
};
|
||||
|
||||
i2c_internal {
|
||||
compatible = "espressif,esp32-i2c";
|
||||
port = <I2C_NUM_0>;
|
||||
clock-frequency = <400000>;
|
||||
pin-sda = <21>;
|
||||
pin-scl = <22>;
|
||||
pin-sda-pullup;
|
||||
pin-scl-pullup;
|
||||
};
|
||||
|
||||
i2c_grove {
|
||||
compatible = "espressif,esp32-i2c";
|
||||
port = <I2C_NUM_1>;
|
||||
clock-frequency = <400000>;
|
||||
pin-sda = <32>;
|
||||
pin-scl = <33>;
|
||||
pin-sda-pullup;
|
||||
pin-scl-pullup;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user