M5Unit-RGB 0.0.1 git rev:55cb205
Loading...
Searching...
No Matches
unit_Neco.hpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025 M5Stack Technology CO LTD
3 *
4 * SPDX-License-Identifier: MIT
5 */
10#ifndef M5_UNIT_RGB_UNIT_NECO_HPP
11#define M5_UNIT_RGB_UNIT_NECO_HPP
12
13#include "unit_WS2812.hpp"
14#include "m5_utility/button_status.hpp"
15
16namespace m5 {
17namespace unit {
24class UnitNeco : public UnitWS2812, public m5::utility::button::Status {
25 M5_UNIT_COMPONENT_HPP_BUILDER(UnitNeco, 0x00);
26
27public:
28 UnitNeco() : UnitWS2812(35 /* 35 pixels */)
29 {
30 auto ccfg = component_config();
31 ccfg.max_children = 1; // Can connect 1 Unit
32 component_config(ccfg);
33 }
35 virtual bool begin() override;
38 virtual void update(const bool force = false) override;
39
40private:
41 bool _btn_available{false};
42};
43
44} // namespace unit
45} // namespace m5
46#endif
virtual void update(const bool force=false) override
Update the unit.
Definition unit_Neco.cpp:48
virtual bool begin() override
Begin the unit.
Definition unit_Neco.cpp:23
Top level namespace of M5stack.
Unit-related namespace.
WS2812 unit for M5UnitUnified.