ESPHome 2025.8.0b2
Loading...
Searching...
No Matches
esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT > Class Template Reference

Base class for MIPI SPI displays. More...

#include <mipi_spi.h>

Inheritance diagram for esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >:
esphome::display::Display esphome::spi::SPIDevice< spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_LEADING, spi::DATA_RATE_1MHZ > esphome::PollingComponent esphome::spi::SPIClient esphome::Component esphome::mipi_spi::MipiSpiBuffer< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT, ROTATION, FRACTION >

Public Member Functions

 MipiSpi ()
 
void update () override
 
void draw_pixel_at (int x, int y, Color color) override
 
void set_model (const char *model)
 
void set_reset_pin (GPIOPin *reset_pin)
 
void set_enable_pins (std::vector< GPIOPin * > enable_pins)
 
void set_dc_pin (GPIOPin *dc_pin)
 
void set_invert_colors (bool invert_colors)
 
void set_brightness (uint8_t brightness)
 
display::DisplayType get_display_type () override
 
int get_width_internal () override
 
int get_height_internal () override
 
void set_init_sequence (const std::vector< uint8_t > &sequence)
 
void set_draw_rounding (unsigned rounding)
 
void setup () override
 
void draw_pixels_at (int x_start, int y_start, int w, int h, const uint8_t *ptr, display::ColorOrder order, display::ColorBitness bitness, bool big_endian, int x_offset, int y_offset, int x_pad) override
 
void dump_config () override
 
- Public Member Functions inherited from esphome::display::Display
virtual void fill (Color color)
 Fill the entire screen with the given color.
 
void clear ()
 Clear the entire screen by filling it with OFF pixels.
 
virtual int get_width ()
 Get the calculated width of the display in pixels with rotation applied.
 
virtual int get_height ()
 Get the calculated height of the display in pixels with rotation applied.
 
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_rotation (DisplayRotation rotation)
 Internal method to set the display rotation with.
 
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.
 
virtual 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
virtual void loop ()
 This method will be called repeatedly.
 
virtual float get_setup_priority () const
 priority of setup().
 
float get_actual_setup_priority () const
 
void set_setup_priority (float priority)
 
virtual float get_loop_priority () const
 priority of loop().
 
void call ()
 
virtual void on_shutdown ()
 
virtual void on_safe_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.
 
virtual void mark_failed ()
 Mark this component as failed.
 
