ESPHome 2026.8.0-dev
Loading...
Searching...
No Matches
esphome::it8951::IT8951Display Class Reference

#include <it8951.h>

Inheritance diagram for esphome::it8951::IT8951Display:
esphome::display::Display esphome::spi::SPIDevice< spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_LEADING, spi::DATA_RATE_2MHZ > esphome::PollingComponent esphome::spi::SPIClient esphome::Component

Public Member Functions

 IT8951Display (const char *name, uint16_t width, uint16_t height)
 
void setup () override
 
void loop () override
 
void dump_config () override
 
void on_safe_shutdown () override
 
float get_setup_priority () const override
 
void set_reset_pin (GPIOPin *pin)
 
void set_busy_pin (GPIOPin *pin)
 
void set_enable_pins (std::vector< GPIOPin * > pins)
 
void set_reset_duration (uint32_t ms)
 
void set_full_update_every (uint8_t n)
 
void set_invert_colors (bool invert_colors)
 
void set_sleep_when_done (bool s)
 
void set_vcom (uint16_t vcom_mv)
 
void set_vcom_register (uint16_t selector)
 
void set_force_temperature (int16_t celsius)
 
void set_use_legacy_dpy_area (bool use)
 
void set_grayscale (bool g)
 
void set_dithering (bool d)
 
void set_update_mode (uint16_t m)
 
void set_transform (uint8_t t)
 
void set_rotation (DisplayRotation rotation) override
 
void update () override
 
void update_mode (UpdateMode mode)
 
DisplayType get_display_type () override
 
void fill (Color color) override
 
void clear () override
 
void draw_pixel_at (int x, int y, Color color) override
 
void draw_pixels_at (int x_start, int y_start, int w, int h, const uint8_t *ptr, ColorOrder order, ColorBitness bitness, bool big_endian, int x_offset, int y_offset, int x_pad) override
 
int get_width () override
 
int get_height () override
 
- Public Member Functions inherited from esphome::display::Display
int get_native_width ()
 Get the native (original) width of the display in pixels.
 
int get_native_height ()
 Get the native (original) height of the display in pixels.
 
void draw_pixel_at (int x, int y)
 Set a single pixel at the specified coordinates to default color.
 
void draw_pixels_at (int x_start, int y_start, int w, int h, const uint8_t *ptr, ColorOrder order, ColorBitness bitness, bool big_endian)
 Convenience overload for base case where the pixels are packed into the buffer with no gaps (e.g. suits LVGL.)
 
void line (int x1, int y1, int x2, int y2, Color color=COLOR_ON)
 Draw a straight line from the point [x1,y1] to [x2,y2] with the given color.
 
void line_at_angle (int x, int y, int angle, int length, Color color=COLOR_ON)
 Draw a straight line at the given angle based on the origin [x, y] for a specified length with the given color.
 
void line_at_angle (int x, int y, int angle, int start_radius, int stop_radius, Color color=COLOR_ON)
 Draw a straight line at the given angle based on the origin [x, y] from a specified start and stop radius with the given color.
 
void horizontal_line (int x, int y, int width, Color color=COLOR_ON)
 Draw a horizontal line from the point [x,y] to [x+width,y] with the given color.
 
void vertical_line (int x, int y, int height, Color color=COLOR_ON)
 Draw a vertical line from the point [x,y] to [x,y+width] with the given color.
 
void rectangle (int x1, int y1, int width, int height, Color color=COLOR_ON)
 Draw the outline of a rectangle with the top left point at [x1,y1] and the bottom right point at [x1+width,y1+height].
 
void filled_rectangle (int x1, int y1, int width, int height, Color color=COLOR_ON)
 Fill a rectangle with the top left point at [x1,y1] and the bottom right point at [x1+width,y1+height].
 
void circle (int center_x, int center_xy, int radius, Color color=COLOR_ON)
 Draw the outline of a circle centered around [center_x,center_y] with the radius radius with the given color.
 
void filled_circle (int center_x, int center_y, int radius, Color color=COLOR_ON)
 Fill a circle centered around [center_x,center_y] with the radius radius with the given color.
 
void filled_ring (int center_x, int center_y, int radius1, int radius2, Color color=COLOR_ON)
 Fill a ring centered around [center_x,center_y] between two circles with the radius1 and radius2 with the given color.
 
void filled_gauge (int center_x, int center_y, int radius1, int radius2, int progress, Color color=COLOR_ON)
 Fill a half-ring "gauge" centered around [center_x,center_y] between two circles with the radius1 and radius2 with he given color and filled up to 'progress' percent.
 
void triangle (int x1, int y1, int x2, int y2, int x3, int y3, Color color=COLOR_ON)
 Draw the outline of a triangle contained between the points [x1,y1], [x2,y2] and [x3,y3] with the given color.
 
void filled_triangle (int x1, int y1, int x2, int y2, int x3, int y3, Color color=COLOR_ON)
 Fill a triangle contained between the points [x1,y1], [x2,y2] and [x3,y3] with the given color.
 
void get_regular_polygon_vertex (int vertex_id, int *vertex_x, int *vertex_y, int center_x, int center_y, int radius, int edges, RegularPolygonVariation variation=VARIATION_POINTY_TOP, float rotation_degrees=ROTATION_0_DEGREES)
 Get the specified vertex (x,y) coordinates for the regular polygon inscribed in the circle centered on [center_x,center_y] with the given radius.
 
void regular_polygon (int x, int y, int radius, int edges, RegularPolygonVariation variation=VARIATION_POINTY_TOP, float rotation_degrees=ROTATION_0_DEGREES, Color color=COLOR_ON, RegularPolygonDrawing drawing=DRAWING_OUTLINE)
 Draw the outline of a regular polygon inscribed in the circle centered on [x,y] with the given radius and color.
 
