|
idfxx 1.0.0
Modern C++23 components for ESP-IDF
|
Type-safe I2C master bus driver for ESP32. More...
Namespaces | |
| namespace | idfxx |
| namespace | idfxx::i2c |
| I2C master driver classes. | |
Classes | |
| struct | idfxx::i2c::operation |
| Describes a single operation in a custom I2C transaction sequence. More... | |
| class | idfxx::i2c::master_bus |
| I2C master bus controller with thread-safe device access. More... | |
| class | idfxx::i2c::master_device |
| I2C device at a specific address with register operations. More... | |
Typedefs | |
| typedef struct i2c_master_bus_t * | i2c_master_bus_handle_t |
| typedef struct i2c_master_dev_t * | i2c_master_dev_handle_t |
Enumerations | |
| enum class | idfxx::i2c::port : int { idfxx::i2c::port::i2c0 = 0 } |
| I2C port identifiers. More... | |
| enum class | idfxx::i2c::clk_source : int { idfxx::i2c::clk_source::default_source = 0 } |
| I2C master bus clock source. More... | |
| enum class | idfxx::i2c::operation_command : int { idfxx::i2c::operation_command::start = 0 , idfxx::i2c::operation_command::write = 1 , idfxx::i2c::operation_command::read = 2 , idfxx::i2c::operation_command::stop = 3 } |
| I2C operation command type for custom transaction sequences. More... | |
| enum class | idfxx::i2c::ack_value : uint8_t { idfxx::i2c::ack_value::ack = 0 , idfxx::i2c::ack_value::nack = 1 } |
| ACK value sent after a read operation. More... | |
Variables | |
| static constexpr auto | idfxx::i2c::DEFAULT_TIMEOUT = std::chrono::milliseconds(50) |
| Default timeout for I2C operations. | |
Type-safe I2C master bus driver for ESP32.
Provides I2C bus lifecycle management with thread-safe device access and register operations.
Depends on Core Utilities for error handling and GPIO Component for pin configuration.
| typedef struct i2c_master_bus_t* i2c_master_bus_handle_t |
Definition at line 39 of file master.hpp.
| typedef struct i2c_master_dev_t* i2c_master_dev_handle_t |
Definition at line 40 of file master.hpp.
|
strong |
ACK value sent after a read operation.
| Enumerator | |
|---|---|
| ack | Acknowledge — request more data. |
| nack | Not-acknowledge — signal end of read. |
Definition at line 116 of file master.hpp.
|
strong |
I2C master bus clock source.
| Enumerator | |
|---|---|
| default_source | Default clock source for the target. |
Definition at line 73 of file master.hpp.
|
strong |
I2C operation command type for custom transaction sequences.
| Enumerator | |
|---|---|
| start | Send START or repeated-START condition. |
| write | Write data to the bus. |
| read | Read data from the bus. |
| stop | Send STOP condition. |
Definition at line 105 of file master.hpp.
|
strong |
Default timeout for I2C operations.
Definition at line 49 of file master.hpp.
Referenced by idfxx::i2c::master_device::probe(), idfxx::i2c::master_bus::probe(), idfxx::i2c::master_bus::scan_devices(), idfxx::i2c::master_device::try_change_address(), idfxx::i2c::master_device::try_execute_operations(), idfxx::i2c::master_device::try_probe(), idfxx::i2c::master_bus::try_probe(), idfxx::i2c::master_device::try_read_register(), idfxx::i2c::master_device::try_read_register(), idfxx::i2c::master_device::try_read_register(), idfxx::i2c::master_device::try_read_register(), idfxx::i2c::master_device::try_read_register(), idfxx::i2c::master_device::try_read_register(), idfxx::i2c::master_device::try_receive(), idfxx::i2c::master_device::try_receive(), idfxx::i2c::master_device::try_receive(), idfxx::i2c::master_device::try_transmit(), idfxx::i2c::master_device::try_transmit(), idfxx::i2c::master_device::try_transmit(), idfxx::i2c::master_device::try_write_register(), idfxx::i2c::master_device::try_write_register(), idfxx::i2c::master_device::try_write_register(), idfxx::i2c::master_device::try_write_register(), idfxx::i2c::master_device::try_write_registers(), and idfxx::i2c::master_device::try_write_registers().