20 lines
492 B
C
20 lines
492 B
C
#ifndef I2C_BUS_H
|
|
#define I2C_BUS_H
|
|
|
|
#include "driver/i2c_master.h"
|
|
#include "esp_err.h"
|
|
|
|
/*
|
|
* Shared I2C bus. On the CrowPanel Advance both the STC8H1K28 board
|
|
* controller (0x30) and the GT911 touch controller (0x5D) live on it, so a
|
|
* single owner avoids two drivers trying to install the same port.
|
|
*/
|
|
esp_err_t i2c_bus_init(void);
|
|
|
|
i2c_master_bus_handle_t i2c_bus_get(void);
|
|
|
|
/* Logs every responding address. Diagnostics for bring-up. */
|
|
void i2c_bus_scan(const char *tag);
|
|
|
|
#endif
|