void regular_polygon (int x, int y, int radius, int edges, RegularPolygonVariation variation, Color color, RegularPolygonDrawing drawing=DRAWING_OUTLINE)
 
void regular_polygon (int x, int y, int radius, int edges, Color color, RegularPolygonDrawing drawing=DRAWING_OUTLINE)
 
void filled_regular_polygon (int x, int y, int radius, int edges, RegularPolygonVariation variation=VARIATION_POINTY_TOP, float rotation_degrees=ROTATION_0_DEGREES, Color color=COLOR_ON)
 Fill a regular polygon inscribed in the circle centered on [x,y] with the given radius and color.
 
void filled_regular_polygon (int x, int y, int radius, int edges, RegularPolygonVariation variation, Color color)
 
void filled_regular_polygon (int x, int y, int radius, int edges, Color color)
 
void print (int x, int y, BaseFont *font, Color color, TextAlign align, const char *text, Color background=COLOR_OFF)
 Print text with the anchor point at [x,y] with font.
 
void print (int x, int y, BaseFont *font, Color color, const char *text, Color background=COLOR_OFF)
 Print text with the top left at [x,y] with font.
 
void print (int x, int y, BaseFont *font, TextAlign align, const char *text)
 Print text with the anchor point at [x,y] with font.
 
void print (int x, int y, BaseFont *font, const char *text)
 Print text with the top left at [x,y] with font.
 
