M5Unit-RS485 0.2.0 git rev:0956c20
Loading...
Searching...
No Matches
M5UnitUnifiedRS485.hpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD
3 *
4 * SPDX-License-Identifier: MIT
5 */
13#ifndef M5_UNIT_UNIFIED_RS485_HPP
14#define M5_UNIT_UNIFIED_RS485_HPP
15
16#include "unit/unit_SP485.hpp"
17#include "unit/unit_SIT3088.hpp"
19
24namespace m5 {
25
30namespace unit {
31
53public:
55 {
56 auto cfg = config();
57 cfg.dir_pin = 34; // Tab5 built-in fixed pin
58 config(cfg);
59 }
60 virtual ~Tab5BuiltinRS485() = default;
62 Tab5BuiltinRS485(Tab5BuiltinRS485 &&) noexcept = default;
64 Tab5BuiltinRS485 &operator=(Tab5BuiltinRS485 &&) noexcept = default;
65};
66
67} // namespace unit
68} // namespace m5
69#endif
M5Stack Tab5 built-in RS-485 (SIT3088 with DIR pin fixed to GPIO34)
Definition M5UnitUnifiedRS485.hpp:52
Tab5BuiltinRS485(Tab5BuiltinRS485 &&) noexcept=default
Move constructor. Declared because the destructor above suppresses the implicit one.
RS-485 unit using the SIT3088 transceiver (manual direction control via a DIR pin)
Definition unit_SIT3088.hpp:33
config_t config() const
Gets the configuration.
Definition unit_SIT3088.hpp:67
RS-485 unit whose transceiver direction is controlled on the board, not by software.
Definition unit_SP485.hpp:26
Top level namespace of M5Stack.
Unit-related namespace.
SIT3088 unit for M5UnitUnified (manual direction-controlled RS-485 transceiver)
SP485-family unit for M5UnitUnified (board-side direction control)
Arduino Stream adapter for UnitSP485.