|
idfxx 1.0.0
Modern C++23 components for ESP-IDF
|
I2C master bus configuration. More...
#include <idfxx_i2c/include/idfxx/i2c/master.hpp>
Public Attributes | |
| idfxx::gpio | sda = gpio::nc() |
| GPIO pin for the SDA line. | |
| idfxx::gpio | scl = gpio::nc() |
| GPIO pin for the SCL line. | |
| freq::hertz | frequency {0} |
| Clock frequency in Hz. | |
| enum clk_source | clk_source = clk_source::default_source |
| Clock source for the I2C master bus. | |
| uint8_t | glitch_ignore_cnt = 7 |
| Glitch filter count (0-7). Higher values filter more noise. | |
| std::optional< idfxx::intr_level > | intr_level = {} |
| Interrupt priority level, or empty for automatic. | |
| size_t | trans_queue_depth = 0 |
| Depth of internal transfer queue for asynchronous transactions. | |
| bool | enable_internal_pullup = true |
| Enable internal pull-up resistors on SDA and SCL. | |
| bool | allow_pd = false |
| Allow powering down the bus during light sleep. | |
I2C master bus configuration.
All fields have sensible defaults, but you should define sda, scl, and frequency at minimum. For example:
Definition at line 127 of file master.hpp.
Allow powering down the bus during light sleep.
Definition at line 139 of file master.hpp.
| enum clk_source idfxx::i2c::master_bus::config::clk_source = clk_source::default_source |
Clock source for the I2C master bus.
Definition at line 131 of file master.hpp.
Enable internal pull-up resistors on SDA and SCL.
Definition at line 138 of file master.hpp.
| freq::hertz idfxx::i2c::master_bus::config::frequency {0} |
Clock frequency in Hz.
Definition at line 130 of file master.hpp.
| uint8_t idfxx::i2c::master_bus::config::glitch_ignore_cnt = 7 |
Glitch filter count (0-7). Higher values filter more noise.
Definition at line 135 of file master.hpp.
| std::optional<idfxx::intr_level> idfxx::i2c::master_bus::config::intr_level = {} |
Interrupt priority level, or empty for automatic.
Definition at line 136 of file master.hpp.
| idfxx::gpio idfxx::i2c::master_bus::config::scl = gpio::nc() |
GPIO pin for the SCL line.
Definition at line 129 of file master.hpp.
| idfxx::gpio idfxx::i2c::master_bus::config::sda = gpio::nc() |
GPIO pin for the SDA line.
Definition at line 128 of file master.hpp.
| size_t idfxx::i2c::master_bus::config::trans_queue_depth = 0 |
Depth of internal transfer queue for asynchronous transactions.
Definition at line 137 of file master.hpp.