ESPHome 2026.10.0-dev
Loading...
Searching...
No Matches
epaper_spi_spectra_e6.cpp
Go to the documentation of this file.
2#include "colorconv.h"
3
4#include "esphome/core/log.h"
5
6namespace esphome::epaper_spi {
7static constexpr const char *const TAG = "epaper_spi.6c";
8
9// Native hardware color codes for this panel's 4-bit color values.
10enum E6Color : uint8_t {
11 BLACK = 0,
12 WHITE = 1,
13 YELLOW = 2,
14 RED = 3,
15 BLUE = 5,
16 GREEN = 6,
17};
18
22
24 ESP_LOGV(TAG, "Power on");
25 this->command(0x04);
26}
27
29 ESP_LOGV(TAG, "Power off");
30 this->cmd_data(0x02, {0x00});
31}
32
34 ESP_LOGV(TAG, "Refresh");
35 this->cmd_data(0x12, {0x00});
36}
37
39 ESP_LOGV(TAG, "Deep sleep");
40 this->cmd_data(0x07, {0xA5});
41}
42} // namespace esphome::epaper_spi
void command(uint8_t value)
void cmd_data(uint8_t command, const uint8_t *ptr, size_t length)
uint8_t color_to_native(Color color) override
constexpr NATIVE_COLOR color_to_bwyrgb(Color color, NATIVE_COLOR hw_black, NATIVE_COLOR hw_white, NATIVE_COLOR hw_yellow, NATIVE_COLOR hw_red, NATIVE_COLOR hw_green, NATIVE_COLOR hw_blue)
Map RGB color to discrete BWYRGB hex 6 color key.
Definition colorconv.h:102