idfxx 1.0.0
Modern C++23 components for ESP-IDF
Loading...
Searching...
No Matches
idfxx::lcd::ili9341 Class Reference

ILI9341 display controller driver. More...

Inheritance diagram for idfxx::lcd::ili9341:
idfxx::lcd::panel

Public Member Functions

 ili9341 (idfxx::panel_io &panel_io, panel::config config)
 Creates a new ili9341 panel.
 
 ~ili9341 ()
 
 ili9341 (const ili9341 &)=delete
 
ili9341operator= (const ili9341 &)=delete
 
 ili9341 (ili9341 &&other) noexcept
 
ili9341operator= (ili9341 &&other) noexcept
 
- Public Member Functions inherited from idfxx::lcd::panel
virtual ~panel ()=default
 
 panel (const panel &)=delete
 
paneloperator= (const panel &)=delete
 
esp_lcd_panel_handle_t idf_handle () const
 Returns the underlying ESP-IDF handle.
 
size_t width () const noexcept
 Returns the panel's native width in pixels.
 
size_t height () const noexcept
 Returns the panel's native height in pixels.
 
void draw_bitmap (int x_start, int y_start, int x_end, int y_end, const void *color_data)
 Draws bitmap data to a region of the display.
 
void invert_color (bool invert)
 Inverts the color of the display.
 
void swap_xy (bool swap)
 Swaps the X and Y axes.
 
void mirror (bool mirror_x, bool mirror_y)
 Mirrors the display.
 
void display_on (bool on)
 Turns the display on or off.
 
result< void > try_draw_bitmap (int x_start, int y_start, int x_end, int y_end, const void *color_data)
 Draws bitmap data to a region of the display.
 
result< void > try_invert_color (bool invert)
 Inverts the color of the display.
 
result< void > try_swap_xy (bool swap)
 Swaps the X and Y axes.
 
result< void > try_mirror (bool mirror_x, bool mirror_y)
 Mirrors the display.
 
result< void > try_display_on (bool on)
 Turns the display on or off.
 

Static Public Member Functions

static result< ili9341make (idfxx::panel_io &panel_io, panel::config config)
 Creates a new ili9341 panel.
 

Additional Inherited Members

- Protected Member Functions inherited from idfxx::lcd::panel
 panel ()=default
 
 panel (size_t width, size_t height) noexcept
 Constructs a panel reporting the given native dimensions.
 
 panel (panel &&) noexcept=default
 
paneloperator= (panel &&) noexcept=default
 
virtual result< void > do_draw_bitmap (int x_start, int y_start, int x_end, int y_end, const void *color_data)
 Hook for try_draw_bitmap.
 
virtual result< void > do_invert_color (bool invert)
 Hook for try_invert_color.
 
virtual result< void > do_swap_xy (bool swap)
 Hook for try_swap_xy.
 
virtual result< void > do_mirror (bool mirror_x, bool mirror_y)
 Hook for try_mirror.
 
virtual result< void > do_display_on (bool on)
 Hook for try_display_on.
 

Detailed Description

ILI9341 display controller driver.

Driver for ILI9341-based LCD displays (typically 240x320 resolution).

Definition at line 28 of file ili9341.hpp.

Constructor & Destructor Documentation

◆ ili9341() [1/3]

idfxx::lcd::ili9341::ili9341 ( idfxx::panel_io panel_io,
panel::config  config 
)
explicit

Creates a new ili9341 panel.

Does not take ownership of panel_io. It is the caller's responsibility to ensure that this panel does not outlive the panel I/O interface.

Parameters
panel_ioThe panel I/O interface.
configpanel configuration.
Note
Only available when CONFIG_COMPILER_CXX_EXCEPTIONS is enabled in menuconfig.
Exceptions
std::system_erroron error.

◆ ~ili9341()

idfxx::lcd::ili9341::~ili9341 ( )

◆ ili9341() [2/3]

idfxx::lcd::ili9341::ili9341 ( const ili9341 )
delete

◆ ili9341() [3/3]

idfxx::lcd::ili9341::ili9341 ( ili9341 &&  other)
noexcept

Member Function Documentation

◆ make()

static result< ili9341 > idfxx::lcd::ili9341::make ( idfxx::panel_io panel_io,
panel::config  config 
)
static

Creates a new ili9341 panel.

Does not take ownership of panel_io. It is the caller's responsibility to ensure that this panel does not outlive the panel I/O interface.

Parameters
panel_ioThe panel I/O interface.
configpanel configuration.
Returns
The new ili9341, or an error.

◆ operator=() [1/2]

ili9341 & idfxx::lcd::ili9341::operator= ( const ili9341 )
delete

◆ operator=() [2/2]

ili9341 & idfxx::lcd::ili9341::operator= ( ili9341 &&  other)
noexcept

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