idfxx 1.0.0
Modern C++23 components for ESP-IDF
Loading...
Searching...
No Matches
idfxx::panel_io::i2c_config Struct Reference

I2C-based panel I/O configuration. More...

#include <idfxx_panel_io/include/idfxx/panel_io.hpp>

Public Attributes

uint16_t device_address = 0
 7-bit I2C device address (e.g. 0x3C for a typical SSD1306)
 
freq::hertz scl_speed {0}
 I2C SCL frequency.
 
color_transfer_done_callback on_color_transfer_done
 Callback invoked when color data transfer has finished.
 
size_t control_phase_bytes = 0
 Number of bytes the panel encodes control information (e.g.
 
unsigned int dc_bit_offset = 0
 Offset of the D/C selection bit in the control phase.
 
int lcd_cmd_bits = 0
 Bit-width of LCD command.
 
int lcd_param_bits = 0
 Bit-width of LCD parameter.
 
struct { 
 
   unsigned int   dc_low_on_data: 1 = 0 
 If enabled, DC bit = 0 indicates data transfer and DC bit = 1 indicates command transfer; vice versa otherwise. More...
 
   unsigned int   disable_control_phase: 1 = 0 
 If enabled, the control phase isn't used. More...
 
flags = {} 
 Extra flags to fine-tune the I2C device.
 

Detailed Description

I2C-based panel I/O configuration.

All fields have sensible defaults, but you must define device_address, scl_speed, lcd_cmd_bits, and lcd_param_bits at minimum. The control-phase framing is a property of the panel controller; panel driver components typically provide a pre-filled configuration (e.g. ssd1306::i2c_io_config()) or document the values they require.

Definition at line 94 of file panel_io.hpp.

Member Data Documentation

◆ control_phase_bytes

size_t idfxx::panel_io::i2c_config::control_phase_bytes = 0

Number of bytes the panel encodes control information (e.g.

D/C selection) into during the control phase

Definition at line 99 of file panel_io.hpp.

◆ dc_bit_offset

unsigned int idfxx::panel_io::i2c_config::dc_bit_offset = 0

Offset of the D/C selection bit in the control phase.

Definition at line 101 of file panel_io.hpp.

◆ dc_low_on_data

unsigned int idfxx::panel_io::i2c_config::dc_low_on_data

If enabled, DC bit = 0 indicates data transfer and DC bit = 1 indicates command transfer; vice versa otherwise.

Definition at line 105 of file panel_io.hpp.

◆ device_address

uint16_t idfxx::panel_io::i2c_config::device_address = 0

7-bit I2C device address (e.g. 0x3C for a typical SSD1306)

Definition at line 95 of file panel_io.hpp.

◆ disable_control_phase

unsigned int idfxx::panel_io::i2c_config::disable_control_phase

If enabled, the control phase isn't used.

Definition at line 107 of file panel_io.hpp.

◆ [struct]

struct { ... } idfxx::panel_io::i2c_config::flags

Extra flags to fine-tune the I2C device.

◆ lcd_cmd_bits

int idfxx::panel_io::i2c_config::lcd_cmd_bits = 0

Bit-width of LCD command.

Definition at line 102 of file panel_io.hpp.

◆ lcd_param_bits

int idfxx::panel_io::i2c_config::lcd_param_bits = 0

Bit-width of LCD parameter.

Definition at line 103 of file panel_io.hpp.

◆ on_color_transfer_done

color_transfer_done_callback idfxx::panel_io::i2c_config::on_color_transfer_done
Initial value:
=
nullptr

Callback invoked when color data transfer has finished.

Definition at line 97 of file panel_io.hpp.

◆ scl_speed

freq::hertz idfxx::panel_io::i2c_config::scl_speed {0}

I2C SCL frequency.

Definition at line 96 of file panel_io.hpp.


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