|
microfmt
Zero-allocation C++ formatting for constrained environments
|
Format 7-bit and 10-bit I2C read and write transaction views. More...

Go to the source code of this file.
Classes | |
| struct | microfmt::i2c_msg_view |
| Non-owning I2C transfer descriptor for formatting. More... | |
| struct | microfmt::formatter< i2c_msg_view > |
Namespaces | |
| namespace | microfmt |
Enumerations | |
| enum class | microfmt::i2c_dir : uint8_t { microfmt::write = 0 , microfmt::read = 1 } |
| enum class | microfmt::i2c_status : uint8_t { microfmt::ok = 0 , microfmt::nack_addr , microfmt::nack_data , microfmt::arb_lost , microfmt::timeout } |
Functions | |
| RELOCO_BEGIN_UNSAFE_CODE constexpr i2c_flags | microfmt::operator| (i2c_flags a, i2c_flags b) noexcept |
| RELOCO_END_UNSAFE_CODE constexpr bool | microfmt::operator& (i2c_flags a, i2c_flags b) noexcept |
| constexpr i2c_msg_view | microfmt::i2c_write (uint8_t addr_7bit, span< const uint8_t > data, i2c_status status=i2c_status::ok) noexcept |
| Creates a 7-bit I2C write transaction view. | |
| template<size_t N> | |
| constexpr i2c_msg_view | microfmt::i2c_write (uint8_t addr_7bit, const uint8_t(&arr)[N], i2c_status status=i2c_status::ok) noexcept |
| constexpr i2c_msg_view | microfmt::i2c_read (uint8_t addr_7bit, span< const uint8_t > data, i2c_status status=i2c_status::ok) noexcept |
| Creates a 7-bit I2C read transaction view. | |
| template<size_t N> | |
| constexpr i2c_msg_view | microfmt::i2c_read (uint8_t addr_7bit, const uint8_t(&arr)[N], i2c_status status=i2c_status::ok) noexcept |
| constexpr i2c_msg_view | microfmt::i2c_10bit (uint16_t addr_10bit, i2c_dir dir, span< const uint8_t > data, i2c_status status=i2c_status::ok) noexcept |
| Creates a 10-bit I2C read or write transaction view. | |
Variables | |
| enum RELOCO_FLAG_ENUM | microfmt::i2c_flags |
| enum RELOCO_FLAG_ENUM | microfmt::ten_bit = 1 << 0 |
| enum RELOCO_FLAG_ENUM | microfmt::nostart = 1 << 1 |
| enum RELOCO_FLAG_ENUM | microfmt::stop |
Format 7-bit and 10-bit I2C read and write transaction views.
Use i2c_write, i2c_read, or i2c_10bit to create a transaction view, then format it with either the default diagnostic representation or the {:c} compact trace representation.