|
upm
0.2.0
Sensor/Actuator repository for libmraa (v0.6.1)
|
C++ API for the st7735 lcd display library. More...
This file defines the C++ interface for ST7735 display library
Public Member Functions | |
| ST7735 (uint8_t csLCD, uint8_t cSD, uint8_t rs, uint8_t rst) | |
| ~ST7735 () | |
| std::string | name () |
| void | initModule () |
| void | configModule () |
| void | write (uint8_t value) |
| void | data (uint8_t value) |
| void | executeCMDList (const uint8_t *addr) |
| void | setAddrWindow (uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1) |
| void | drawPixel (int16_t x, int16_t y, uint16_t color) |
| void | refresh () |
| mraa_result_t | lcdCSOn () |
| mraa_result_t | lcdCSOff () |
| mraa_result_t | sdCSOn () |
| mraa_result_t | sdCSOff () |
| mraa_result_t | rsHIGH () |
| mraa_result_t | rsLOW () |
Public Member Functions inherited from GFX | |
| GFX (int width, int height, uint8_t *screenBuffer, const unsigned char *font) | |
| ~GFX () | |
| void | drawChar (int16_t x, int16_t y, uint8_t data, uint16_t color, uint16_t bg, uint8_t size) |
| void | print (std::string msg) |
| mraa_result_t | setPixel (int x, int y, uint16_t color) |
| void | fillScreen (uint16_t color) |
| void | fillRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) |
| void | drawFastVLine (int16_t x, int16_t y, int16_t h, uint16_t color) |
| void | drawLine (int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color) |
| void | drawTriangle (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color) |
| void | drawCircle (int16_t x, int16_t y, int16_t r, uint16_t color) |
| void | setCursor (int16_t x, int16_t y) |
| void | setTextColor (uint16_t textColor, uint16_t textBGColor) |
| void | setTextSize (uint8_t size) |
| void | setTextWrap (uint8_t wrap) |
Data Fields | |
| uint8_t | m_map [160 *128 *2] |
Data Fields inherited from GFX | |
| int | m_height |
| int | m_width |
| int | m_textSize |
| int | m_textColor |
| int | m_textBGColor |
| int | m_cursorX |
| int | m_cursorY |
| int | m_wrap |
| uint8_t * | m_map |
Additional Inherited Members | |
Protected Attributes inherited from GFX | |
| const int16_t | WIDTH |
| const int16_t | HEIGHT |
| const unsigned char * | m_font |
| ST7735 | ( | uint8_t | csLCD, |
| uint8_t | cSD, | ||
| uint8_t | rs, | ||
| uint8_t | rst | ||
| ) |
Instanciates a ST7735 object
| csLCD | LCD chip select pin |
| cSD | SD card chip select pin |
| rs | data/command pin |
| rst | reset pin |

|
inline |
Return name of the component
| void initModule | ( | ) |
Initialize the modules GPIOs


| void configModule | ( | ) |
Configure the chip via SPI interface


| void write | ( | uint8_t | value | ) |
Send command to SPI bus (rs must be LOW)
| value | command number |


| void data | ( | uint8_t | value | ) |
Send data to SPI bus (rs must be HIGH)
| value | command number |


| void executeCMDList | ( | const uint8_t * | addr | ) |
Execute set of commands and data
| addr | pointer to start of the commands/data section |


|
virtual |
Set the window size inside the screen where the pixels data will be written.
| x0 | first coordinate |
| y0 | first coordinate |
| x1 | second coordinate |
| y1 | second coordinate |
Implements GFX.


|
virtual |
Send pixel collor (RGB) to the chip.
| x | axis on horizontal scale |
| y | axis on vertical scale |
| color | rgb (16bit) color (R[0-4], G[5-10], B[11-15]) |
Implements GFX.

|
virtual |
Copy the buffer to the chip via SPI interface.
Implements GFX.


| mraa_result_t lcdCSOn | ( | ) |
LCD chip select LOW.

| mraa_result_t lcdCSOff | ( | ) |
LCD chip select HIGH.

| mraa_result_t sdCSOn | ( | ) |
CD card chip select LOW.
| mraa_result_t sdCSOff | ( | ) |
CD card select HIGH.
| mraa_result_t rsHIGH | ( | ) |
Data select HIGH.

| mraa_result_t rsLOW | ( | ) |
Data select LOW.

| uint8_t m_map[160 *128 *2] |
Screens buffer


1.8.9.1