22#include <idfxx/spi/master>
24#include <esp_lcd_panel_io.h>
25#include <frequency/frequency>
94#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
115 [[nodiscard]] esp_lcd_panel_io_handle_t
idf_handle()
const {
return _handle; }
122 on_color_transfer_done(esp_lcd_panel_io_handle_t handle, esp_lcd_panel_io_event_data_t* edata,
void* user_ctx);
124 std::shared_ptr<idfxx::spi::master_bus> _spi_bus;
125 esp_lcd_panel_io_handle_t _handle;
Type-safe set of flags from a scoped enum.
SPI-based panel I/O interface.
std::move_only_function< bool(esp_lcd_panel_io_event_data_t *edata)> color_transfer_done_callback
Callback type invoked when color data transfer has finished.
panel_io & operator=(panel_io &&)=delete
esp_lcd_panel_io_handle_t idf_handle() const
Returns the underlying ESP-IDF handle.
static result< std::unique_ptr< panel_io > > make(std::shared_ptr< idfxx::spi::master_bus > spi_bus, spi_config config)
Creates a new panel I/O interface.
panel_io(const panel_io &)=delete
panel_io(std::shared_ptr< idfxx::spi::master_bus > spi_bus, spi_config config)
Creates a new panel I/O interface.
panel_io(panel_io &&)=delete
panel_io & operator=(const panel_io &)=delete
host_device
General purpose SPI Host Controller ID.
std::expected< T, std::error_code > result
result type wrapping a value or error code.
SPI-based panel I/O configuration.
unsigned int octal_mode
transmit with octal mode (8 data lines), this mode is used to simulate Intel 8080 timing
size_t trans_queue_depth
Size of internal transaction queue.
uint8_t cs_enable_pretrans
Amount of SPI bit-cycles the cs should be activated before the transmission (0-16)
unsigned int dc_low_on_data
If enabled, DC level = 0 indicates color data transfer.
int spi_mode
Traditional SPI mode (0~3)
int lcd_param_bits
Bit-width of LCD parameter.
int lcd_cmd_bits
Bit-width of LCD command.
unsigned int cs_high_active
CS line is high active.
gpio cs_gpio
GPIO used for CS line.
freq::hertz pclk_freq
Frequency of pixel clock.
unsigned int dc_low_on_param
If enabled, DC level = 0 indicates parameter transfer.
unsigned int dc_high_on_cmd
If enabled, DC level = 1 indicates command transfer.
color_transfer_done_callback on_color_transfer_done
Callback invoked when color data transfer has finished.
gpio dc_gpio
GPIO used to select the D/C line, set this to -1 if the D/C line is not used.
uint8_t cs_enable_posttrans
Amount of SPI bit-cycles the cs should stay active after the transmission (0-16)
unsigned int quad_mode
transmit with quad mode (4 data lines), this mode is useful when transmitting LCD parameters (Only us...
unsigned int sio_mode
Read and write through a single data line (MOSI)
unsigned int lsb_first
transmit LSB bit first