drivers.Epaper.Epdconfig¶
Low-level GPIO and SPI configuration for Waveshare-compatible e-paper panels.
Provides BCM pin definitions, SPI bus initialization, digital I/O helpers,
and timing utilities consumed by drivers.Epaper.EPD.EPD. This module
isolates the platform-specific RPi.GPIO and spidev dependencies so the
high-level driver remains testable and portable.
Example
Bring up the bus, toggle reset, and tear down again:
>>> from drivers.Epaper.Epdconfig import Epdconfig
>>> cfg = Epdconfig()
>>> cfg.module_init()
0
>>> cfg.digital_write(cfg.RST_PIN, 1)
>>> cfg.module_exit()
Note
Hardware pin assignments (BCM numbering):
RST_PIN= GPIO 17 (output, hardware reset)DC_PIN= GPIO 25 (output, data/command select)CS_PIN= GPIO 8 (output, SPI chip-select; hardware-managed by SPI0)BUSY_PIN= GPIO 24 (input, controller busy flag)
SPI configuration:
Bus:
0, device:0(/dev/spidev0.0)Mode:
0b00(CPOL = 0, CPHA = 0)max_speed_hz:1_240_000(1.24 MHz, matches Waveshare reference)
Refresh modes are managed by the higher-level driver; this module only exposes the byte-level transport.
Classes¶
Hardware abstraction over RPi.GPIO and spidev for an e-paper module. |