ESPHome 2026.4.0
Loading...
Searching...
No Matches
mipi_spi.cpp
Go to the documentation of this file.
1#include "mipi_spi.h"
2#include "esphome/core/log.h"
3
5
6void internal_dump_config(const char *model, int width, int height, int offset_width, int offset_height, uint8_t madctl,
7 bool invert_colors, int display_bits, bool is_big_endian, const optional<uint8_t> &brightness,
8 GPIOPin *cs, GPIOPin *reset, GPIOPin *dc, int spi_mode, uint32_t data_rate, int bus_width,
9 bool has_hardware_rotation) {
10 ESP_LOGCONFIG(TAG,
11 "MIPI_SPI Display\n"
12 " Model: %s\n"
13 " Width: %d\n"
14 " Height: %d\n"
15 " Swap X/Y: %s\n"
16 " Mirror X: %s\n"
17 " Mirror Y: %s\n"
18 " Hardware rotation: %s\n"
19 " Invert colors: %s\n"
20 " Color order: %s\n"
21 " Display pixels: %d bits\n"
22 " Endianness: %s\n"
23 " SPI Mode: %d\n"
24 " SPI Data rate: %uMHz\n"
25 " SPI Bus width: %d",
26 model, width, height, YESNO(madctl & MADCTL_MV), YESNO(madctl & (MADCTL_MX | MADCTL_XFLIP)),
27 YESNO(madctl & (MADCTL_MY | MADCTL_YFLIP)), YESNO(has_hardware_rotation), YESNO(invert_colors),
28 (madctl & MADCTL_BGR) ? "BGR" : "RGB", display_bits, is_big_endian ? "Big" : "Little", spi_mode,
29 static_cast<unsigned>(data_rate / 1000000), bus_width);
30 LOG_PIN(" CS Pin: ", cs);
31 LOG_PIN(" Reset Pin: ", reset);
32 LOG_PIN(" DC Pin: ", dc);
33 if (offset_width != 0)
34 ESP_LOGCONFIG(TAG, " Offset width: %d", offset_width);
35 if (offset_height != 0)
36 ESP_LOGCONFIG(TAG, " Offset height: %d", offset_height);
37 if (brightness.has_value())
38 ESP_LOGCONFIG(TAG, " Brightness: %u", brightness.value());
39}
40
41} // namespace esphome::mipi_spi
uint16_t reset
Definition ina226.h:5
void internal_dump_config(const char *model, int width, int height, int offset_width, int offset_height, uint8_t madctl, bool invert_colors, int display_bits, bool is_big_endian, const optional< uint8_t > &brightness, GPIOPin *cs, GPIOPin *reset, GPIOPin *dc, int spi_mode, uint32_t data_rate, int bus_width, bool has_hardware_rotation)
Definition mipi_spi.cpp:6
static void uint32_t