Grove driver, I2C migrations, bugfixes and docs (#532)

This commit is contained in:
Ken Van Hoeylandt
2026-06-19 00:52:31 +02:00
committed by GitHub
parent 8dabda2b5b
commit a35c88c8fd
74 changed files with 937 additions and 483 deletions
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <tactility/bindings/bindings.h>
#include <tactility/drivers/esp32_grove.h>
#ifdef __cplusplus
extern "C" {
#endif
DEFINE_DEVICETREE(esp32_grove, struct Esp32GroveConfig)
#ifdef __cplusplus
}
#endif
@@ -0,0 +1,24 @@
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <driver/uart.h>
#include <hal/i2c_types.h>
#include <tactility/drivers/gpio.h>
#include <tactility/drivers/grove.h>
#ifdef __cplusplus
extern "C" {
#endif
struct Esp32GroveConfig {
enum GroveMode defaultMode;
struct GpioPinSpec pinSdaRx;
struct GpioPinSpec pinSclTx;
uart_port_t uartPort;
i2c_port_t i2cPort;
uint32_t i2cClockFrequency;
};
#ifdef __cplusplus
}
#endif
@@ -2,12 +2,14 @@
#pragma once
#include <tactility/drivers/gpio.h>
#include <driver/i2c_types.h>
#include <driver/i2c_master.h>
#ifdef __cplusplus
extern "C" {
#endif
struct Device;
struct Esp32I2cMasterConfig {
i2c_port_num_t port;
uint32_t clockFrequency;
@@ -16,6 +18,8 @@ struct Esp32I2cMasterConfig {
struct GpioPinSpec pinScl;
};
i2c_master_bus_handle_t esp32_i2c_master_get_bus_handle(struct Device* device);
#ifdef __cplusplus
}
#endif