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
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
epaper::EPD27 Class Reference

2.7 inch e-paper display driver (176x264 pixels). More...

#include <epd27.hpp>

Public Member Functions

 EPD27 (Device::HalSpi spi, Device::HalOutput cs, Device::HalOutput dc, Device::HalOutput rst, Device::HalInput busy, std::optional< Device::HalOutput > pwr=std::nullopt)
 Construct EPD27 driver with direct hardware resources.
 
 EPD27 (Device &device, EPD27PinConfig pins)
 Construct using custom pin configuration.
 
 EPD27 (Device &device)
 Construct using default Waveshare HAT pins.
 
 ~EPD27 ()=default
 
auto init (DisplayMode mode) -> std::expected< void, Error >
 
auto clear () -> std::expected< void, Error >
 
auto display (std::span< const std::byte > buffer) -> std::expected< void, Error >
 
auto display_planes (std::span< const std::span< const std::byte > > planes) -> std::expected< void, Error >
 
auto sleep () -> std::expected< void, Error >
 
auto wake () -> std::expected< void, Error >
 
auto power_off () -> std::expected< void, Error >
 
auto power_on () -> std::expected< void, Error >
 
auto mode () const noexcept -> DisplayMode
 
auto buffer_size () const noexcept -> std::size_t
 

Static Public Member Functions

static auto width () noexcept -> std::size_t
 
static auto height () noexcept -> std::size_t
 
static auto supports_partial_refresh () noexcept -> bool
 
static auto supports_power_control () noexcept -> bool
 
static auto supports_wake () noexcept -> bool
 

Static Public Attributes

static constexpr std::size_t WIDTH = 176
 
static constexpr std::size_t HEIGHT = 264
 

Detailed Description

2.7 inch e-paper display driver (176x264 pixels).

2.7 inch e-paper display driver for Linux (Raspberry Pi).

Constructor & Destructor Documentation

◆ EPD27() [1/3]

epaper::EPD27::EPD27 ( Device::HalSpi  spi,
Device::HalOutput  cs,
Device::HalOutput  dc,
Device::HalOutput  rst,
Device::HalInput  busy,
std::optional< Device::HalOutput pwr = std::nullopt 
)
inline

Construct EPD27 driver with direct hardware resources.

Parameters
spiSPI bus instance
csChip Select pin
dcData/Command pin
rstReset pin
busyBusy signal pin
pwrOptional power control pin

◆ EPD27() [2/3]

epaper::EPD27::EPD27 ( Device device,
EPD27PinConfig  pins 
)
inline

Construct using custom pin configuration.

Parameters
deviceInitialized Linux device
pinsPin map

◆ EPD27() [3/3]

epaper::EPD27::EPD27 ( Device device)
inlineexplicit

Construct using default Waveshare HAT pins.

Parameters
deviceInitialized Linux device

◆ ~EPD27()

epaper::EPD27::~EPD27 ( )
default

Member Function Documentation

◆ buffer_size()

auto epaper::EPD27::buffer_size ( ) const -> std::size_t
inlinenoexcept

◆ clear()

auto epaper::EPD27::clear ( ) -> std::expected<void, Error>
inline
Here is the call graph for this function:

◆ display()

auto epaper::EPD27::display ( std::span< const std::byte >  buffer) -> std::expected<void, Error>
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ display_planes()

auto epaper::EPD27::display_planes ( std::span< const std::span< const std::byte > >  planes) -> std::expected<void, Error>
inline
Here is the call graph for this function:

◆ height()

static auto epaper::EPD27::height ( ) -> std::size_t
inlinestaticnoexcept

◆ init()

auto epaper::EPD27::init ( DisplayMode  mode) -> std::expected<void, Error>
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mode()

auto epaper::EPD27::mode ( ) const -> DisplayMode
inlinenoexcept
Here is the caller graph for this function:

◆ power_off()

auto epaper::EPD27::power_off ( ) -> std::expected<void, Error>
inline

◆ power_on()

auto epaper::EPD27::power_on ( ) -> std::expected<void, Error>
inline

◆ sleep()

auto epaper::EPD27::sleep ( ) -> std::expected<void, Error>
inline

◆ supports_partial_refresh()

static auto epaper::EPD27::supports_partial_refresh ( ) -> bool
inlinestaticnoexcept

◆ supports_power_control()

static auto epaper::EPD27::supports_power_control ( ) -> bool
inlinestaticnoexcept

◆ supports_wake()

static auto epaper::EPD27::supports_wake ( ) -> bool
inlinestaticnoexcept

◆ wake()

auto epaper::EPD27::wake ( ) -> std::expected<void, Error>
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ width()

static auto epaper::EPD27::width ( ) -> std::size_t
inlinestaticnoexcept

Member Data Documentation

◆ HEIGHT

constexpr std::size_t epaper::EPD27::HEIGHT = 264
staticconstexpr

◆ WIDTH

constexpr std::size_t epaper::EPD27::WIDTH = 176
staticconstexpr

The documentation for this class was generated from the following file: