13#include <idfxx/lcd/panel>
14#include <idfxx/panel_io>
70 i2c_io_config(uint16_t device_address = 0x3C, freq::hertz scl_speed = freq::hertz{400000})
noexcept;
72#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
102#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
140 , _io_handle(io_handle)
146 esp_lcd_panel_io_handle_t _io_handle =
nullptr;
static constexpr gpio nc()
Returns a GPIO representing "not connected".
level
GPIO output/input level.
Abstract base class for LCD panels.
size_t height() const noexcept
Returns the panel's native height in pixels.
SSD1306 monochrome OLED display controller driver.
void set_contrast(uint8_t level)
Sets the display contrast (SSD1306 "Set Contrast Control", command 0x81).
static panel_io::i2c_config i2c_io_config(uint16_t device_address=0x3C, freq::hertz scl_speed=freq::hertz{400000}) noexcept
Returns a panel I/O configuration for communicating with an SSD1306 over I2C.
result< void > try_set_contrast(uint8_t level)
Sets the display contrast (SSD1306 "Set Contrast Control", command 0x81).
ssd1306(idfxx::panel_io &panel_io, config config)
Creates a new ssd1306 panel.
ssd1306 & operator=(const ssd1306 &)=delete
ssd1306(const ssd1306 &)=delete
ssd1306 & operator=(ssd1306 &&other) noexcept
ssd1306(ssd1306 &&other) noexcept
static result< ssd1306 > make(idfxx::panel_io &panel_io, config config)
Creates a new ssd1306 panel.
Panel I/O interface for SPI- and I2C-connected displays.
struct esp_lcd_panel_t * esp_lcd_panel_handle_t
T unwrap(result< T > result)
Throws a std::system_error if the result is an error.
std::expected< T, std::error_code > result
result type wrapping a value or error code.
Configuration structure for SSD1306 panels.
gpio::level reset_active_level
Active level for the panel reset signal.
uint32_t height
Display height in pixels (64 or 32)
gpio reset_gpio
GPIO number for hardware reset, or idfxx::gpio::nc() if not used.
I2C-based panel I/O configuration.