mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-20 15:35:05 +00:00
I2C board settings updated (#86)
This commit is contained in:
parent
c8f63adba4
commit
caa8756998
@ -7,8 +7,8 @@ extern const tt::hal::Configuration m5stack_core2 = {
|
|||||||
.sdcard = &m5stack_sdcard,
|
.sdcard = &m5stack_sdcard,
|
||||||
.power = &m5stack_power,
|
.power = &m5stack_power,
|
||||||
.i2c = {
|
.i2c = {
|
||||||
// Internal
|
|
||||||
tt::hal::i2c::Configuration {
|
tt::hal::i2c::Configuration {
|
||||||
|
.name = "Internal",
|
||||||
.port = I2C_NUM_0,
|
.port = I2C_NUM_0,
|
||||||
.initMode = tt::hal::i2c::InitByExternal,
|
.initMode = tt::hal::i2c::InitByExternal,
|
||||||
.canReinit = false,
|
.canReinit = false,
|
||||||
@ -26,8 +26,8 @@ extern const tt::hal::Configuration m5stack_core2 = {
|
|||||||
.clk_flags = 0
|
.clk_flags = 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// External (Grove)
|
|
||||||
tt::hal::i2c::Configuration {
|
tt::hal::i2c::Configuration {
|
||||||
|
.name = "External", // (Grove)
|
||||||
.port = I2C_NUM_1,
|
.port = I2C_NUM_1,
|
||||||
.initMode = tt::hal::i2c::InitByExternal,
|
.initMode = tt::hal::i2c::InitByExternal,
|
||||||
.canReinit = true,
|
.canReinit = true,
|
||||||
|
|||||||
@ -9,8 +9,8 @@ const tt::hal::Configuration m5stack_cores3 = {
|
|||||||
.sdcard = &m5stack_sdcard,
|
.sdcard = &m5stack_sdcard,
|
||||||
.power = &m5stack_power,
|
.power = &m5stack_power,
|
||||||
.i2c = {
|
.i2c = {
|
||||||
// Internal
|
|
||||||
tt::hal::i2c::Configuration {
|
tt::hal::i2c::Configuration {
|
||||||
|
.name = "Internal",
|
||||||
.port = I2C_NUM_0,
|
.port = I2C_NUM_0,
|
||||||
.initMode = tt::hal::i2c::InitByExternal,
|
.initMode = tt::hal::i2c::InitByExternal,
|
||||||
.canReinit = false,
|
.canReinit = false,
|
||||||
@ -28,8 +28,8 @@ const tt::hal::Configuration m5stack_cores3 = {
|
|||||||
.clk_flags = 0
|
.clk_flags = 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// External (Grove)
|
|
||||||
tt::hal::i2c::Configuration {
|
tt::hal::i2c::Configuration {
|
||||||
|
.name = "External", // Grove
|
||||||
.port = I2C_NUM_1,
|
.port = I2C_NUM_1,
|
||||||
.initMode = tt::hal::i2c::InitByExternal,
|
.initMode = tt::hal::i2c::InitByExternal,
|
||||||
.canReinit = true,
|
.canReinit = true,
|
||||||
|
|||||||
@ -10,5 +10,44 @@ extern const tt::hal::Configuration waveshare_s3_touch = {
|
|||||||
.display = { .setBacklightDuty = nullptr },
|
.display = { .setBacklightDuty = nullptr },
|
||||||
.sdcard = nullptr,
|
.sdcard = nullptr,
|
||||||
.power = nullptr,
|
.power = nullptr,
|
||||||
.i2c = {}
|
.i2c = {
|
||||||
|
tt::hal::i2c::Configuration {
|
||||||
|
.name = "First",
|
||||||
|
.port = I2C_NUM_0,
|
||||||
|
.initMode = tt::hal::i2c::InitDisabled,
|
||||||
|
.canReinit = true,
|
||||||
|
.hasMutableConfiguration = true,
|
||||||
|
.timeout = 1000,
|
||||||
|
.config = (i2c_config_t) {
|
||||||
|
.mode = I2C_MODE_MASTER,
|
||||||
|
.sda_io_num = GPIO_NUM_NC,
|
||||||
|
.scl_io_num = GPIO_NUM_NC,
|
||||||
|
.sda_pullup_en = true,
|
||||||
|
.scl_pullup_en = true,
|
||||||
|
.master = {
|
||||||
|
.clk_speed = 400000
|
||||||
|
},
|
||||||
|
.clk_flags = 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tt::hal::i2c::Configuration {
|
||||||
|
.name = "Second",
|
||||||
|
.port = I2C_NUM_1,
|
||||||
|
.initMode = tt::hal::i2c::InitDisabled,
|
||||||
|
.canReinit = true,
|
||||||
|
.hasMutableConfiguration = true,
|
||||||
|
.timeout = 1000,
|
||||||
|
.config = (i2c_config_t) {
|
||||||
|
.mode = I2C_MODE_MASTER,
|
||||||
|
.sda_io_num = GPIO_NUM_NC,
|
||||||
|
.scl_io_num = GPIO_NUM_NC,
|
||||||
|
.sda_pullup_en = true,
|
||||||
|
.scl_pullup_en = true,
|
||||||
|
.master = {
|
||||||
|
.clk_speed = 400000
|
||||||
|
},
|
||||||
|
.clk_flags = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -16,6 +16,7 @@ const tt::hal::Configuration yellow_board_24inch_cap = {
|
|||||||
.power = nullptr,
|
.power = nullptr,
|
||||||
.i2c = {
|
.i2c = {
|
||||||
tt::hal::i2c::Configuration {
|
tt::hal::i2c::Configuration {
|
||||||
|
.name = "First",
|
||||||
.port = I2C_NUM_0,
|
.port = I2C_NUM_0,
|
||||||
.initMode = tt::hal::i2c::InitDisabled,
|
.initMode = tt::hal::i2c::InitDisabled,
|
||||||
.canReinit = true,
|
.canReinit = true,
|
||||||
@ -34,6 +35,7 @@ const tt::hal::Configuration yellow_board_24inch_cap = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
tt::hal::i2c::Configuration {
|
tt::hal::i2c::Configuration {
|
||||||
|
.name = "Second",
|
||||||
.port = I2C_NUM_1,
|
.port = I2C_NUM_1,
|
||||||
.initMode = tt::hal::i2c::InitDisabled,
|
.initMode = tt::hal::i2c::InitDisabled,
|
||||||
.canReinit = true,
|
.canReinit = true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user