libepaper 2.0.0
A C++23 library for controlling Waveshare e-paper displays on Raspberry Pi, featuring transparent sleep/wake management and a fluent builder API.
Loading...
Searching...
No Matches
Namespaces | Concepts
gpio.hpp File Reference

GPIO pin concepts for hardware abstraction. More...

#include <concepts>
Include dependency graph for gpio.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  epaper
 
namespace  epaper::hal
 

Concepts

concept  epaper::hal::DigitalOutput
 
concept  epaper::hal::DigitalInput
 

Detailed Description

GPIO pin concepts for hardware abstraction.

Defines C++20 concepts for digital input/output pins, enabling generic driver code that works with any GPIO implementation.

Design Philosophy:

Hardware Abstraction via Concepts
├─ Platform Independence: Drivers work with any GPIO backend
├─ Mockability: Easy to substitute mock pins for testing
├─ Zero Overhead: Concepts compile to direct calls (no vtable)
└─ Type Safety: Compile-time validation of pin capabilities

Concept Hierarchy:

DigitalOutput: write(bool) -> void
DigitalInput: read() -> bool

Typical Implementations:

Pin Semantics:

No Buffering: