|
C++ DevKit
C++ set of OOP library
|
ST7735 driven TFT color display device. More...
#include <st7735.h>


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, CanvasFormat canvas_format) |
| A pure virtual member function. Each device must implement this method and check the compatibility of the widget parameter with the its physical limitations. | |
| 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 buffer | |
| 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 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. | |
Protected Member Functions | |
| void | enable_command_pin (bool enable) |
| enable or disable the command mode (DC pin low or high) | |
| void | hardware_reset () |
| hardware reset of the ST7735 device | |
| void | init_pins () |
| initialize pins for the ST7735 device | |
| void | device_wakeup () |
| wake up the device from sleep mode | |
| void | config_frame_rate_control () |
| config framerate control | |
| void | config_inversion_control () |
| config display inversion control | |
| void | config_power_control () |
| config power control | |
| void | config_gamma () |
| column row address set CASET , [0x00,0x01,0x00, width-1] RASET , [0x00,0x01,0x00, height-1] we start column 1 | |
| void | set_normal_mode () |
| _set display normal ON NORON , sleep 10ms | |
| void | config_device_specific_size_and_offsets (struct_ConfigST7735 device_config) |
| config specific device size and offsets | |
| void | send_cmd (uint8_t cmd) |
| send a command to the ST7735 device | |
| void | send_cmd_list (uint8_t *cmd, size_t len) |
| send a list of command to the ST7735 device | |
| void | send_buffer (uint8_t *buffer, size_t buffer_len) |
| send a buffer of data to the ST7735 device | |
| void | set_backlight (bool on) |
| set the backlight of the display | |
| void | soft_reset () |
| perform a software reset of the display | |
| 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 | |
Protected Attributes | |
| HW_SPI_Master * | spi |
| SPI driver associated with the display. | |
| uint | dc_pin |
| the GPIO connected to the Data/Command_ input | |
| uint | backlight_pin |
| the GPIO connected to the backlight input | |
| uint | hw_reset_pin |
| the GPIO connected to the hardware reset input | |
| uint8_t | ST7735_device_column_offset {0} |
| the column offset for the ST7735 device | |
| uint8_t | ST7735_device_row_offset {0} |
| the row offset for the ST7735 device | |
| uint8_t | TFT_panel_start_x {0} |
| the x starting position of the TFT panel within the ST7735 memory | |
| uint8_t | TFT_panel_start_y {0} |
| the y starting position of the TFT panel within the ST7735 memory | |
| bool | rgb_order |
| a flag that indicates if the color order is RGB (true) or BGR (false) | |
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) | |
ST7735 driven TFT color display device.
| ST7735::ST7735 | ( | HW_SPI_Master * | spi, |
| struct_ConfigST7735 | device_config ) |
Construct a new ST7735 object.
| spi | the SPI associated driver |
| device_config | the device configuration file |


|
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.
| framebuffer_cfg | the widget configuration data |
| canvas_format | the format of the canvas |
Implements GraphicDisplayDevice.
|
virtual |
fill the internal ST7735 screen buffer with the given color. Default to BLACK, clear the internal buffer
| color_index |
Reimplemented in rtos_ST7735.

|
protected |
config specific device size and offsets
| device_config | the device configuration file |

|
protected |
config framerate control
Frame rate control -Set the frame frequency of the full colors normal mode.


|
protected |
column row address set CASET , [0x00,0x01,0x00, width-1] RASET , [0x00,0x01,0x00, height-1] we start column 1
ST77XX_CASET, 4, // 1: Column addr set, 4 args, no delay: 0x00, 0x02, // XSTART = 0 0x00, 0x7F+0x02, // XEND = 127 ST77XX_RASET, 4, // 2: Row addr set, 4 args, no delay: 0x00, 0x01, // XSTART = 0 0x00, 0x9F+0x01 }, // XEND = 159
gamma correction GMCTRP1 , [0x02, 0x1c, 0x07, 0x12, 0x37, 0x32, 0x29, 0x2d, 0x29, 0x25, 0x2b, 0x39, 0x00, 0x01, 0x03, 0x10] GMCTRN1 , [0x03, 0x1d, 0x07, 0x06, 0x2e, 0x2c, 0x29, 0x2d, 0x2e, 0x2e, 0x37, 0x3f, 0x00, 0x00, 0x02, 0x10]


|
protected |
config display inversion control
display inversion control INVCTR , [0x07] column inversion and no dot inversion for Normal, Idle and partial mode


|
protected |
config power control
power control PWCTR1 , [0xA2,0x02,0x84] PWCTR2 , [0xC5] VGH = 14.7V, VGL = -7.35V PWCTR3 , [0x0A, 0x00] opamp current small, boost frequency PWCTR4 , [0x8A, 0x2A] opamp current small, boost frequency PWCTR5 , [0x8A, 0xEE] opamp current small, boost frequency VMCTR1 , [0x0E]


|
protected |
wake up the device from sleep mode
_ wake up_ harware_reset SW_reset, sleep 150us SLPOUT, sleep 150us


|
protected |
enable or disable the command mode (DC pin low or high)
| enable | true for command mode, false for data mode |

| void ST7735::enable_sleep | ( | bool | enable | ) |
turn the display in sleep mode on/off
| enable |


|
protected |
send a buffer of data to the ST7735 device
| buffer | a pointer to the buffer |
| buffer_len | the length of the buffer |

|
protected |
send a command to the ST7735 device
init for "green tab" version of display ... I don't know why
| cmd | the command to be sent |


|
protected |
send a list of command to the ST7735 device
| cmd | a pointer to the list of command |
| len | the length of the command list |


|
protected |
set the backlight of the display
| on |

|
protected |
set the RAM write addresses for the display
| start_x | the starting x coordinate |
| start_y | the starting y coordinate |
| width | the width of the area to write |
| height | the height of the area to write |


| void ST7735::set_rotation_and_color | ( | struct_ConfigST7735 | device_config | ) |
set the actual position of the display
set rotation and color
| device_config | the device configuration file |


|
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.
| canvas | a pointer to the canvas that contains the buffer to be displayed |
| anchor_x | the x(horizontal) starting position of the frame within the display screen,(in pixel) |
| anchor_y | the y(vertical) starting position of the frame within the display screen,(in pixel) |
Implements GraphicDisplayDevice.
Reimplemented in rtos_ST7735.
