16#ifndef M5_UNIT_UNIFIED_HPP
17#define M5_UNIT_UNIFIED_HPP
21#if defined(M5_UNIT_UNIFIED_USING_RMT_V2)
23#include <driver/rmt.h>
49 using container_type = std::vector<Component*>;
54 UnitUnified() =
default;
55 UnitUnified(
const UnitUnified&) =
delete;
56 UnitUnified(UnitUnified&&) noexcept = default;
62 UnitUnified& operator=(const UnitUnified&) = delete;
64 UnitUnified& operator=(UnitUnified&&) noexcept = default;
75 bool add(Component& u, TwoWire& wire);
83 bool add(Component& u, const int8_t rx_pin, const int8_t tx_pin);
90 bool add(Component& u, HardwareSerial& wire);
97 bool add(Component& u,
m5::hal::bus::Bus* bus);
103 void update(const
bool force = false);
109 bool add_children(Component& u);
110 std::
string make_unit_info(const Component* u, const uint8_t indent = 0) const;
113 container_type _units{};
116 static uint32_t _registerCount;
Main header of M5UnitComponent.
std::string debugInfo() const
Output information for debug.
Definition M5UnitUnified.cpp:146
bool begin()
Begin of all units under management.
Definition M5UnitUnified.cpp:124
void update(const bool force=false)
Update of all units under management.
Definition M5UnitUnified.cpp:136
bool add(Component &u, TwoWire &wire)
Adding unit to be managed (I2C)
Definition M5UnitUnified.cpp:41
Top level namespace of M5stack.
Definition test_helper.hpp:18