mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
- Remove custom `ESP_TARGET` and use `ESP_PLATFORM` everywhere - Add `Loader` service functionality to `tt::app::` namespace - Make `Loader` `PubSub` usable by exposing the messages - Add board type to crash log - Don't show SD card in Files app when it's not mounted - Set default SPI frequency for SD cards - Move TT_VERSION to scope that works for sim too - Log Tactility version and board on boot - Rename "Yellow Board" to "CYD 2432S024C"
40 lines
564 B
C++
40 lines
564 B
C++
#pragma once
|
|
|
|
#ifdef ESP_PLATFORM
|
|
#include <hal/i2c_types.h>
|
|
#include <driver/i2c.h>
|
|
#else
|
|
|
|
#include <cstdint>
|
|
|
|
typedef int esp_err_t;
|
|
|
|
typedef enum {
|
|
I2C_NUM_0 = 0,
|
|
I2C_NUM_1,
|
|
LP_I2C_NUM_0,
|
|
I2C_NUM_MAX,
|
|
} i2c_port_t;
|
|
|
|
typedef enum{
|
|
I2C_MODE_MASTER,
|
|
I2C_MODE_MAX,
|
|
} i2c_mode_t;
|
|
|
|
typedef struct {
|
|
i2c_mode_t mode;
|
|
int sda_io_num;
|
|
int scl_io_num;
|
|
bool sda_pullup_en;
|
|
bool scl_pullup_en;
|
|
|
|
union {
|
|
struct {
|
|
uint32_t clk_speed;
|
|
} master;
|
|
};
|
|
uint32_t clk_flags;
|
|
} i2c_config_t;
|
|
|
|
#endif
|