SG12864A
Dependents: SG12864A_TestProgram
SG12864A Class Reference
SG12864A Graphics LCD module driver class. More...
#include <SG12864A.h>
Public Types | |
| enum | Target |
Target of a chip. More... | |
Public Member Functions | |
| SG12864A (PinName di, PinName rw, PinName en, PinName db0, PinName db1, PinName db2, PinName db3, PinName db4, PinName db5, PinName db6, PinName db7, PinName cs1, PinName cs2, PinName res) | |
| Create. | |
| ~SG12864A () | |
| Destroy. | |
| void | bufferPush (void) |
| Push images from a internal buffer. | |
| void | bufferPull (void) |
| Pull images to a internal buffer. | |
| void | bufferClear (bool reverse=false) |
| Clear a internal buffer images. | |
| void | bufferDrawLine (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, bool reverse=false) |
| Draw a line to a internal buffer. | |
| void | bufferDrawBox (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, bool reverse=false) |
| Draw a box to a internal buffer. | |
| void | bufferFillBox (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, bool reverse=false) |
| Fill a box to a internal buffer. | |
| void | bufferDrawString (uint8_t x, uint8_t y, char *str, bool reverse=false) |
| Draw a text string to a internal buffer. | |
| void | bufferDrawChar (uint8_t x, uint8_t y, char c, bool reverse=false) |
| Draw a character to a internal buffer. | |
| void | bufferDrawCheckbox (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, bool state, bool reverse=false) |
| Draw a checkbox to a internal buffer. | |
| void | bufferDrawProgressbar (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, int min, int max, int value, bool reverse=false) |
| Draw a progressbar to a internal buffer. | |
| void | reset (void) |
| Reset module. | |
| void | clear (void) |
| Clear display. | |
| void | setDisplayOnOff (Target t, bool on) |
| Set display ON/OFF. | |
| void | setDisplayStartLine (Target t, uint8_t displayStartLine) |
| Set display start line. | |
| void | setPageAddress (Target t, uint8_t addr) |
| Set page address. | |
| void | setColumnAddress (Target t, uint8_t addr) |
| Set column address. | |
| void | readStatus (Target t, uint8_t *c) |
| Read status. | |
| void | writeData (Target t, uint8_t c) |
| Write data. | |
| void | readData (Target t, uint8_t *c) |
| Read data. | |
Detailed Description
SG12864A Graphics LCD module driver class.
Definition at line 19 of file SG12864A.h.
Member Enumeration Documentation
| enum Target |
Target of a chip.
Definition at line 63 of file SG12864A.h.
Constructor & Destructor Documentation
| SG12864A | ( | PinName | di, |
| PinName | rw, | ||
| PinName | en, | ||
| PinName | db0, | ||
| PinName | db1, | ||
| PinName | db2, | ||
| PinName | db3, | ||
| PinName | db4, | ||
| PinName | db5, | ||
| PinName | db6, | ||
| PinName | db7, | ||
| PinName | cs1, | ||
| PinName | cs2, | ||
| PinName | res | ||
| ) |
Create.
- Parameters:
-
di D-/I (H:Instruction, L:Data) rw R/W- (H:Read, L:Write) en Enable signal db0 Data bus line bit-0. db1 Data bus line bit-1. db2 Data bus line bit-2. db3 Data bus line bit-3. db4 Data bus line bit-4. db5 Data bus line bit-5. db6 Data bus line bit-6. db7 Data bus line bit-7. cs1 Chip select signal for IC1. cs2 Chip select signal for IC2. res Reset signal.
Definition at line 116 of file SG12864A.cpp.
| ~SG12864A | ( | ) |
Destroy.
Definition at line 142 of file SG12864A.cpp.
Member Function Documentation
| void bufferClear | ( | bool | reverse = false ) |
Clear a internal buffer images.
- Parameters:
-
reverse True if images are reversed.
Definition at line 165 of file SG12864A.cpp.
| void bufferDrawBox | ( | uint16_t | x1, |
| uint16_t | y1, | ||
| uint16_t | x2, | ||
| uint16_t | y2, | ||
| bool | reverse = false |
||
| ) |
Draw a box to a internal buffer.
- Parameters:
-
x1 Starting point at x-axis. y1 Starting point at y-axis. x2 Ending point at x-axis. y2 Ending point at y-axis. reverse True if images are reversed.
Definition at line 220 of file SG12864A.cpp.
| void bufferDrawChar | ( | uint8_t | x, |
| uint8_t | y, | ||
| char | c, | ||
| bool | reverse = false |
||
| ) |
Draw a character to a internal buffer.
The font size is 5x7 dots.
- Parameters:
-
x Starting point at x-axis. y Starting point at y-axis. c A character. reverse True if images are reversed.
Definition at line 263 of file SG12864A.cpp.
| void bufferDrawCheckbox | ( | uint16_t | x1, |
| uint16_t | y1, | ||
| uint16_t | x2, | ||
| uint16_t | y2, | ||
| bool | state, | ||
| bool | reverse = false |
||
| ) |
Draw a checkbox to a internal buffer.
- Parameters:
-
x1 Starting point at x-axis. y1 Starting point at y-axis. x2 Ending point at x-axis. y2 Ending point at y-axis. state True if state is checked. reverse True if images are reversed.
Definition at line 306 of file SG12864A.cpp.
| void bufferDrawLine | ( | uint16_t | x1, |
| uint16_t | y1, | ||
| uint16_t | x2, | ||
| uint16_t | y2, | ||
| bool | reverse = false |
||
| ) |
Draw a line to a internal buffer.
- Parameters:
-
x1 Starting point at x-axis. y1 Starting point at y-axis. x2 Ending point at x-axis. y2 Ending point at y-axis. reverse True if images are reversed.
Definition at line 175 of file SG12864A.cpp.
| void bufferDrawProgressbar | ( | uint16_t | x1, |
| uint16_t | y1, | ||
| uint16_t | x2, | ||
| uint16_t | y2, | ||
| int | min, | ||
| int | max, | ||
| int | value, | ||
| bool | reverse = false |
||
| ) |
Draw a progressbar to a internal buffer.
- Parameters:
-
x1 Starting point at x-axis. y1 Starting point at y-axis. x2 Ending point at x-axis. y2 Ending point at y-axis. min Minimum value on a scale. max Maximum value on a scale. value Current value on a scale. reverse True if images are reversed.
Definition at line 314 of file SG12864A.cpp.
| void bufferDrawString | ( | uint8_t | x, |
| uint8_t | y, | ||
| char * | str, | ||
| bool | reverse = false |
||
| ) |
Draw a text string to a internal buffer.
The font size is 5x7 dots.
- Parameters:
-
x Starting point at x-axis. y Starting point at y-axis. str Text string. (NULL terminate.) reverse True if images are reversed.
Definition at line 253 of file SG12864A.cpp.
| void bufferFillBox | ( | uint16_t | x1, |
| uint16_t | y1, | ||
| uint16_t | x2, | ||
| uint16_t | y2, | ||
| bool | reverse = false |
||
| ) |
Fill a box to a internal buffer.
- Parameters:
-
x1 Starting point at x-axis. y1 Starting point at y-axis. x2 Ending point at x-axis. y2 Ending point at y-axis. reverse True if images are reversed.
Definition at line 241 of file SG12864A.cpp.
| void bufferPull | ( | void | ) |
Pull images to a internal buffer.
Definition at line 162 of file SG12864A.cpp.
| void bufferPush | ( | void | ) |
Push images from a internal buffer.
Definition at line 145 of file SG12864A.cpp.
| void clear | ( | void | ) |
Clear display.
High Level Interface.
Clear display module.
Definition at line 351 of file SG12864A.cpp.
| void readData | ( | Target | t, |
| uint8_t * | c | ||
| ) |
Read data.
Middle Level Interface.
- Parameters:
-
t Target. c Status.
Definition at line 455 of file SG12864A.cpp.
| void readStatus | ( | Target | t, |
| uint8_t * | c | ||
| ) |
Read status.
Middle Level Interface.
- Parameters:
-
t Target. c Status.
Definition at line 437 of file SG12864A.cpp.
| void reset | ( | void | ) |
Reset module.
High Level Interface.
Reset display module.
Definition at line 330 of file SG12864A.cpp.
| void setColumnAddress | ( | Target | t, |
| uint8_t | addr | ||
| ) |
Set column address.
Middle Level Interface.
- Parameters:
-
t Target. addr Address.
Set column address.
- Parameters:
-
t Target. (CS1, CS2) addr Column address (0-63).
Definition at line 427 of file SG12864A.cpp.
| void setDisplayOnOff | ( | Target | t, |
| bool | on | ||
| ) |
Set display ON/OFF.
Middle Level Interface.
- Parameters:
-
t Target. on True if the display is ON.
Set display on/off.
- Parameters:
-
t Target (CS1, CS2). on ON/OFF (true, false).
Definition at line 382 of file SG12864A.cpp.
| void setDisplayStartLine | ( | Target | t, |
| uint8_t | addr | ||
| ) |
Set display start line.
Middle Level Interface.
- Parameters:
-
t Target. displayStartLine Start line number.
Set display start line.
- Parameters:
-
t Target (CS1, CS2). addr Display start line (0-63).
Definition at line 397 of file SG12864A.cpp.
| void setPageAddress | ( | Target | t, |
| uint8_t | addr | ||
| ) |
Set page address.
Middle Level Interface.
- Parameters:
-
t Target. addr Address.
Set page address.
- Parameters:
-
t Target (CS1, CS2). addr Page address(0-7).
Definition at line 412 of file SG12864A.cpp.
| void writeData | ( | Target | t, |
| uint8_t | c | ||
| ) |
Write data.
Middle Level Interface.
- Parameters:
-
t Target. c Status.
Definition at line 446 of file SG12864A.cpp.
Generated on Tue Jul 12 2022 11:03:55 by
1.7.2