C++ DevKit
C++ set of OOP library
Loading...
Searching...
No Matches
ST7735 Class Reference

ST7735 driven TFT color display device. More...

#include <st7735.h>

Inheritance diagram for ST7735:
Inheritance graph
Collaboration diagram for ST7735:
Collaboration graph

Public Member Functions

 ST7735 (HW_SPI_Master *spi, struct_ConfigST7735 device_config)
 Construct a new ST7735 object.
 
void set_rotation_and_color (struct_ConfigST7735 device_config)
 set the actual position of the display
 
void set_display_ON ()
 Set the display ON object.
 
void set_display_OFF ()
 Set the display OFF object.
 
void enable_sleep (bool enable)
 turn the display in sleep mode on/off
 
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 the widget parameter with the its physical limitations.
 
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 buffer
 
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 starting at the (anchor_x, anchor_y) coordinates of the screen , expressed in pixel. This method takes into account the specific addressing scheme and memory structure of the actual display device.
 
- Public Member Functions inherited from GraphicDisplayDevice
 GraphicDisplayDevice (size_t screen_width, size_t screen_height)
 Construct a new Display Device object.
 
virtual ~GraphicDisplayDevice ()
 Destroy the Display Device object.
 

Additional Inherited Members

- Public Attributes inherited from GraphicDisplayDevice
size_t TFT_panel_width_in_pixel
 the physical width of the screen (in pixel)
 
size_t TFT_panel_height_in_pixel
 the physical height of the screen (in pixel)
 

Detailed Description

ST7735 driven TFT color display device.

Constructor & Destructor Documentation

◆ ST7735()

ST7735::ST7735 ( HW_SPI_Master * spi,
struct_ConfigST7735 device_config )

Construct a new ST7735 object.

Parameters
spithe SPI associated driver
device_configthe device configuration file
Here is the call graph for this function:

Member Function Documentation

◆ check_display_device_compatibility()

void ST7735::check_display_device_compatibility ( struct_ConfigGraphicWidget framebuffer_cfg)
virtual

A pure virtual member function. Each device must implement this method and check the compatibility of the widget parameter with the its physical limitations.

Parameters
framebuffer_cfgthe widget configuration data

Implements GraphicDisplayDevice.

◆ clear_device_screen_buffer()

void ST7735::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 buffer

Parameters
color_index
Here is the call graph for this function:

◆ enable_sleep()

void ST7735::enable_sleep ( bool enable)

turn the display in sleep mode on/off

Parameters
enable

◆ set_rotation_and_color()

void ST7735::set_rotation_and_color ( struct_ConfigST7735 device_config)

set the actual position of the display

set rotation and color

Parameters
device_configthe device configuration file
Here is the caller graph for this function:

◆ show()

void ST7735::show ( Canvas * canvas,
const uint8_t anchor_x,
const uint8_t anchor_y )
virtual

A pure virtual member function. It transfers the pixel buffer to the a part of display screen buffer starting at the (anchor_x, anchor_y) coordinates of the screen , expressed in pixel. This method takes into account the specific addressing scheme and memory structure of the actual display device.

Parameters
canvasa pointer to the canvas that contains the buffer to be displayed
anchor_xthe x(horizontal) starting position of the frame within the display screen,(in pixel)
anchor_ythe y(vertical) starting position of the frame within the display screen,(in pixel)

Implements GraphicDisplayDevice.


The documentation for this class was generated from the following files: