Smart tab5keyboard (#533)

This commit is contained in:
Shadowtrance
2026-06-20 06:14:07 +10:00
committed by GitHub
parent e8b9a1f2a9
commit 594b8bd27e
34 changed files with 528 additions and 137 deletions
@@ -2,6 +2,8 @@
#pragma once
#include <tactility/drivers/gpio.h>
#include <tactility/device.h>
#include <driver/i2c_types.h>
#include <driver/i2c_master.h>
#ifdef __cplusplus
@@ -18,8 +20,18 @@ struct Esp32I2cMasterConfig {
struct GpioPinSpec pinScl;
};
/**
* Returns the i2c_master_bus_handle_t for an esp32_i2c_master Device.
* The device must be started. Returns NULL if the device has no driver data.
*/
i2c_master_bus_handle_t esp32_i2c_master_get_bus_handle(struct Device* device);
/**
* Returns the SCL clock frequency (Hz) configured for an esp32_i2c_master Device.
* Reads directly from the device tree config, so the device does not need to be started.
*/
uint32_t esp32_i2c_master_get_clock_frequency(struct Device* device);
#ifdef __cplusplus
}
#endif
@@ -3,6 +3,7 @@
#include <soc/soc_caps.h>
#if SOC_SDMMC_HOST_SUPPORTED
#include <driver/sdmmc_default_configs.h>
#include <sd_protocol_types.h>
#include <stdbool.h>
#include <stdint.h>
@@ -26,6 +27,8 @@ struct Esp32SdmmcConfig {
struct GpioPinSpec pin_cd;
struct GpioPinSpec pin_wp;
uint8_t bus_width;
int32_t slot;
int32_t max_freq_khz;
bool wp_active_high;
bool enable_uhs;
bool pullups;