13#include "pico/stdlib.h"
23#define ST7735_144_128x128_column_offset 2
25#define ST7735_144_128x128_row_offset_0_90 1
27#define ST7735_144_128x128_row_offset_180_270 3
29#define ST7735_177_160x128_column_offset 0
31#define ST7735_177_160x128_row_offset 0
87 uint8_t ST7735_device_column_offset{0};
88 uint8_t ST7735_device_row_offset{0};
89 uint8_t TFT_panel_start_x{0};
90 uint8_t TFT_panel_start_y{0};
93 void enable_command_pin(
bool enable);
94 void hardware_reset();
97 void config_frame_rate_control();
98 void config_inversion_control();
99 void config_power_control();
102 void set_normal_mode();
105 void send_cmd(uint8_t cmd);
106 void send_cmd_list(uint8_t *cmd,
size_t len);
107 void send_buffer(uint8_t *buffer,
size_t buffer_len);
108 void set_backlight(
bool on);
111 void set_RAM_write_addresses(uint8_t start_x, uint8_t start_y,
size_t width,
size_t height);
140 void show(
Canvas *canvas,
const uint8_t anchor_x,
const uint8_t anchor_y);
ColorIndex
define the code value for color
Definition canvas.h:26
The canvas is a virtual memory in which the widget draws.
Definition canvas.h:121
GraphicDisplayDevice(size_t screen_width, size_t screen_height)
Construct a new Display Device object.
Definition display_device.cpp:4
this is a C++ wrapper for the original pico SDK spi master API
Definition hw_spi.h:48
void set_display_OFF()
Set the display OFF object.
Definition st7735.cpp:429
void check_display_device_compatibility(struct_ConfigGraphicWidget framebuffer_cfg)
A pure virtual member function. Each device must implement this method and check the compatibility of...
Definition st7735.cpp:467
void clear_device_screen_buffer(ColorIndex color_index=ColorIndex::BLACK)
fill the internal ST7735 screen buffer with the given color. Default to BLACK, clear the internal buf...
Definition st7735.cpp:474
void show(Canvas *canvas, const uint8_t anchor_x, const uint8_t anchor_y)
A pure virtual member function. It transfers the pixel buffer to the a part of display screen buffer ...
Definition st7735.cpp:497
void set_rotation_and_color(struct_ConfigST7735 device_config)
set the actual position of the display
Definition st7735.cpp:139
void set_display_ON()
Set the display ON object.
Definition st7735.cpp:423
void enable_sleep(bool enable)
turn the display in sleep mode on/off
Definition st7735.cpp:435
ST7735(HW_SPI_Master *spi, struct_ConfigST7735 device_config)
Construct a new ST7735 object.
Definition st7735.cpp:348
These commands are those for either the ST7735 TFT 1.44" 128x128 pixels or the ST7735 TFT 1....
ST7735Rotation
code indicates rotation of the display (Portrait, paysage, upside-down)
Definition st7735.h:44
@ _180
rotate 180° clockwise
Definition st7735.h:51
@ _90
rotate 90° clockwise
Definition st7735.h:49
@ _0
no rotation applied
Definition st7735.h:47
@ _270
rotate 270° clockwise
Definition st7735.h:53
ST7735DisplayType
tag used to ru the correct init code
Definition st7735.h:35
@ ST7735_177_160_RGB_128_GREENTAB
LCD TFT 1"77 160(RGB)x128 green_tab configuration.
Definition st7735.h:39
@ ST7735_144_128_RGB_128_GREENTAB
LCD TFT 1"44 128(RGB)x128 green_tab configuration.
Definition st7735.h:37
data used to configure the display device
Definition st7735.h:58
ST7735Rotation rotation
indicates which rotation will be applied
Definition st7735.h:69
uint dc_pin
indicates the GPIO connected to the Data/Command_ input
Definition st7735.h:67
uint hw_reset_pin
indicates the GPIO connected to the hardware reset input
Definition st7735.h:65
ST7735DisplayType display_type
indicates which type of TFT panel must be configured
Definition st7735.h:61
uint backlight_pin
indicates the GPIO connected to the backlight input
Definition st7735.h:63