M5UnitUnified 0.0.2 git rev:a353e8c
|
Adapters to treat M5HAL and TwoWire in the same way. More...
#include <adapter.hpp>
Public Member Functions | |
Adapter (const Adapter &)=delete | |
Adapter (Adapter &&) noexcept=default | |
Adapter & | operator= (const Adapter &)=delete |
Adapter & | operator= (Adapter &&) noexcept=default |
uint8_t | address () const |
uint32_t | clock () const |
void | setClock (const uint32_t clock) |
Adapter * | duplicate (const uint8_t addr) |
Dupicate adapter. | |
m5::hal::error::error_t | generalCall (const uint8_t *data, const size_t len) |
write to address zero (general call) | |
Constructor | |
Adapter (const uint8_t addr) | |
Adapter (TwoWire &wire, const uint8_t addr) | |
Adapter (m5::hal::bus::Bus *bus, const uint8_t addr) | |
Adapter (m5::hal::bus::Bus &bus, const uint8_t addr) | |
R/W | |
m5::hal::error::error_t | readWithTransaction (uint8_t *data, const size_t len) |
Reading data with transactions. | |
m5::hal::error::error_t | writeWithTransaction (const uint8_t *data, const size_t len, const bool stop=true) |
Writeing data with transactions */. | |
m5::hal::error::error_t | writeWithTransaction (const uint8_t reg, const uint8_t *data, const size_t len, const bool stop=true) |
Writeing data with transactions (reg8)*/. | |
m5::hal::error::error_t | writeWithTransaction (const uint16_t reg, const uint8_t *data, const size_t len, const bool stop=true) |
Writeing data with transactions (reg16) */. | |
Protected Attributes | |
std::unique_ptr< Impl > | _impl {} |
Adapters to treat M5HAL and TwoWire in the same way.