|
Embedded Artistry Framework
Embedded Systems C++ Framework
|
#include "driver.hpp"#include <cstdint>#include <driver/communication_bus.hpp>#include <etl/vector.h>#include <inplace_function/inplace_function.hpp>

Classes | |
| struct | embvm::i2c::op_t |
| I2C operation definition. More... | |
| class | embvm::i2c::master |
| This class provides the I2C master interface definition. More... | |
Namespaces | |
| embvm | |
| Embedded framework core interfaces, classes, and definitions. | |
| embvm::i2c | |
| Definitions, functions, and classes related to I2C communication bus devices. | |
Typedefs | |
| using | embvm::i2c::addr_t = uint8_t |
| I2C address storage type. More... | |
| using | embvm::i2c::commBus = commBus< i2c::op_t, i2c::baud, i2c::I2C_MASTER_REQD_STATIC_FUNCTION_SIZE, i2c::status > |
| Convenience alias for the declaration of the I2C commBus. More... | |
Variables | |
| static constexpr size_t | embvm::i2c::I2C_MASTER_REQD_STATIC_FUNCTION_SIZE = 96 |
| Maximum size of the I2C master callback functor object. More... | |
| static constexpr uint8_t | embvm::i2c::ReadBit = 0x01 |
| Added to slave address to indicate a read command. More... | |
| struct embvm::i2c::op_t |
I2C operation definition.
The I2C bus operates in half-duplex mode, meaning that reads and writes do not occur simultaneously. The operation type represents a variety of operations which can be performed by an I2C device. The transmit options (tx_buffer and tx_size) are required by any operations using "write". The receive options (rx_buffer and rx_size) are required by any operations using "read".
| Class Members | ||
|---|---|---|
| uint8_t | address | Slave device address (7-bit). |
| operation | op | Operation to perform. |
| uint8_t * | rx_buffer |
Pointer to the receive buffer. Does not need to be specified for write-only commands. |
| size_t | rx_size |
Number of bytes to receive. Does not need to be specified for write-only commands. |
| const uint8_t * | tx_buffer |
Pointer to the transmit buffer. Does not need to be specified for read-only commands. |
| size_t | tx_size |
Number of bytes to transmit. Does not need to be specified for read-only commands. |
1.8.15