13#include <idfxx/epaper/panel>
16#include <idfxx/panel_io>
21#include <frequency/frequency>
22#include <initializer_list>
116#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
195 [[nodiscard]] result<void>
196 do_write(
const mono_framebuffer& fb,
size_t row_start,
size_t row_end,
size_t x,
size_t y)
override;
197 [[nodiscard]] result<void>
198 do_write(
const gray4_framebuffer& fb,
size_t row_start,
size_t row_end,
size_t x,
size_t y)
override;
199 [[nodiscard]] result<void> do_clear()
override;
200 [[nodiscard]] result<void> do_refresh(
refresh_mode mode)
override;
201 [[nodiscard]] result<void> do_set_color_mode(
enum color_mode mode)
override;
202 [[nodiscard]] result<void> do_sleep()
override;
203 [[nodiscard]] result<void> do_wake()
override;
206 [[nodiscard]] result<void> _cmd(uint8_t cmd);
207 [[nodiscard]] result<void> _cmd(uint8_t cmd, std::initializer_list<uint8_t> params);
208 [[nodiscard]] result<void> _cmd(uint8_t cmd, std::span<const uint8_t> params);
209 [[nodiscard]] result<void> _stream(
int cmd, std::span<const uint8_t> data);
210 [[nodiscard]] result<void> _power_on();
211 [[nodiscard]] result<void> _set_resolution();
212 [[nodiscard]] result<void> _load_luts(
213 std::span<const uint8_t> vcom,
214 std::span<const uint8_t> ww,
215 std::span<const uint8_t> kw,
216 std::span<const uint8_t> wk,
217 std::span<const uint8_t> kk
219 [[nodiscard]] result<void> _init_full();
220 [[nodiscard]] result<void> _init_fast();
221 [[nodiscard]] result<void> _init_partial();
222 [[nodiscard]] result<void> _init_gray();
223 [[nodiscard]] result<void> _ensure_waveform(waveform target);
224 [[nodiscard]] result<void> _window_begin(region r);
225 [[nodiscard]] result<void> _window_end();
226 [[nodiscard]] result<void> _clear_ram(
bool include_old_plane);
227 [[nodiscard]] result<void> _update();
228 [[nodiscard]] result<void> _enter_deep_sleep();
231 waveform _waveform = waveform::full;
Abstract base class for ePaper display panels.
std::chrono::milliseconds busy_timeout() const noexcept
Returns the default BUSY timeout.
size_t height() const noexcept
Returns the panel height in pixels.
gpio reset_gpio() const noexcept
Returns the reset output pin (may be unconnected).
gpio busy_gpio() const noexcept
Returns the BUSY input pin (may be unconnected).
enum color_mode color_mode() const noexcept
Returns the panel's current pixel format.
size_t width() const noexcept
Returns the panel width in pixels.
UC8179 ePaper display controller driver.
static result< uc8179 > make(idfxx::panel_io &panel_io, config config)
Creates a new UC8179 panel driver.
uc8179 & operator=(uc8179 &&other) noexcept
uc8179(idfxx::panel_io &panel_io, config config)
Creates a new UC8179 panel driver.
uc8179(const uc8179 &)=delete
static panel_io::spi_config spi_io_config(gpio cs, gpio dc, freq::hertz pclk=freq::hertz{10 '000 '000}) noexcept
Returns a panel I/O configuration for communicating with a UC8179 over SPI.
uc8179 & operator=(const uc8179 &)=delete
uc8179(uc8179 &&other) noexcept
static constexpr gpio nc()
Returns a GPIO representing "not connected".
Panel I/O interface for SPI- and I2C-connected displays.
ePaper display driver classes.
refresh_mode
Refresh style for panel::refresh.
@ partial
Differential update: only pixels that changed since the previous refresh flip, without the full-refre...
@ fast
Full-screen update with a shortened waveform: much faster than refresh_mode::full and still updates e...
@ full
Full update with the controller's highest-quality waveform: the panel flashes through inverse images ...
std::expected< T, std::error_code > result
result type wrapping a value or error code.
Configuration structure for UC8179 panels.
std::chrono::milliseconds busy_timeout
Maximum time to wait for the BUSY line to release.
gpio reset_gpio
GPIO wired to the panel's reset line, or gpio::nc() if not wired.
size_t width
Panel width in pixels (sources).
size_t height
Panel height in pixels (gates). The controller drives up to 600.
gpio busy_gpio
GPIO wired to the panel's BUSY output (required).
SPI-based panel I/O configuration.