36#include "freertos/FreeRTOS.h"
37#include "freertos/queue.h"
38#include "freertos/semphr.h"
64 #if FABGL_ESP_IDF_VERSION < FABGL_ESP_IDF_VERSION_VAL(4, 4, 0)
109 bool begin(gpio_num_t SDAGPIO, gpio_num_t SCLGPIO);
126 bool write(
int address, uint8_t * buffer,
int size,
int frequency = 100000,
int timeOutMS = 50);
141 int read(
int address, uint8_t * buffer,
int size,
int frequency = 100000,
int timeOutMS = 50);
153 static void commTaskFunc(
void * pvParameters);
155 #if FABGL_ESP_IDF_VERSION < FABGL_ESP_IDF_VERSION_VAL(4, 4, 0)
162 gpio_num_t m_SDAGPIO;
163 gpio_num_t m_SCLGPIO;
165 TaskHandle_t m_commTaskHandle;
167 EventGroupHandle_t m_eventGroup;
169 I2CJobInfo m_jobInfo;
bool write(int address, uint8_t *buffer, int size, int frequency=100000, int timeOutMS=50)
Sends a buffer to I2C bus.
int getMaxBufferLength()
Returns maximum size of read and write buffers.
I2C(int bus=0)
I2C class constructor.
bool begin(gpio_num_t SDAGPIO, gpio_num_t SCLGPIO)
Initializes I2C instance associating GPIOs to I2C signals.
int read(int address, uint8_t *buffer, int size, int frequency=100000, int timeOutMS=50)
Receives a buffer from I2C bus.
I2C class allows multiple tasks to communicate with I2C devices, serializing read/write jobs.
This file contains FabGL library configuration settings, like number of supported colors,...
This file contains some utility classes and functions.