Skip to content

File PinRef.h

FileList > Firmware > Libraries > PanelGroup > PinRef.h

Go to the source code of this file

Hardware pin abstraction for OpenSkyhawk panel controls.More...

  • #include <Arduino.h>

Classes

Type Name
class PinRef
Hardware pin abstraction used by all OpenSkyhawk input and output classes.

Public Attributes

Type Name
const PinRef PIN_NC
No-connect sentinel. Pass where no physical pin exists.

Public Static Attributes

Type Name
constexpr uint8_t PORT_A = 0
Thin wrapper over Adafruit_ADS1115; see ADS1115.h .
constexpr uint8_t PORT_B = 1
MCP23017 GPB port constant for constructors.

Detailed Description

Abstracts three hardware pin sources behind a single interface: direct STM32 GPIO, MCP23017 expander GPIO, and ADS1115 ADC channel. Used by all input and output classes so control declarations are identical regardless of where the physical pin lives.

Contains no logic beyond read/write dispatch — no debounce, no filtering, no state. PinRef objects are value types: live on the stack or as class members, never heap-allocated.

Version:

0.1.0

Copyright:

GPL-2.0-only — see Firmware/LICENSE

Public Attributes Documentation

variable PIN_NC

No-connect sentinel. Pass where no physical pin exists.

const PinRef PIN_NC;

All reads return false / 0; all writes are no-ops. Provided as a named constant for readability in wiring maps.

Usage: PinRef pins[] = { PinRef(exp1, PORT_A, 0) , PIN_NC, PinRef(exp1, PORT_A, 2) };

See also: ANALOG_NC (0xFFFF) for AnalogMultiPos unused voltage levels.


Public Static Attributes Documentation

variable PORT_A

Thin wrapper over Adafruit_ADS1115; see ADS1115.h .

constexpr uint8_t PORT_A;

MCP23017 GPA port constant for constructors


variable PORT_B

MCP23017 GPB port constant for constructors.

constexpr uint8_t PORT_B;


The documentation for this class was generated from the following file Firmware/Libraries/PanelGroup/PinRef.h