13#include "pico/stdlib.h"
24#define ST7735_144_128x128_column_offset 2
26#define ST7735_144_128x128_row_offset_0_90 1
28#define ST7735_144_128x128_row_offset_180_270 3
30#define ST7735_177_160x128_column_offset 0
32#define ST7735_177_160x128_row_offset 0
135 void send_buffer(uint8_t *buffer,
size_t buffer_len);
176 virtual void show(
Canvas *canvas,
const uint8_t anchor_x,
const uint8_t anchor_y);
199 void show(
Canvas *canvas,
const uint8_t anchor_x,
const uint8_t anchor_y);
CanvasFormat
the format of the canvas
Definition canvas.h:61
ColorIndex
define the code value for color
Definition canvas.h:27
The canvas is a virtual memory in which the widget draws.
Definition canvas.h:129
GraphicDisplayDevice(size_t screen_width, size_t screen_height)
Construct a new Display Device object.
Definition display_device.cpp:14
this is a C++ wrapper for the original pico SDK spi master API
Definition hw_spi.h:50
uint8_t TFT_panel_start_y
the y starting position of the TFT panel within the ST7735 memory
Definition st7735.h:99
uint hw_reset_pin
the GPIO connected to the hardware reset input
Definition st7735.h:91
void send_cmd_list(uint8_t *cmd, size_t len)
send a list of command to the ST7735 device
Definition st7735.cpp:333
void hardware_reset()
hardware reset of the ST7735 device
Definition st7735.cpp:20
void config_gamma()
column row address set CASET , [0x00,0x01,0x00, width-1] RASET , [0x00,0x01,0x00, height-1] we start ...
Definition st7735.cpp:289
void check_display_device_compatibility(struct_ConfigGraphicWidget framebuffer_cfg, CanvasFormat canvas_format)
A pure virtual member function. Each device must implement this method and check the compatibility of...
Definition st7735.cpp:467
void set_backlight(bool on)
set the backlight of the display
Definition st7735.cpp:441
void set_display_OFF()
Set the display OFF object.
Definition st7735.cpp:429
uint8_t TFT_panel_start_x
the x starting position of the TFT panel within the ST7735 memory
Definition st7735.h:97
void send_cmd(uint8_t cmd)
send a command to the ST7735 device
Definition st7735.cpp:326
HW_SPI_Master * spi
SPI driver associated with the display.
Definition st7735.h:85
void set_RAM_write_addresses(uint8_t start_x, uint8_t start_y, size_t width, size_t height)
set the RAM write addresses for the display
Definition st7735.cpp:452
void set_normal_mode()
_set display normal ON NORON , sleep 10ms
Definition st7735.cpp:301
uint8_t ST7735_device_column_offset
the column offset for the ST7735 device
Definition st7735.h:93
void send_buffer(uint8_t *buffer, size_t buffer_len)
send a buffer of data to the ST7735 device
Definition st7735.cpp:342
virtual 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:476
virtual 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:499
void init_pins()
initialize pins for the ST7735 device
Definition st7735.cpp:28
void set_rotation_and_color(struct_ConfigST7735 device_config)
set the actual position of the display
Definition st7735.cpp:139
bool rgb_order
a flag that indicates if the color order is RGB (true) or BGR (false)
Definition st7735.h:101
uint8_t ST7735_device_row_offset
the row offset for the ST7735 device
Definition st7735.h:95
void set_display_ON()
Set the display ON object.
Definition st7735.cpp:423
void soft_reset()
perform a software reset of the display
Definition st7735.cpp:446
void config_power_control()
config power control
Definition st7735.cpp:103
void config_device_specific_size_and_offsets(struct_ConfigST7735 device_config)
config specific device size and offsets
Definition st7735.cpp:375
void enable_command_pin(bool enable)
enable or disable the command mode (DC pin low or high)
Definition st7735.cpp:15
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
uint backlight_pin
the GPIO connected to the backlight input
Definition st7735.h:89
void device_wakeup()
wake up the device from sleep mode
Definition st7735.cpp:50
void config_inversion_control()
config display inversion control
Definition st7735.cpp:88
uint dc_pin
the GPIO connected to the Data/Command_ input
Definition st7735.h:87
void config_frame_rate_control()
config framerate control
Definition st7735.cpp:66
This is a C++ wrapper for the original pico SDK spi master API, adapted to FreeRTOS environment.
Definition rtos_hw_spi.h:38
void clear_device_screen_buffer()
Clear the device screen buffer.
Definition st7735.cpp:633
rtos_ST7735(rtos_HW_SPI_Master *spi, struct_ConfigST7735 device_config)
Construct a new rtos_ST7735 object.
Definition st7735.cpp:573
void show_from_display_queue(struct_WidgetDataToGateKeeper data_to_show)
Show data from the display queue.
Definition st7735.cpp:582
void check_rtos_display_device_compatibility(struct_ConfigGraphicWidget framebuffer_cfg, CanvasFormat canvas_format)
Check the compatibility of the framebuffer configuration with the display device physical limitations...
Definition st7735.cpp:657
void show_widget(rtos_Widget *widget)
Show the widget on the display device.
Definition st7735.cpp:587
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:592
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:45
@ _180
rotate 180° clockwise
Definition st7735.h:52
@ _90
rotate 90° clockwise
Definition st7735.h:50
@ _0
no rotation applied
Definition st7735.h:48
@ _270
rotate 270° clockwise
Definition st7735.h:54
ST7735DisplayType
tag used to ru the correct init code
Definition st7735.h:36
@ ST7735_177_160_RGB_128_GREENTAB
LCD TFT 1"77 160(RGB)x128 green_tab configuration.
Definition st7735.h:40
@ ST7735_144_128_RGB_128_GREENTAB
LCD TFT 1"44 128(RGB)x128 green_tab configuration.
Definition st7735.h:38
data used to configure the display device
Definition st7735.h:59
ST7735Rotation rotation
indicates which rotation will be applied
Definition st7735.h:70
uint dc_pin
indicates the GPIO connected to the Data/Command_ input
Definition st7735.h:68
uint hw_reset_pin
indicates the GPIO connected to the hardware reset input
Definition st7735.h:66
ST7735DisplayType display_type
indicates which type of TFT panel must be configured
Definition st7735.h:62
uint backlight_pin
indicates the GPIO connected to the backlight input
Definition st7735.h:64