void mark_failed (const char *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 (const char *message=nullptr)
 
void status_set_error (const char *message=nullptr)
 
void status_clear_warning ()
 
void status_clear_error ()
 
void status_momentary_warning (const std::string &name, uint32_t length=5000)
 
void status_momentary_error (const std::string &name, uint32_t length=5000)
 
bool has_overridden_loop () const
 
void set_component_source (const char *source)
 Set where this component was loaded from for some debug messages.
 
const char * get_component_source () const
 Get the integration where this component was declared as a string.
 
bool should_warn_of_blocking (uint32_t blocking_time)
 
- Public Member Functions inherited from esphome::spi::SPIDevice< spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_LEADING, spi::DATA_RATE_1MHZ >
 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

void write_command_ (uint8_t cmd, uint8_t data)
 
void write_command_ (uint8_t cmd)
 
void write_command_ (uint8_t cmd, const uint8_t *bytes, size_t len)
 
void reset_params_ ()
 
void set_addr_window_ (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
 
void write_display_data_ (const uint8_t *ptr, size_t w, size_t h, size_t pad)
 Writes a buffer to the display.
 
void write_to_display_ (int x_start, int y_start, int w, int h, const BUFFERTYPE *ptr, int x_offset, int y_offset, int x_pad)
 Writes a buffer to the display.
 
- 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
virtual void call_loop ()
 
virtual void call_dump_config ()
 
void set_component_state_ (uint8_t state)
 Helper to set component state (clears state bits and sets new state)
 
void set_interval (const std::string &name, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a unique name.
 
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 interval, std::function< void()> &&f)
 
bool cancel_interval (const std::string &name)
 Cancel an interval function.
 
bool cancel_interval (const char *name)
 
void set_retry (const std::string &name, uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult(uint8_t)> &&f, float backoff_increase_factor=1.0f)
 Set an retry function with a unique name.
 
void set_retry (uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult(uint8_t)> &&f, float backoff_increase_factor=1.0f)
 
bool cancel_retry (const std::string &name)
 Cancel a retry function.
 
void set_timeout (const std::string &name, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a unique name.
 
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 timeout, std::function< void()> &&f)
 
bool cancel_timeout (const std::string &name)
 Cancel a timeout function.
 
bool cancel_timeout (const char *name)
 
void defer (const std::string &name, std::function< void()> &&f)
 Defer a callback to the next loop() call.
 
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.
 
bool cancel_defer (const std::string &name)
 Cancel a defer callback using the specified name, name must not be empty.
 

Static Protected Member Functions

static PixelMode get_pixel_mode (display::ColorBitness bitness)
 

Protected Attributes

GPIOPinreset_pin_ {nullptr}
 
std::vector< GPIOPin * > enable_pins_ {}
 
GPIOPindc_pin_ {nullptr}
 
bool invert_colors_ {}
 
unsigned draw_rounding_ {2}
 
optional< uint8_t > brightness_ {}
 
const char * model_ {"Unknown"}
 
std::vector< uint8_t > init_sequence_ {}
 
uint8_t madctl_ {}
 
- Protected Attributes inherited from esphome::display::Display
DisplayRotation rotation_ {DISPLAY_ROTATION_0_DEGREES}
 
optional< display_writer_twriter_ {}
 
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
const char * component_source_ {nullptr}
 
uint16_t warn_if_blocking_over_ {WARN_IF_BLOCKING_OVER_MS}
 Warn if blocked for this many ms (max 65.5s)
 
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 Bits 5-7: Unused - reserved for future expansion.
 
volatile bool pending_enable_loop_ {false}
 ISR-safe flag for enable_loop_soon_any_context.
 
- 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}
 

Detailed Description

template<typename BUFFERTYPE, PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
class esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >

Base class for MIPI SPI displays.

All the methods are defined here in the header file, as it is not possible to define templated methods in a cpp file.

Template Parameters
BUFFERTYPEThe type of the buffer pixels, e.g. uint8_t or uint16_t
BUFFERPIXELColor depth of the buffer
DISPLAYPIXELColor depth of the display
BUS_TYPEThe type of the interface bus (single, quad, octal)
WIDTHWidth of the display in pixels
HEIGHTHeight of the display in pixels
OFFSET_WIDTHThe x-offset of the display in pixels
OFFSET_HEIGHTThe y-offset of the display in pixels buffer

Definition at line 78 of file mipi_spi.h.

Constructor & Destructor Documentation

◆ MipiSpi()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::MipiSpi ( )
inline

Definition at line 82 of file mipi_spi.h.

Member Function Documentation

◆ draw_pixel_at()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::draw_pixel_at ( int x,
int y,
Color color )
inlineoverridevirtual

◆ draw_pixels_at()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::draw_pixels_at ( int x_start,
int y_start,
int w,
int h,
const uint8_t * ptr,
display::ColorOrder order,
display::ColorBitness bitness,
bool big_endian,
int x_offset,
int y_offset,
int x_pad )
inlineoverridevirtual

Reimplemented from esphome::display::Display.

Definition at line 185 of file mipi_spi.h.

◆ dump_config()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::dump_config ( )
inlineoverridevirtual

◆ get_display_type()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
display::DisplayType esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::get_display_type ( )
inlineoverridevirtual

Implements esphome::display::Display.

Definition at line 97 of file mipi_spi.h.

◆ get_height_internal()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
int esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::get_height_internal ( )
inlineoverridevirtual

Implements esphome::display::Display.

Definition at line 100 of file mipi_spi.h.

◆ get_pixel_mode()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
static PixelMode esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::get_pixel_mode ( display::ColorBitness bitness)
inlinestaticprotected

Definition at line 316 of file mipi_spi.h.

◆ get_width_internal()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
int esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::get_width_internal ( )
inlineoverridevirtual

Implements esphome::display::Display.

Definition at line 99 of file mipi_spi.h.

◆ reset_params_()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::reset_params_ ( )
inlineprotected

Definition at line 288 of file mipi_spi.h.

◆ set_addr_window_()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::set_addr_window_ ( uint16_t x1,
uint16_t y1,
uint16_t x2,
uint16_t y2 )
inlineprotected

Definition at line 297 of file mipi_spi.h.

◆ set_brightness()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::set_brightness ( uint8_t brightness)
inline

Definition at line 93 of file mipi_spi.h.

◆ set_dc_pin()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::set_dc_pin ( GPIOPin * dc_pin)
inline

Definition at line 88 of file mipi_spi.h.

◆ set_draw_rounding()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::set_draw_rounding ( unsigned rounding)
inline

Definition at line 102 of file mipi_spi.h.

◆ set_enable_pins()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::set_enable_pins ( std::vector< GPIOPin * > enable_pins)
inline

Definition at line 87 of file mipi_spi.h.

◆ set_init_sequence()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::set_init_sequence ( const std::vector< uint8_t > & sequence)
inline

Definition at line 101 of file mipi_spi.h.

◆ set_invert_colors()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::set_invert_colors ( bool invert_colors)
inline

Definition at line 89 of file mipi_spi.h.

◆ set_model()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::set_model ( const char * model)
inline

Definition at line 85 of file mipi_spi.h.

◆ set_reset_pin()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::set_reset_pin ( GPIOPin * reset_pin)
inline

Definition at line 86 of file mipi_spi.h.

◆ setup()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::setup ( )
inlineoverridevirtual

◆ update()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::update ( )
inlineoverridevirtual

◆ write_command_() [1/3]

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::write_command_ ( uint8_t cmd)
inlineprotected

Definition at line 241 of file mipi_spi.h.

◆ write_command_() [2/3]

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::write_command_ ( uint8_t cmd,
const uint8_t * bytes,
size_t len )
inlineprotected

Definition at line 244 of file mipi_spi.h.

◆ write_command_() [3/3]

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::write_command_ ( uint8_t cmd,
uint8_t data )
inlineprotected

Definition at line 240 of file mipi_spi.h.

◆ write_display_data_()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::write_display_data_ ( const uint8_t * ptr,
size_t w,
size_t h,
size_t pad )
inlineprotected

Writes a buffer to the display.

Parameters
wWidth of each line in bytes
hHeight of the buffer in rows
padPadding in bytes after each line

Definition at line 333 of file mipi_spi.h.

◆ write_to_display_()

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
void esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::write_to_display_ ( int x_start,
int y_start,
int w,
int h,
const BUFFERTYPE * ptr,
int x_offset,
int y_offset,
int x_pad )
inlineprotected

Writes a buffer to the display.

The ptr is a pointer to the pixel data The other parameters are all in pixel units.

Definition at line 362 of file mipi_spi.h.

Field Documentation

◆ brightness_

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
optional<uint8_t> esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::brightness_ {}
protected

Definition at line 428 of file mipi_spi.h.

◆ dc_pin_

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
GPIOPin* esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::dc_pin_ {nullptr}
protected

Definition at line 423 of file mipi_spi.h.

◆ draw_rounding_

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
unsigned esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::draw_rounding_ {2}
protected

Definition at line 427 of file mipi_spi.h.

◆ enable_pins_

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
std::vector<GPIOPin *> esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::enable_pins_ {}
protected

Definition at line 422 of file mipi_spi.h.

◆ init_sequence_

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
std::vector<uint8_t> esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::init_sequence_ {}
protected

Definition at line 430 of file mipi_spi.h.

◆ invert_colors_

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
bool esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::invert_colors_ {}
protected

Definition at line 426 of file mipi_spi.h.

◆ madctl_

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
uint8_t esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::madctl_ {}
protected

Definition at line 431 of file mipi_spi.h.

◆ model_

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
const char* esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::model_ {"Unknown"}
protected

Definition at line 429 of file mipi_spi.h.

◆ reset_pin_

template<typename BUFFERTYPE , PixelMode BUFFERPIXEL, bool IS_BIG_ENDIAN, PixelMode DISPLAYPIXEL, BusType BUS_TYPE, int WIDTH, int HEIGHT, int OFFSET_WIDTH, int OFFSET_HEIGHT>
GPIOPin* esphome::mipi_spi::MipiSpi< BUFFERTYPE, BUFFERPIXEL, IS_BIG_ENDIAN, DISPLAYPIXEL, BUS_TYPE, WIDTH, HEIGHT, OFFSET_WIDTH, OFFSET_HEIGHT >::reset_pin_ {nullptr}
protected

Definition at line 421 of file mipi_spi.h.


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