M5UnitUnified 0.1.0 git rev:f196fcd
|
For managing and leading units. More...
#include <M5UnitUnified.hpp>
Public Types | |
using | container_type = std::vector<Component*> |
Public Member Functions | |
bool | begin () |
Begin of all units under management. | |
void | update (const bool force=false) |
Update of all units under management. | |
std::string | debugInfo () const |
Output information for debug. | |
Constructor | |
| |
UnitUnified (const UnitUnified &)=delete | |
UnitUnified (UnitUnified &&) noexcept=default | |
Assignment | |
| |
UnitUnified & | operator= (const UnitUnified &)=delete |
UnitUnified & | operator= (UnitUnified &&) noexcept=default |
Add unit | |
bool | add (Component &u, TwoWire &wire) |
Adding unit to be managed (I2C) | |
bool | add (Component &u, const int8_t rx_pin, const int8_t tx_pin) |
Adding unit to be managed (GPIO) | |
bool | add (Component &u, m5::hal::bus::Bus *bus) |
Adding unit to be managed (M5HAL) | |
Protected Member Functions | |
bool | add_children (Component &u) |
std::string | make_unit_info (const Component *u, const uint8_t indent=0) const |
Protected Attributes | |
container_type | _units {} |
For managing and leading units.
bool m5::unit::UnitUnified::add | ( | Component & | u, |
const int8_t | rx_pin, | ||
const int8_t | tx_pin ) |
Adding unit to be managed (GPIO)
u | Unit Component |
rx_pin | Pin number to be used for RX |
tx_pin | Pin number to be used for TX |
bool m5::unit::UnitUnified::add | ( | Component & | u, |
m5::hal::bus::Bus * | bus ) |
Adding unit to be managed (M5HAL)
u | Unit Component |
bus | Bus to be used |