Implemented I2C scanner app (#97)
This commit is contained in:
committed by
GitHub
parent
6094b9c3f2
commit
3f62ec2efa
@@ -13,7 +13,7 @@ typedef struct {
|
||||
} KeyboardData;
|
||||
|
||||
static inline bool keyboard_i2c_read(uint8_t* output) {
|
||||
return tt::hal::i2c::masterRead(TDECK_KEYBOARD_I2C_BUS_HANDLE, TDECK_KEYBOARD_SLAVE_ADDRESS, output, 1);
|
||||
return tt::hal::i2c::masterRead(TDECK_KEYBOARD_I2C_BUS_HANDLE, TDECK_KEYBOARD_SLAVE_ADDRESS, output, 1, 100 / portTICK_PERIOD_MS);
|
||||
}
|
||||
|
||||
void keyboard_wait_for_response() {
|
||||
|
||||
@@ -18,11 +18,11 @@ extern const tt::hal::Configuration lilygo_tdeck = {
|
||||
.power = nullptr,
|
||||
.i2c = {
|
||||
tt::hal::i2c::Configuration {
|
||||
.name = "Internal",
|
||||
.port = I2C_NUM_0,
|
||||
.initMode = tt::hal::i2c::InitByTactility,
|
||||
.canReinit = false,
|
||||
.hasMutableConfiguration = false,
|
||||
.timeout = 1000,
|
||||
.config = (i2c_config_t) {
|
||||
.mode = I2C_MODE_MASTER,
|
||||
.sda_io_num = GPIO_NUM_18,
|
||||
@@ -36,11 +36,11 @@ extern const tt::hal::Configuration lilygo_tdeck = {
|
||||
}
|
||||
},
|
||||
tt::hal::i2c::Configuration {
|
||||
.name = "External",
|
||||
.port = I2C_NUM_1,
|
||||
.initMode = tt::hal::i2c::InitByTactility,
|
||||
.canReinit = true,
|
||||
.hasMutableConfiguration = true,
|
||||
.timeout = 1000,
|
||||
.config = (i2c_config_t) {
|
||||
.mode = I2C_MODE_MASTER,
|
||||
.sda_io_num = GPIO_NUM_43,
|
||||
|
||||
Reference in New Issue
Block a user