|
M5UnitUnified 0.5.8 git rev:47d29eb
|
Opt-in, header-only board-aware connection helpers for M5UnitUnified examples. More...
#include "../M5UnitUnified.hpp"Go to the source code of this file.
Classes | |
| struct | m5::unit::wiring::I2CPins |
| I2C backend selection + pin numbers (pure getter result, no side effects) More... | |
| struct | m5::unit::wiring::GpioPinPair |
| GPIO rx/tx pin pair; fallback_a indicates port_a fallback was used. More... | |
| struct | m5::unit::wiring::UartPinPair |
| UART rx/tx pin pair; fallback_a indicates port_a fallback was used. More... | |
| struct | m5::unit::wiring::SpiPins |
| SPI pin set (sclk / miso / mosi) on the board's shared SD/SPI bus. More... | |
| struct | m5::unit::wiring::HatI2CPins |
| Hat I2C pin pair + bus selection; sda=scl=-1 if board has no Hat header. More... | |
| struct | m5::unit::wiring::HatPinPair |
| Hat rx/tx pin pair (shared by Hat GPIO and Hat UART); rx=tx=-1 if board has no Hat header. More... | |
Namespaces | |
| namespace | m5 |
| Top level namespace of M5Stack. | |
Enumerations | |
Pin acquisition options (enums, no platform dependency) | |
| enum class | m5::unit::wiring::NessoPort { PortB , PortA } |
| NessoN1 connection choice: PortB = direct GROVE (SoftwareI2C), PortA = QWIIC / PbHub (Wire) | |
| enum class | m5::unit::wiring::GpioRole { Both , InOnly , OutOnly } |
| GPIO usage role: how many pins of the port the unit actually uses. More... | |
| enum class | m5::unit::wiring::UartConfig : uint32_t { Default = 0 , _8N1 = 1 , _8N2 = 2 , _8E1 = 3 , _8O1 = 4 , _7N1 = 5 , _7E1 = 6 , _7O1 = 7 } |
| UART config (word length / parity / stop bits). Common across Arduino and ESP-IDF native. More... | |
Opt-in, header-only board-aware connection helpers for M5UnitUnified examples.
This header exists solely to keep the example code in M5UnitUnified and M5Unit-* repositories short and readable. Each helper resolves board-specific pins / backends through M5Unified, opens the bus, and calls UnitUnified::add().
Users SHOULD treat these helpers as reference implementations, not as the only supported way to wire a unit. In real applications, prefer to call UnitUnified::add() directly with a bus or handle that fits the application's lifecycle (shared bus management, custom pins, alternative backends, etc.).
i2cBusHandle, uartPortHandle, spiDeviceHandle. Examples should NOT use these directly; use the generic addX helpers instead.
|
strong |
GPIO usage role: how many pins of the port the unit actually uses.
|
strong |