Internal Interface Wrap
API reference
Loading...
Searching...
No Matches
Macros | Functions | Variables
EspI2c.cpp File Reference

Implementation of ESP32-integrated I2C controller with proper bus-device architecture. More...

#include "EspI2c.h"
#include "utils/memory_utils.h"
#include <algorithm>
#include <cstring>
#include "driver/gpio.h"
#include "driver/i2c_master.h"
#include "driver/i2c_types.h"
#include "esp_err.h"
#include "esp_timer.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
Include dependency graph for EspI2c.cpp:

Macros

#define USE_CUSTOM_FAST_PROBE   0
 

Functions

const char * HfI2COperationToString (hf_i2c_operation_t op) noexcept
 Convert operation type to string for logging.
 

Variables

static const char * TAG = "EspI2c"
 

Detailed Description

Implementation of ESP32-integrated I2C controller with proper bus-device architecture.

This file provides the implementation for I2C bus communication using the ESP32's built-in I2C peripheral with full ESP-IDF v5.5+ capabilities and proper separation of bus and device management following the same pattern as EspSpi.

Key architectural improvements:

The implementation closely follows ESP-IDF v5.5 I2C Master driver documentation: https://docs.espressif.com/projects/esp-idf/en/release-v5.5/esp32/api-reference/peripherals/i2c.html

Author
Nebiyu Tadesse
Date
2025
Note
Fully compliant with ESP-IDF v5.5 I2C Master driver API
Optimized for ESP32 hardware capabilities
Thread-safe for multi-device I2C bus management
Follows the same architectural pattern as EspSpi

Macro Definition Documentation

◆ USE_CUSTOM_FAST_PROBE

#define USE_CUSTOM_FAST_PROBE   0

Function Documentation

◆ HfI2COperationToString()

const char * HfI2COperationToString ( hf_i2c_operation_t  op)
noexcept

Convert operation type to string for logging.

Parameters
opOperation type
Returns
String representation of operation

Variable Documentation

◆ TAG

const char* TAG = "EspI2c"
static