11 static const char *
const TAG =
"ili9xxx";
27 public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW,
28 spi::CLOCK_PHASE_LEADING, spi::DATA_RATE_40MHZ> {
33 uint8_t
cmd, num_args, bits;
34 const uint8_t *addr = init_sequence;
35 while ((cmd = *addr++) != 0) {
37 if (num_args == ILI9XXX_DELAY_FLAG)
41 case ILI9XXX_MADCTL: {
42 this->
swap_xy_ = (bits & MADCTL_MV) != 0;
43 this->
mirror_x_ = (bits & MADCTL_MX) != 0;
44 this->
mirror_y_ = (bits & MADCTL_MY) != 0;
49 case ILI9XXX_PIXFMT: {
50 if ((bits & 0xF) == 6)
58 addr += (num_args & 0x7F);
77 virtual void command(uint8_t value);
78 virtual void data(uint8_t value);
79 void send_command(uint8_t command_byte,
const uint8_t *data_bytes, uint8_t num_data_bytes);
91 void setup()
override;
100 if (this->
buffer_ ==
nullptr) {
228 this->
command(ILI9XXX_DFUNCTR);
239 void data(uint8_t value)
override {
void send_command(uint8_t command_byte, const uint8_t *data_bytes, uint8_t num_data_bytes)
uint32_t get_buffer_length_()
void set_pixel_mode(PixelMode mode)
ILI9XXXILI9488(const uint8_t *seq=INITCMD_ILI9488)
void set_palette(const uint8_t *palette)
uint8_t const * init_sequence_
ILI9XXXDisplay(uint8_t const *init_sequence, int16_t width, int16_t height)
void set_addr_window_(uint16_t x, uint16_t y, uint16_t x2, uint16_t y2)
void set_mirror_x(bool mirror_x)
void set_mirror_y(bool mirror_y)
void data(uint8_t value) override
void write_byte(uint8_t data)
void set_buffer_color_mode(ILI9XXXColorMode color_mode)
int16_t width_
Display width as modified by current rotation.
The SPIDevice is what components using the SPI will create.
void draw_absolute_pixel_internal(int x, int y, Color color) override
int16_t height_
Display height as modified by current rotation.
int get_width_internal() override
ILI9XXXColorMode buffer_color_mode_
display::ColorOrder color_order_
void on_shutdown() override
void init_lcd_(const uint8_t *addr)
BedjetMode mode
BedJet operating mode.
int get_height_internal() override
float get_setup_priority() const override
void dump_config() override
void set_madctl() override
const size_t ILI9XXX_TRANSFER_BUFFER_SIZE
virtual void data(uint8_t value)
void set_dimensions(int16_t width, int16_t height)
display::DisplayType get_display_type() override
void add_init_sequence(const std::vector< uint8_t > &sequence)
void set_offsets(int16_t offset_x, int16_t offset_y)
virtual void set_madctl()
Implementation of SPI Controller mode.
std::vector< uint8_t > extra_init_sequence_
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 fill(Color color) override
void set_dc_pin(GPIOPin *dc_pin)
void set_reset_pin(GPIOPin *reset)
void set_color_order(display::ColorOrder color_order)
virtual void command(uint8_t value)
void set_swap_xy(bool swap_xy)
void invert_colors(bool invert)