void printf (int x, int y, BaseFont *font, Color color, Color background, TextAlign align, const char *format,...) __attribute__((format(printf
 Evaluate the printf-format format and print the result with the anchor point at [x,y] with font.
 
void void printf (int x, int y, BaseFont *font, Color color, TextAlign align, const char *format,...) __attribute__((format(printf
 Evaluate the printf-format format and print the result with the anchor point at [x,y] with font.
 
void void void printf (int x, int y, BaseFont *font, Color color, const char *format,...) __attribute__((format(printf
 Evaluate the printf-format format and print the result with the top left at [x,y] with font.
 
void void void void printf (int x, int y, BaseFont *font, TextAlign align, const char *format,...) __attribute__((format(printf
 Evaluate the printf-format format and print the result with the anchor point at [x,y] with font.
 
void void void void void printf (int x, int y, BaseFont *font, const char *format,...) __attribute__((format(printf
 Evaluate the printf-format format and print the result with the top left at [x,y] with font.
 
void void void void void void strftime (int x, int y, BaseFont *font, Color color, Color background, TextAlign align, const char *format, ESPTime time) __attribute__((format(strftime
 Evaluate the strftime-format format and print the result with the anchor point at [x,y] with font.
 
void void void void void void void strftime (int x, int y, BaseFont *font, Color color, TextAlign align, const char *format, ESPTime time) __attribute__((format(strftime
 Evaluate the strftime-format format and print the result with the anchor point at [x,y] with font.
 
void void void void void void void void strftime (int x, int y, BaseFont *font, Color color, const char *format, ESPTime time) __attribute__((format(strftime
 Evaluate the strftime-format format and print the result with the top left at [x,y] with font.
 
void void void void void void void void void strftime (int x, int y, BaseFont *font, TextAlign align, const char *format, ESPTime time) __attribute__((format(strftime
 Evaluate the strftime-format format and print the result with the anchor point at [x,y] with font.
 
void void void void void void void void void void strftime (int x, int y, BaseFont *font, const char *format, ESPTime time) __attribute__((format(strftime
 Evaluate the strftime-format format and print the result with the top left at [x,y] with font.
 
void void void void void void void void void void void image (int x, int y, BaseImage *image, Color color_on=COLOR_ON, Color color_off=COLOR_OFF)
 Draw the image with the top-left corner at [x,y] to the screen.
 
void image (int x, int y, BaseImage *image, ImageAlign align, Color color_on=COLOR_ON, Color color_off=COLOR_OFF)
 Draw the image at [x,y] to the screen.
 
void graph (int x, int y, graph::Graph *graph, Color color_on=COLOR_ON)
 Draw the graph with the top-left corner at [x,y] to the screen.
 
void legend (int x, int y, graph::Graph *graph, Color color_on=COLOR_ON)
 Draw the legend for graph with the top-left corner at [x,y] to the screen.
 
void qr_code (int x, int y, qr_code::QrCode *qr_code, Color color_on=COLOR_ON, int scale=1)
 Draw the qr_code with the top-left corner at [x,y] to the screen.
 
void menu (int x, int y, graphical_display_menu::GraphicalDisplayMenu *menu, int width, int height)
 
void get_text_bounds (int x, int y, const char *text, BaseFont *font, TextAlign align, int *x1, int *y1, int *width, int *height)
 Get the text bounds of the given string.
 
void set_writer (display_writer_t &&writer)
 Internal method to set the display writer lambda.
 
void show_page (DisplayPage *page)
 
void show_next_page ()
 
void show_prev_page ()
 
void set_pages (std::vector< DisplayPage * > pages)
 
const DisplayPageget_active_page () const
 
void add_on_page_change_trigger (DisplayOnPageChangeTrigger *t)
 
void set_auto_clear (bool auto_clear_enabled)
 
DisplayRotation get_rotation () const
 
void start_clipping (Rect rect)
 Set the clipping rectangle for further drawing.
 
void start_clipping (int16_t left, int16_t top, int16_t right, int16_t bottom)
 
void extend_clipping (Rect rect)
 Add a rectangular region to the invalidation region.
 
void extend_clipping (int16_t left, int16_t top, int16_t right, int16_t bottom)
 
void shrink_clipping (Rect rect)
 substract a rectangular region to the invalidation region
 
void shrink_clipping (uint16_t left, uint16_t top, uint16_t right, uint16_t bottom)
 
void end_clipping ()
 Reset the invalidation region.
 
Rect get_clipping () const
 Get the current the clipping rectangle.
 
bool is_clipping () const
 
bool clip (int x, int y)
 Check if pixel is within region of display.
 
void test_card ()
 
void show_test_card ()
 
- Public Member Functions inherited from esphome::PollingComponent
 PollingComponent ()
 
 PollingComponent (uint32_t update_interval)
 Initialize this polling component with the given update interval in ms.
 
void set_update_interval (uint32_t update_interval)
 Manually set the update interval in ms for this polling object.
 
void call_setup () override
 
virtual uint32_t get_update_interval () const
 Get the update interval in ms of this sensor.
 
void start_poller ()
 
void stop_poller ()
 
- Public Member Functions inherited from esphome::Component
float get_actual_setup_priority () const
 
void set_setup_priority (float priority)
 
void call ()
 
virtual void on_shutdown ()
 
virtual bool teardown ()
 Called during teardown to allow component to gracefully finish operations.
 
virtual void on_powerdown ()
 Called after teardown is complete to power down hardware.
 
uint8_t get_component_state () const
 
void reset_to_construction_state ()
 Reset this component back to the construction state to allow setup to run again.
 
bool is_in_loop_state () const
 Check if this component has completed setup and is in the loop state.
 
bool is_idle () const
 Check if this component is idle.
 
void mark_failed ()
 Mark this component as failed.
 
void mark_failed (const LogString *message)
 
void disable_loop ()
 Disable this component's loop.
 
void enable_loop ()
 Enable this component's loop.
 
void enable_loop_soon_any_context ()
 Thread and ISR-safe version of enable_loop() that can be called from any context.
 
bool is_failed () const
 
bool is_ready () const
 
virtual bool can_proceed ()
 
bool status_has_warning () const
 
bool status_has_error () const
 
void status_set_warning ()
 
void status_set_warning (const char *message)
 
void status_set_warning (const LogString *message)
 
void status_set_error ()
 
void status_set_error (const LogString *message)
 
void status_clear_warning ()
 
void status_clear_error ()
 
void status_momentary_warning (const char *name, uint32_t length=5000)
 Set warning status flag and automatically clear it after a timeout.
 
void status_momentary_error (const char *name, uint32_t length=5000)
 Set error status flag and automatically clear it after a timeout.
 
bool has_overridden_loop () const
 
const LogString * get_component_log_str () const ESPHOME_ALWAYS_INLINE
 Get the integration where this component was declared as a LogString for logging.
 
bool should_warn_of_blocking (uint32_t blocking_time, uint32_t &threshold_ms_out)
 
- Public Member Functions inherited from esphome::spi::SPIDevice< spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_LEADING, spi::DATA_RATE_2MHZ >
 SPIDevice ()
 
 SPIDevice (SPIComponent *parent, GPIOPin *cs_pin)
 
void spi_setup () override
 
void spi_teardown () override
 
void set_spi_parent (SPIComponent *parent)
 
void set_cs_pin (GPIOPin *cs)
 
void set_data_rate (uint32_t data_rate)
 
void set_bit_order (SPIBitOrder order)
 
void set_mode (SPIMode mode)
 
uint8_t read_byte ()
 
void read_array (uint8_t *data, size_t length)
 
void write (uint16_t data, size_t num_bits)
 Write a single data item, up to 32 bits.
 
void write_cmd_addr_data (size_t cmd_bits, uint32_t cmd, size_t addr_bits, uint32_t address, const uint8_t *data, size_t length, uint8_t bus_width=1)
 
void write_byte (uint8_t data)
 
void transfer_array (uint8_t *data, size_t length)
 Write the array data, replace with received data.
 
void transfer_array (std::array< uint8_t, N > &data)
 
uint8_t transfer_byte (uint8_t data)
 
void write_byte16 (uint16_t data)
 Write 16 bit data.
 
void write_array16 (const uint16_t *data, size_t length)
 Write an array of data as 16 bit values, byte-swapping if required.
 
void enable ()
 
void disable ()
 
void write_array (const uint8_t *data, size_t length)
 
void write_array (const std::array< uint8_t, N > &data)
 
void write_array (const std::vector< uint8_t > &data)
 
- Public Member Functions inherited from esphome::spi::SPIClient
 SPIClient (SPIBitOrder bit_order, SPIMode mode, uint32_t data_rate)
 
bool spi_is_ready ()
 
void set_release_device (bool release)
 
void set_write_only (bool write_only)
 

Protected Member Functions

int get_height_internal () override
 
int get_width_internal () override
 
void update_effective_transform_ ()
 
void apply_transform_ (int &x, int &y) const
 
bool rotate_coordinates_ (int &x, int &y)
 
void reset_dirty_region_ ()
 
uint16_t compute_row_width_ () const
 
void set_mono_pixel_ (uint16_t x, uint16_t y, bool value) const
 
void set_gray_pixel_ (uint16_t x, uint16_t y, uint8_t nibble) const
 
void write_pixel_native_ (uint16_t x, uint16_t y, const Color &color) const
 
void enqueue_ (OpType type, uint16_t a=0, uint16_t b=0)
 
void prepend_ (OpType type, uint16_t a=0, uint16_t b=0)
 
bool is_busy_ () const
 
void process_op_ (const Op &op)
 
void advance_phase_ ()
 
void set_phase_ (Phase next)
 
void start_update_ (UpdateMode mode)
 
void spi_cmd_ (uint16_t cmd)
 
void spi_write_word_ (uint16_t value)
 
void spi_write_reg_ (uint16_t addr, uint16_t value)
 
void spi_write_args_ (const uint16_t *args, uint16_t count)
 
uint16_t spi_read_word_ ()
 
void spi_read_dev_info_ ()
 
void op_xfer_lisar_ ()
 
void op_xfer_area_args_ ()
 
void op_xfer_area_end_ ()
 
bool op_xfer_rows_ ()
 
void op_dpy_buf_args_ ()
 
void op_check_lut_idle_ ()
 
void op_set_1bpp_ ()
 
void enqueue_init_reset_ ()
 
void enqueue_init_dev_info_ ()
 
void enqueue_init_vcom_ ()
 
void enqueue_init_temp_ ()
 
void enqueue_update_transfer_ ()
 
void enqueue_update_refresh_ ()
 
void enqueue_update_sleep_ ()
 
bool prepare_update_region_ (UpdateMode &mode)
 
void recover_ ()
 
- Protected Member Functions inherited from esphome::display::Display
bool clamp_x_ (int x, int w, int &min_x, int &max_x)
 
bool clamp_y_ (int y, int h, int &min_y, int &max_y)
 
void vprintf_ (int x, int y, BaseFont *font, Color color, Color background, TextAlign align, const char *format, va_list arg)
 
void do_update_ ()
 
void clear_clipping_ ()
 
void filled_flat_side_triangle_ (int x1, int y1, int x2, int y2, int x3, int y3, Color color)
 This method fills a triangle using only integer variables by using a modified bresenham algorithm.
 
void sort_triangle_points_by_y_ (int *x1, int *y1, int *x2, int *y2, int *x3, int *y3)
 
- Protected Member Functions inherited from esphome::Component
friend void::setup ()
 
friend void::original_setup ()
 
void set_component_source_ (uint8_t index)
 Set where this component was loaded from for some debug messages.
 
void call_dump_config_ ()
 
void enable_loop_slow_path_ ()
 
void set_component_state_ (uint8_t state)
 Helper to set component state (clears state bits and sets new state)
 
bool set_status_flag_ (uint8_t flag)
 Helper to set a status LED flag on both this component and the app.
 
void set_interval (const char *name, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a const char* name.
 
void set_interval (uint32_t id, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a numeric ID (zero heap allocation).
 
void set_interval (InternalSchedulerID id, uint32_t interval, std::function< void()> &&f)
 
void set_interval (uint32_t interval, std::function< void()> &&f)
 
bool cancel_interval (const char *name)
 Cancel an interval function.
 
bool cancel_interval (uint32_t id)
 
bool cancel_interval (InternalSchedulerID id)
 
void set_timeout (const char *name, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a const char* name.
 
void set_timeout (uint32_t id, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a numeric ID (zero heap allocation).
 
void set_timeout (InternalSchedulerID id, uint32_t timeout, std::function< void()> &&f)
 
void set_timeout (uint32_t timeout, std::function< void()> &&f)
 
bool cancel_timeout (const char *name)
 Cancel a timeout function.
 
bool cancel_timeout (uint32_t id)
 
bool cancel_timeout (InternalSchedulerID id)
 
void defer (const char *name, std::function< void()> &&f)
 Defer a callback to the next loop() call with a const char* name.
 
void defer (std::function< void()> &&f)
 Defer a callback to the next loop() call.
 
void defer (uint32_t id, std::function< void()> &&f)
 Defer a callback with a numeric ID (zero heap allocation)
 
bool cancel_defer (const char *name)
 Cancel a defer callback using the specified name, name must not be empty.
 
bool cancel_defer (uint32_t id)
 
void status_clear_warning_slow_path_ ()
 
void status_clear_error_slow_path_ ()
 

Protected Attributes

StaticOpQueue< Op, OP_QUEUE_SIZE > queue_
 
Phase phase_ {Phase::IDLE}
 
uint32_t delay_until_ {0}
 
uint32_t phase_started_at_ {0}
 
HighFrequencyLoopRequester high_freq_
 
bool update_pending_ {false}
 
UpdateMode pending_update_mode_ {UPDATE_MODE_NONE}
 
UpdateMode active_mode_ {UPDATE_MODE_NONE}
 
uint16_t area_x_ {0}
 
uint16_t area_y_ {0}
 
uint16_t area_w_ {0}
 
uint16_t area_h_ {0}
 
uint16_t transfer_row_ {0}
 
bool initialised_ {false}
 
bool asleep_ {false}
 
uint32_t partial_update_count_ {0}
 
uint32_t update_started_at_ {0}
 
uint16_t read_result_ {0}
 
DevInfo dev_info_ {}
 
uint16_t img_buf_addr_l_ {0}
 
uint16_t img_buf_addr_h_ {0}
 
const char * name_
 
uint16_t width_
 
uint16_t height_
 
uint16_t row_width_
 
size_t buffer_length_ {}
 
uint8_t * buffer_ {}
 
uint8_t transform_ {0}
 
uint8_t effective_transform_ {0}
 
uint8_t full_update_every_ {1}
 
uint32_t reset_duration_ {10}
 
uint16_t vcom_ {2300}
 
uint16_t vcom_register_ {I80_CMD_VCOM_WRITE}
 
int16_t force_temperature_ {DEFAULT_FORCE_TEMP_C}
 
bool force_temperature_set_ {false}
 
bool use_legacy_dpy_area_ {false}
 
bool invert_colors_ {false}
 
bool sleep_when_done_ {false}
 
bool grayscale_ {true}
 
bool dithering_ {true}
 
UpdateMode default_update_mode_ {UPDATE_MODE_NONE}
 
GPIOPinreset_pin_ {nullptr}
 
GPIOPinbusy_pin_ {nullptr}
 
std::vector< GPIOPin * > enable_pins_
 
uint16_t x_low_ {0}
 
uint16_t y_low_ {0}
 
uint16_t x_high_ {0}
 
uint16_t y_high_ {0}
 
uint32_t configured_data_rate_ {0}
 
uint8_t recovery_attempts_ {0}
 
uint8_t dev_info_attempts_ {0}
 
- Protected Attributes inherited from esphome::display::Display
DisplayRotation rotation_ {DISPLAY_ROTATION_0_DEGREES}
 
display_writer_t writer_ {}
 
DisplayPagepage_ {nullptr}
 
DisplayPageprevious_page_ {nullptr}
 
std::vector< DisplayOnPageChangeTrigger * > on_page_change_triggers_
 
bool auto_clear_enabled_ {true}
 
std::vector< Rectclipping_rectangle_
 
bool show_test_card_ {false}
 
- Protected Attributes inherited from esphome::PollingComponent
uint32_t update_interval_
 
- Protected Attributes inherited from esphome::Component
uint8_t component_source_index_ {0}
 Index into component source PROGMEM lookup table (0 = not set)
 
uint8_t warn_if_blocking_over_ {WARN_IF_BLOCKING_OVER_CS}
 Warn threshold in centiseconds (max 2550ms)
 
uint8_t component_state_ {0x00}
 State of this component - each bit has a purpose: Bits 0-2: Component state (0x00=CONSTRUCTION, 0x01=SETUP, 0x02=LOOP, 0x03=FAILED, 0x04=LOOP_DONE) Bit 3: STATUS_LED_WARNING Bit 4: STATUS_LED_ERROR Bit 5: Has overridden loop() (set at registration time) Bits 6-7: Unused - reserved for future expansion.
 
volatile bool pending_enable_loop_ {false}
 ISR-safe flag for enable_loop_soon_any_context.
 
ComponentRuntimeStats runtime_stats_
 
- Protected Attributes inherited from esphome::spi::SPIClient
SPIBitOrder bit_order_ {BIT_ORDER_MSB_FIRST}
 
SPIMode mode_ {MODE0}
 
uint32_t data_rate_ {1000000}
 
SPIComponentparent_ {nullptr}
 
GPIOPincs_ {nullptr}
 
bool release_device_ {false}
 
bool write_only_ {false}
 
SPIDelegatedelegate_ {SPIDelegate::NULL_DELEGATE}
 

Static Protected Attributes

static constexpr uint32_t BUSY_TIMEOUT_MS = 5000
 

Detailed Description

Definition at line 140 of file it8951.h.

Constructor & Destructor Documentation

◆ IT8951Display()

esphome::it8951::IT8951Display::IT8951Display ( const char * name,
uint16_t width,
uint16_t height )
inline

Definition at line 144 of file it8951.h.

Member Function Documentation

◆ advance_phase_()

void esphome::it8951::IT8951Display::advance_phase_ ( )
protected

Definition at line 173 of file it8951.cpp.

◆ apply_transform_()

void esphome::it8951::IT8951Display::apply_transform_ ( int & x,
int & y ) const
protected

Definition at line 848 of file it8951.cpp.

◆ clear()

void esphome::it8951::IT8951Display::clear ( )
inlineoverridevirtual

Reimplemented from esphome::display::Display.

Definition at line 198 of file it8951.h.

◆ compute_row_width_()

uint16_t esphome::it8951::IT8951Display::compute_row_width_ ( ) const
inlineprotected

Definition at line 225 of file it8951.h.

◆ draw_pixel_at()

void HOT esphome::it8951::IT8951Display::draw_pixel_at ( int x,
int y,
Color color )
overridevirtual

Implements esphome::display::Display.

Definition at line 929 of file it8951.cpp.

◆ draw_pixels_at()

void HOT esphome::it8951::IT8951Display::draw_pixels_at ( int x_start,
int y_start,
int w,
int h,
const uint8_t * ptr,
ColorOrder order,
ColorBitness bitness,
bool big_endian,
int x_offset,
int y_offset,
int x_pad )
overridevirtual

Reimplemented from esphome::display::Display.

Definition at line 958 of file it8951.cpp.

◆ dump_config()

void esphome::it8951::IT8951Display::dump_config ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 1057 of file it8951.cpp.

◆ enqueue_()

void esphome::it8951::IT8951Display::enqueue_ ( OpType type,
uint16_t a = 0,
uint16_t b = 0 )
protected

Definition at line 21 of file it8951.cpp.

◆ enqueue_init_dev_info_()

void esphome::it8951::IT8951Display::enqueue_init_dev_info_ ( )
protected

Definition at line 375 of file it8951.cpp.

◆ enqueue_init_reset_()

void esphome::it8951::IT8951Display::enqueue_init_reset_ ( )
protected

Definition at line 356 of file it8951.cpp.

◆ enqueue_init_temp_()

void esphome::it8951::IT8951Display::enqueue_init_temp_ ( )
protected

Definition at line 392 of file it8951.cpp.

◆ enqueue_init_vcom_()

void esphome::it8951::IT8951Display::enqueue_init_vcom_ ( )
protected

Definition at line 382 of file it8951.cpp.

◆ enqueue_update_refresh_()

void esphome::it8951::IT8951Display::enqueue_update_refresh_ ( )
protected

Definition at line 428 of file it8951.cpp.

◆ enqueue_update_sleep_()

void esphome::it8951::IT8951Display::enqueue_update_sleep_ ( )
protected

Definition at line 446 of file it8951.cpp.

◆ enqueue_update_transfer_()

void esphome::it8951::IT8951Display::enqueue_update_transfer_ ( )
protected

Definition at line 406 of file it8951.cpp.

◆ fill()

void esphome::it8951::IT8951Display::fill ( Color color)
overridevirtual

Reimplemented from esphome::display::Display.

Definition at line 906 of file it8951.cpp.

◆ get_display_type()

DisplayType esphome::it8951::IT8951Display::get_display_type ( )
inlineoverridevirtual

Implements esphome::display::Display.

Definition at line 196 of file it8951.h.

◆ get_height()

int esphome::it8951::IT8951Display::get_height ( )
inlineoverridevirtual

Reimplemented from esphome::display::Display.

Definition at line 206 of file it8951.h.

◆ get_height_internal()

int esphome::it8951::IT8951Display::get_height_internal ( )
inlineoverrideprotectedvirtual

Implements esphome::display::Display.

Definition at line 209 of file it8951.h.

◆ get_setup_priority()

float esphome::it8951::IT8951Display::get_setup_priority ( ) const
inlineoverridevirtual

Reimplemented from esphome::Component.

Definition at line 154 of file it8951.h.

◆ get_width()

int esphome::it8951::IT8951Display::get_width ( )
inlineoverridevirtual

Reimplemented from esphome::display::Display.

Definition at line 205 of file it8951.h.

◆ get_width_internal()

int esphome::it8951::IT8951Display::get_width_internal ( )
inlineoverrideprotectedvirtual

Implements esphome::display::Display.

Definition at line 210 of file it8951.h.

◆ is_busy_()

bool esphome::it8951::IT8951Display::is_busy_ ( ) const
protected

Definition at line 35 of file it8951.cpp.

◆ loop()

void esphome::it8951::IT8951Display::loop ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 40 of file it8951.cpp.

◆ on_safe_shutdown()

void esphome::it8951::IT8951Display::on_safe_shutdown ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 349 of file it8951.cpp.

◆ op_check_lut_idle_()

void esphome::it8951::IT8951Display::op_check_lut_idle_ ( )
protected

Definition at line 651 of file it8951.cpp.

◆ op_dpy_buf_args_()

void esphome::it8951::IT8951Display::op_dpy_buf_args_ ( )
protected

Definition at line 628 of file it8951.cpp.

◆ op_set_1bpp_()

void esphome::it8951::IT8951Display::op_set_1bpp_ ( )
protected

Definition at line 664 of file it8951.cpp.

◆ op_xfer_area_args_()

void esphome::it8951::IT8951Display::op_xfer_area_args_ ( )
protected

Definition at line 568 of file it8951.cpp.

◆ op_xfer_area_end_()

void esphome::it8951::IT8951Display::op_xfer_area_end_ ( )
protected

Definition at line 591 of file it8951.cpp.

◆ op_xfer_lisar_()

void esphome::it8951::IT8951Display::op_xfer_lisar_ ( )
protected

Definition at line 559 of file it8951.cpp.

◆ op_xfer_rows_()

bool esphome::it8951::IT8951Display::op_xfer_rows_ ( )
protected

Definition at line 593 of file it8951.cpp.

◆ prepare_update_region_()

bool esphome::it8951::IT8951Display::prepare_update_region_ ( UpdateMode & mode)
protected

Definition at line 677 of file it8951.cpp.

◆ prepend_()

void esphome::it8951::IT8951Display::prepend_ ( OpType type,
uint16_t a = 0,
uint16_t b = 0 )
protected

Definition at line 28 of file it8951.cpp.

◆ process_op_()

void esphome::it8951::IT8951Display::process_op_ ( const Op & op)
protected

Definition at line 81 of file it8951.cpp.

◆ recover_()

void esphome::it8951::IT8951Display::recover_ ( )
protected

Definition at line 791 of file it8951.cpp.

◆ reset_dirty_region_()

void esphome::it8951::IT8951Display::reset_dirty_region_ ( )
protected

Definition at line 747 of file it8951.cpp.

◆ rotate_coordinates_()

bool esphome::it8951::IT8951Display::rotate_coordinates_ ( int & x,
int & y )
protected

Definition at line 857 of file it8951.cpp.

◆ set_busy_pin()

void esphome::it8951::IT8951Display::set_busy_pin ( GPIOPin * pin)
inline

Definition at line 158 of file it8951.h.

◆ set_dithering()

void esphome::it8951::IT8951Display::set_dithering ( bool d)
inline

Definition at line 182 of file it8951.h.

◆ set_enable_pins()

void esphome::it8951::IT8951Display::set_enable_pins ( std::vector< GPIOPin * > pins)
inline

Definition at line 159 of file it8951.h.

◆ set_force_temperature()

void esphome::it8951::IT8951Display::set_force_temperature ( int16_t celsius)
inline

Definition at line 172 of file it8951.h.

◆ set_full_update_every()

void esphome::it8951::IT8951Display::set_full_update_every ( uint8_t n)
inline

Definition at line 161 of file it8951.h.

◆ set_gray_pixel_()

void esphome::it8951::IT8951Display::set_gray_pixel_ ( uint16_t x,
uint16_t y,
uint8_t nibble ) const
protected

Definition at line 1044 of file it8951.cpp.

◆ set_grayscale()

void esphome::it8951::IT8951Display::set_grayscale ( bool g)
inline

Definition at line 180 of file it8951.h.

◆ set_invert_colors()

void esphome::it8951::IT8951Display::set_invert_colors ( bool invert_colors)
inline

Definition at line 168 of file it8951.h.

◆ set_mono_pixel_()

void esphome::it8951::IT8951Display::set_mono_pixel_ ( uint16_t x,
uint16_t y,
bool value ) const
protected

Definition at line 1025 of file it8951.cpp.

◆ set_phase_()

void esphome::it8951::IT8951Display::set_phase_ ( Phase next)
protected

Definition at line 154 of file it8951.cpp.

◆ set_reset_duration()

void esphome::it8951::IT8951Display::set_reset_duration ( uint32_t ms)
inline

Definition at line 160 of file it8951.h.

◆ set_reset_pin()

void esphome::it8951::IT8951Display::set_reset_pin ( GPIOPin * pin)
inline

Definition at line 157 of file it8951.h.

◆ set_rotation()

void esphome::it8951::IT8951Display::set_rotation ( DisplayRotation rotation)
inlineoverridevirtual

Reimplemented from esphome::display::Display.

Definition at line 188 of file it8951.h.

◆ set_sleep_when_done()

void esphome::it8951::IT8951Display::set_sleep_when_done ( bool s)
inline

Definition at line 169 of file it8951.h.

◆ set_transform()

void esphome::it8951::IT8951Display::set_transform ( uint8_t t)
inline

Definition at line 184 of file it8951.h.

◆ set_update_mode()

void esphome::it8951::IT8951Display::set_update_mode ( uint16_t m)
inline

Definition at line 183 of file it8951.h.

◆ set_use_legacy_dpy_area()

void esphome::it8951::IT8951Display::set_use_legacy_dpy_area ( bool use)
inline

Definition at line 176 of file it8951.h.

◆ set_vcom()

void esphome::it8951::IT8951Display::set_vcom ( uint16_t vcom_mv)
inline

Definition at line 170 of file it8951.h.

◆ set_vcom_register()

void esphome::it8951::IT8951Display::set_vcom_register ( uint16_t selector)
inline

Definition at line 171 of file it8951.h.

◆ setup()

void esphome::it8951::IT8951Display::setup ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 301 of file it8951.cpp.

◆ spi_cmd_()

void esphome::it8951::IT8951Display::spi_cmd_ ( uint16_t cmd)
protected

Definition at line 485 of file it8951.cpp.

◆ spi_read_dev_info_()

void esphome::it8951::IT8951Display::spi_read_dev_info_ ( )
protected

Definition at line 538 of file it8951.cpp.

◆ spi_read_word_()

uint16_t esphome::it8951::IT8951Display::spi_read_word_ ( )
protected

Definition at line 522 of file it8951.cpp.

◆ spi_write_args_()

void esphome::it8951::IT8951Display::spi_write_args_ ( const uint16_t * args,
uint16_t count )
protected

Definition at line 512 of file it8951.cpp.

◆ spi_write_reg_()

void esphome::it8951::IT8951Display::spi_write_reg_ ( uint16_t addr,
uint16_t value )
protected

Definition at line 501 of file it8951.cpp.

◆ spi_write_word_()

void esphome::it8951::IT8951Display::spi_write_word_ ( uint16_t value)
protected

Definition at line 493 of file it8951.cpp.

◆ start_update_()

void esphome::it8951::IT8951Display::start_update_ ( UpdateMode mode)
protected

Definition at line 754 of file it8951.cpp.

◆ update()

void esphome::it8951::IT8951Display::update ( )
overridevirtual

Implements esphome::PollingComponent.

Definition at line 769 of file it8951.cpp.

◆ update_effective_transform_()

void esphome::it8951::IT8951Display::update_effective_transform_ ( )
protected

Definition at line 831 of file it8951.cpp.

◆ update_mode()

void esphome::it8951::IT8951Display::update_mode ( UpdateMode mode)

Definition at line 779 of file it8951.cpp.

◆ write_pixel_native_()

void HOT esphome::it8951::IT8951Display::write_pixel_native_ ( uint16_t x,
uint16_t y,
const Color & color ) const
protected

Definition at line 938 of file it8951.cpp.

Field Documentation

◆ active_mode_

UpdateMode esphome::it8951::IT8951Display::active_mode_ {UPDATE_MODE_NONE}
protected

Definition at line 290 of file it8951.h.

◆ area_h_

uint16_t esphome::it8951::IT8951Display::area_h_ {0}
protected

Definition at line 291 of file it8951.h.

◆ area_w_

uint16_t esphome::it8951::IT8951Display::area_w_ {0}
protected

Definition at line 291 of file it8951.h.

◆ area_x_

uint16_t esphome::it8951::IT8951Display::area_x_ {0}
protected

Definition at line 291 of file it8951.h.

◆ area_y_

uint16_t esphome::it8951::IT8951Display::area_y_ {0}
protected

Definition at line 291 of file it8951.h.

◆ asleep_

bool esphome::it8951::IT8951Display::asleep_ {false}
protected

Definition at line 296 of file it8951.h.

◆ buffer_

uint8_t* esphome::it8951::IT8951Display::buffer_ {}
protected

Definition at line 314 of file it8951.h.

◆ buffer_length_

size_t esphome::it8951::IT8951Display::buffer_length_ {}
protected

Definition at line 313 of file it8951.h.

◆ busy_pin_

GPIOPin* esphome::it8951::IT8951Display::busy_pin_ {nullptr}
protected

Definition at line 333 of file it8951.h.

◆ BUSY_TIMEOUT_MS

uint32_t esphome::it8951::IT8951Display::BUSY_TIMEOUT_MS = 5000
staticconstexprprotected

Definition at line 277 of file it8951.h.

◆ configured_data_rate_

uint32_t esphome::it8951::IT8951Display::configured_data_rate_ {0}
protected

Definition at line 341 of file it8951.h.

◆ default_update_mode_

UpdateMode esphome::it8951::IT8951Display::default_update_mode_ {UPDATE_MODE_NONE}
protected

Definition at line 331 of file it8951.h.

◆ delay_until_

uint32_t esphome::it8951::IT8951Display::delay_until_ {0}
protected

Definition at line 281 of file it8951.h.

◆ dev_info_

DevInfo esphome::it8951::IT8951Display::dev_info_ {}
protected

Definition at line 304 of file it8951.h.

◆ dev_info_attempts_

uint8_t esphome::it8951::IT8951Display::dev_info_attempts_ {0}
protected

Definition at line 350 of file it8951.h.

◆ dithering_

bool esphome::it8951::IT8951Display::dithering_ {true}
protected

Definition at line 330 of file it8951.h.

◆ effective_transform_

uint8_t esphome::it8951::IT8951Display::effective_transform_ {0}
protected

Definition at line 316 of file it8951.h.

◆ enable_pins_

std::vector<GPIOPin *> esphome::it8951::IT8951Display::enable_pins_
protected

Definition at line 335 of file it8951.h.

◆ force_temperature_

int16_t esphome::it8951::IT8951Display::force_temperature_ {DEFAULT_FORCE_TEMP_C}
protected

Definition at line 321 of file it8951.h.

◆ force_temperature_set_

bool esphome::it8951::IT8951Display::force_temperature_set_ {false}
protected

Definition at line 322 of file it8951.h.

◆ full_update_every_

uint8_t esphome::it8951::IT8951Display::full_update_every_ {1}
protected

Definition at line 317 of file it8951.h.

◆ grayscale_

bool esphome::it8951::IT8951Display::grayscale_ {true}
protected

Definition at line 328 of file it8951.h.

◆ height_

uint16_t esphome::it8951::IT8951Display::height_
protected

Definition at line 311 of file it8951.h.

◆ high_freq_

HighFrequencyLoopRequester esphome::it8951::IT8951Display::high_freq_
protected

Definition at line 285 of file it8951.h.

◆ img_buf_addr_h_

uint16_t esphome::it8951::IT8951Display::img_buf_addr_h_ {0}
protected

Definition at line 306 of file it8951.h.

◆ img_buf_addr_l_

uint16_t esphome::it8951::IT8951Display::img_buf_addr_l_ {0}
protected

Definition at line 305 of file it8951.h.

◆ initialised_

bool esphome::it8951::IT8951Display::initialised_ {false}
protected

Definition at line 293 of file it8951.h.

◆ invert_colors_

bool esphome::it8951::IT8951Display::invert_colors_ {false}
protected

Definition at line 324 of file it8951.h.

◆ name_

const char* esphome::it8951::IT8951Display::name_
protected

Definition at line 309 of file it8951.h.

◆ partial_update_count_

uint32_t esphome::it8951::IT8951Display::partial_update_count_ {0}
protected

Definition at line 297 of file it8951.h.

◆ pending_update_mode_

UpdateMode esphome::it8951::IT8951Display::pending_update_mode_ {UPDATE_MODE_NONE}
protected

Definition at line 289 of file it8951.h.

◆ phase_

Phase esphome::it8951::IT8951Display::phase_ {Phase::IDLE}
protected

Definition at line 280 of file it8951.h.

◆ phase_started_at_

uint32_t esphome::it8951::IT8951Display::phase_started_at_ {0}
protected

Definition at line 282 of file it8951.h.

◆ queue_

StaticOpQueue<Op, OP_QUEUE_SIZE> esphome::it8951::IT8951Display::queue_
protected

Definition at line 279 of file it8951.h.

◆ read_result_

uint16_t esphome::it8951::IT8951Display::read_result_ {0}
protected

Definition at line 301 of file it8951.h.

◆ recovery_attempts_

uint8_t esphome::it8951::IT8951Display::recovery_attempts_ {0}
protected

Definition at line 345 of file it8951.h.

◆ reset_duration_

uint32_t esphome::it8951::IT8951Display::reset_duration_ {10}
protected

Definition at line 318 of file it8951.h.

◆ reset_pin_

GPIOPin* esphome::it8951::IT8951Display::reset_pin_ {nullptr}
protected

Definition at line 332 of file it8951.h.

◆ row_width_

uint16_t esphome::it8951::IT8951Display::row_width_
protected

Definition at line 312 of file it8951.h.

◆ sleep_when_done_

bool esphome::it8951::IT8951Display::sleep_when_done_ {false}
protected

Definition at line 325 of file it8951.h.

◆ transfer_row_

uint16_t esphome::it8951::IT8951Display::transfer_row_ {0}
protected

Definition at line 292 of file it8951.h.

◆ transform_

uint8_t esphome::it8951::IT8951Display::transform_ {0}
protected

Definition at line 315 of file it8951.h.

◆ update_pending_

bool esphome::it8951::IT8951Display::update_pending_ {false}
protected

Definition at line 288 of file it8951.h.

◆ update_started_at_

uint32_t esphome::it8951::IT8951Display::update_started_at_ {0}
protected

Definition at line 298 of file it8951.h.

◆ use_legacy_dpy_area_

bool esphome::it8951::IT8951Display::use_legacy_dpy_area_ {false}
protected

Definition at line 323 of file it8951.h.

◆ vcom_

uint16_t esphome::it8951::IT8951Display::vcom_ {2300}
protected

Definition at line 319 of file it8951.h.

◆ vcom_register_

uint16_t esphome::it8951::IT8951Display::vcom_register_ {I80_CMD_VCOM_WRITE}
protected

Definition at line 320 of file it8951.h.

◆ width_

uint16_t esphome::it8951::IT8951Display::width_
protected

Definition at line 310 of file it8951.h.

◆ x_high_

uint16_t esphome::it8951::IT8951Display::x_high_ {0}
protected

Definition at line 338 of file it8951.h.

◆ x_low_

uint16_t esphome::it8951::IT8951Display::x_low_ {0}
protected

Definition at line 338 of file it8951.h.

◆ y_high_

uint16_t esphome::it8951::IT8951Display::y_high_ {0}
protected

Definition at line 338 of file it8951.h.

◆ y_low_

uint16_t esphome::it8951::IT8951Display::y_low_ {0}
protected

Definition at line 338 of file it8951.h.


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