Added I2C settings app (#85)

This commit is contained in:
Ken Van Hoeylandt
2024-11-24 21:31:15 +01:00
committed by GitHub
parent d8731eaa17
commit c8f63adba4
19 changed files with 186 additions and 56 deletions
-15
View File
@@ -6,21 +6,6 @@
#define TAG "tdeck"
static bool init_i2c() {
const i2c_config_t i2c_conf = {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_18,
.scl_io_num = GPIO_NUM_8,
.sda_pullup_en = GPIO_PULLUP_DISABLE,
.scl_pullup_en = GPIO_PULLUP_DISABLE,
.master = {
.clk_speed = 400000
}
};
return i2c_param_config(TDECK_I2C_BUS_HANDLE, &i2c_conf) == ESP_OK && i2c_driver_install(TDECK_I2C_BUS_HANDLE, i2c_conf.mode, 0, 0, 0) == ESP_OK;
}
static bool init_spi() {
spi_bus_config_t bus_config = {
.mosi_io_num = TDECK_SPI_PIN_MOSI,