36 #include "freertos/FreeRTOS.h" 37 #include "freertos/queue.h" 38 #include "freertos/semphr.h" 40 #include "esp32-hal.h" 104 bool begin(gpio_num_t SDAGPIO, gpio_num_t SCLGPIO);
121 bool write(
int address, uint8_t * buffer,
int size,
int frequency = 100000,
int timeOutMS = 50);
136 int read(
int address, uint8_t * buffer,
int size,
int frequency = 100000,
int timeOutMS = 50);
148 static void commTaskFunc(
void * pvParameters);
154 gpio_num_t m_SDAGPIO;
155 gpio_num_t m_SCLGPIO;
157 TaskHandle_t m_commTaskHandle;
159 EventGroupHandle_t m_eventGroup;
161 I2CJobInfo m_jobInfo;
177 #endif // #ifdef ARDUINO int getMaxBufferLength()
Returns maximum size of read and write buffers.
bool begin(gpio_num_t SDAGPIO, gpio_num_t SCLGPIO)
Initializes I2C instance associating GPIOs to I2C signals.
I2C class allows multiple tasks to communicate with I2C devices, serializing read/write jobs...
I2C(int bus=0)
I2C class constructor.
int read(int address, uint8_t *buffer, int size, int frequency=100000, int timeOutMS=50)
Receives a buffer from I2C bus.
This file contains FabGL library configuration settings, like number of supported colors...
bool write(int address, uint8_t *buffer, int size, int frequency=100000, int timeOutMS=50)
Sends a buffer to I2C bus.