Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of RA8875 by
RA8875 Class Reference
This is a graphics library for the Raio RA8875 Display Controller chip attached to a 4-wire SPI interface. More...
#include <RA8875.h>
Inherits GraphicsDisplay.
Public Types | |
| enum | font_t { ISO8859_1, ISO8859_2, ISO8859_3, ISO8859_4 } |
font type selection. More... | |
| enum | font_angle_t { normal, rotated } |
font rotation selection More... | |
| enum | alignment_t { align_none, align_full } |
alignment More... | |
| enum | Region_t { FULLWINDOW, ACTIVEWINDOW } |
Clear screen region. More... | |
| typedef int | HorizontalScale |
| Scale factor - 1, 2, 3 4. | |
| typedef int | VerticalScale |
| Scale factor - 1, 2, 3, 4. | |
Public Member Functions | |
| RA8875 (PinName mosi, PinName miso, PinName sclk, PinName csel, PinName reset, const char *name="lcd") | |
| Constructor for a display based on the RAiO RA8875 display controller. | |
| RetCode_t | SelectLayer (uint16_t layer) |
| Select the layer for subsequent commands. | |
| RetCode_t | SetLayerMode (uint8_t mode) |
| Set the Layer presentation mode. | |
| RetCode_t | SetLayerTransparency (uint8_t layer1, uint8_t layer2) |
| Set the layer transparency for each layer. | |
| RetCode_t | WriteCommandW (uint8_t command, uint16_t data) |
| Write a command to the display with a word of data. | |
| virtual RetCode_t | WriteCommand (unsigned char command, unsigned int data=0xFFFF) |
| Write a command to the display. | |
| RetCode_t | WriteDataW (uint16_t data) |
| Write a data word to the display. | |
| virtual RetCode_t | WriteData (unsigned char data) |
| Write a data byte to the display. | |
| unsigned char | ReadCommand (unsigned char command) |
| Read a command register. | |
| unsigned char | ReadData (void) |
| Read a data byte from the display. | |
| uint16_t | ReadDataW (void) |
| Read a word from the display. | |
| unsigned char | ReadStatus (void) |
| Read the display status. | |
| dim_t | fontwidth (void) |
| get the width in pixels of the currently active font | |
| dim_t | fontheight (void) |
| get the height in pixels of the currently active font | |
| virtual int | columns (void) |
| get the number of colums based on the currently active font | |
| virtual int | rows (void) |
| get the number of rows based on the currently active font | |
| virtual dim_t | width (void) |
| get the screen width in pixels | |
| virtual dim_t | height (void) |
| get the screen height in pixels | |
| virtual dim_t | color_bpp (void) |
| get the color depth in bits per pixel. | |
| virtual RetCode_t | locate (textloc_t column, textloc_t row) |
| Set cursor position based on the current font size. | |
| RetCode_t | SetTextCursor (loc_t x, loc_t y) |
| Prepare the controller to write text to the screen by positioning the cursor. | |
| point_t | GetTextCursor (void) |
| Get the current cursor position in pixels. | |
| loc_t | GetTextCursor_X (void) |
| Get the current cursor horizontal position in pixels. | |
| loc_t | GetTextCursor_Y (void) |
| Get the current cursor vertical position in pixels. | |
| RetCode_t | SetTextCursorControl (cursor_t cursor=NOCURSOR, bool blink=false) |
| Configure additional Cursor Control settings. | |
| RetCode_t | SetTextFont (font_t font=ISO8859_1) |
| Select the ISO 8859-X font to use next. | |
| RetCode_t | SetTextFontControl (fill_t fillit=FILL, font_angle_t angle=normal, HorizontalScale hScale=1, VerticalScale vScale=1, alignment_t alignment=align_none) |
| Control the font behavior. | |
| RetCode_t | SetTextFontSize (HorizontalScale hScale=1, VerticalScale vScale=-1) |
| Control the font size. | |
| virtual int | _putc (int c) |
| put a character on the screen. | |
| void | puts (const char *string) |
| Write string of text to the display. | |
| void | puts (loc_t x, loc_t y, const char *string) |
| Write string of text to the display at the specified location. | |
| virtual RetCode_t | SetGraphicsCursor (loc_t x, loc_t y) |
| Prepare the controller to write binary data to the screen by positioning the memory cursor. | |
| virtual RetCode_t | SetGraphicsCursorRead (loc_t x, loc_t y) |
| Prepare the controller to read binary data from the screen by positioning the memory read cursor. | |
| virtual RetCode_t | window (loc_t x, loc_t y, dim_t width, dim_t height) |
| Set the window, which controls where items are written to the screen. | |
| virtual RetCode_t | cls (void) |
| Clear the screen. | |
| RetCode_t | clsw (RA8875::Region_t region=FULLWINDOW) |
| Clear the screen, or clear only the active window. | |
| virtual RetCode_t | background (color_t color) |
| Set the background color. | |
| virtual RetCode_t | background (unsigned char r, unsigned char g, unsigned char b) |
| Set the background color. | |
| virtual RetCode_t | foreground (color_t color) |
| Set the foreground color. | |
| virtual RetCode_t | foreground (unsigned char r, unsigned char g, unsigned char b) |
| Set the foreground color. | |
| color_t | GetForeColor (void) |
| Get the current foreground color value. | |
| virtual RetCode_t | pixel (loc_t x, loc_t y, color_t color) |
| Draw a pixel in the specified color. | |
| virtual RetCode_t | pixel (loc_t x, loc_t y) |
| Draw a pixel in the current foreground color. | |
| virtual color_t | getPixel (loc_t x, loc_t y) |
| Get a pixel from the display. | |
| virtual RetCode_t | pixelStream (color_t *p, uint32_t count, loc_t x, loc_t y) |
| Write a stream of pixels to the display. | |
| virtual RetCode_t | getPixelStream (color_t *p, uint32_t count, loc_t x, loc_t y) |
| Get a stream of pixels from the display. | |
| RetCode_t | line (loc_t x1, loc_t y1, loc_t x2, loc_t y2, color_t color) |
| Draw a line in the specified color. | |
| RetCode_t | line (loc_t x1, loc_t y1, loc_t x2, loc_t y2) |
| Draw a line. | |
| RetCode_t | rect (loc_t x1, loc_t y1, loc_t x2, loc_t y2, color_t color, fill_t fillit=NOFILL) |
| Draw a rectangle in the specified color. | |
| virtual RetCode_t | fillrect (loc_t x1, loc_t y1, loc_t x2, loc_t y2, color_t color, fill_t fillit=FILL) |
| Draw a filled rectangle in the specified color. | |
| RetCode_t | rect (loc_t x1, loc_t y1, loc_t x2, loc_t y2, fill_t fillit=NOFILL) |
| Draw a rectangle. | |
| RetCode_t | fillroundrect (loc_t x1, loc_t y1, loc_t x2, loc_t y2, dim_t radius1, dim_t radius2, color_t color, fill_t fillit=FILL) |
| Draw a filled rectangle with rounded corners using the specified color. | |
| RetCode_t | roundrect (loc_t x1, loc_t y1, loc_t x2, loc_t y2, dim_t radius1, dim_t radius2, color_t color, fill_t fillit=NOFILL) |
| Draw a rectangle with rounded corners using the specified color. | |
| RetCode_t | roundrect (loc_t x1, loc_t y1, loc_t x2, loc_t y2, dim_t radius1, dim_t radius2, fill_t fillit=NOFILL) |
| Draw a rectangle with rounded corners. | |
| RetCode_t | triangle (loc_t x1, loc_t y1, loc_t x2, loc_t y2, loc_t x3, loc_t y3, color_t color, fill_t fillit=NOFILL) |
| Draw a triangle in the specified color. | |
| RetCode_t | filltriangle (loc_t x1, loc_t y1, loc_t x2, loc_t y2, loc_t x3, loc_t y3, color_t color, fill_t fillit=FILL) |
| Draw a filled triangle in the specified color. | |
| RetCode_t | triangle (loc_t x1, loc_t y1, loc_t x2, loc_t y2, loc_t x3, loc_t y3, fill_t fillit=NOFILL) |
| Draw a triangle. | |
| RetCode_t | circle (loc_t x, loc_t y, dim_t radius, color_t color, fill_t fillit=NOFILL) |
| Draw a circle using the specified color. | |
| RetCode_t | fillcircle (loc_t x, loc_t y, dim_t radius, color_t color, fill_t fillit=FILL) |
| Draw a filled circle using the specified color. | |
| RetCode_t | circle (loc_t x, loc_t y, dim_t radius, fill_t fillit=NOFILL) |
| Draw a circle. | |
| RetCode_t | ellipse (loc_t x, loc_t y, dim_t radius1, dim_t radius2, color_t color, fill_t fillit=NOFILL) |
| Draw an Ellipse using the specified color. | |
| RetCode_t | fillellipse (loc_t x, loc_t y, dim_t radius1, dim_t radius2, color_t color, fill_t fillit=FILL) |
| Draw a filled Ellipse using the specified color. | |
| RetCode_t | ellipse (loc_t x, loc_t y, dim_t radius1, dim_t radius2, fill_t fillit=NOFILL) |
| Draw an Ellipse. | |
| RetCode_t | Power (bool on) |
| Control display power. | |
| RetCode_t | Reset (void) |
| Reset the display controller via the Software Reset interface. | |
| RetCode_t | Backlight_u8 (unsigned char brightness) |
| Set backlight brightness. | |
| RetCode_t | Backlight (float brightness) |
| Set backlight brightness. | |
| virtual RetCode_t | set_font (const unsigned char *font=NULL) |
| Select a bitmap font (provided by the user) for all subsequent text. | |
| color_t | DOSColor (int i) |
| Get the RGB value for a DOS color. | |
| const char * | DOSColorNames (int i) |
| Get the color name (string) for a DOS color. | |
| void | ClearPerformance () |
| Clear the performance metrics to zero. | |
| void | ReportPerformance (Serial &pc) |
| Report the performance metrics for drawing functions using the available serial channel. | |
| virtual int | fontblit (int x, int y, const unsigned char *fontTable, const unsigned char *fontChar) |
| This method transfers one character from the external font data to the screen. | |
| color_t | RGBQuadToRGB16 (RGBQUAD *colorPalette, uint16_t i) |
| This method returns the color value from a palette. | |
| RGBQUAD | RGB16ToRGBQuad (color_t c) |
| This method converts a 16-bit color value into a 24-bit RGB Quad. | |
| RetCode_t | RenderImageFile (loc_t x, loc_t y, const char *FileName) |
| This method attempts to render a specified graphics image file at the specified screen location. | |
| RetCode_t | RenderBitmapFile (loc_t x, loc_t y, const char *Name_BMP) |
| This method reads a disk file that is in bitmap format and puts it on the screen. | |
| RetCode_t | RenderIconFile (loc_t x, loc_t y, const char *Name_ICO) |
| This method reads a disk file that is in ico format and puts it on the screen. | |
| RetCode_t | PrintScreen (loc_t x, loc_t y, dim_t w, dim_t h, const char *Name_BMP) |
| This method captures the specified area as a 24-bit bitmap file. | |
| virtual int | character (int x, int y, int value) |
| prints one character at the specified coordinates. | |
| virtual bool | claim (FILE *stream) |
| redirect output from a stream (stoud, sterr) to display | |
Protected Member Functions | |
| RetCode_t | _RenderBitmap (loc_t x, loc_t y, uint32_t fileOffset, FILE *Image) |
| Protected method to render an image given a file handle and coordinates. | |
Detailed Description
This is a graphics library for the Raio RA8875 Display Controller chip attached to a 4-wire SPI interface.
It offers both primitive and high level APIs.\ Central to this API is a coordinate system, where the origin (0,0) is in the top-left corner of the display, and the width extends positive to the right and the height extends positive toward the bottom.
As there are both graphics and text commands, one must take care to use the proper coordinate system for each. Some of the text APIs are in units of column and row, which is measured in character positions (and dependent on the font size), and other text APIs permit pixel level positioning.
Definition at line 72 of file RA8875.h.
Member Typedef Documentation
| typedef int HorizontalScale |
| typedef int VerticalScale |
Member Enumeration Documentation
| enum alignment_t |
| enum font_angle_t |
| enum font_t |
| enum Region_t |
Constructor & Destructor Documentation
| RA8875 | ( | PinName | mosi, |
| PinName | miso, | ||
| PinName | sclk, | ||
| PinName | csel, | ||
| PinName | reset, | ||
| const char * | name = "lcd" |
||
| ) |
Constructor for a display based on the RAiO RA8875 display controller.
- Parameters:
-
mosi is the SPI master out slave in pin on the mbed. miso is the SPI master in slave out pin on the mbed. sclk is the SPI shift clock pin on the mbed. csel is the DigitalOut pin on the mbed to use as the active low chip select for the display controller. reset is the DigitalOut pin on the mbed to use as the active low reset input on the display controller - but this is not currently used. name is a text name for this object, which will permit capturing stdout and printf() directly to it.
Definition at line 51 of file RA8875.cpp.
Member Function Documentation
| int _putc | ( | int | c ) | [virtual] |
put a character on the screen.
- Parameters:
-
c is the character.
- Returns:
- the character, or EOF if there is an error.
Reimplemented from TextDisplay.
Definition at line 411 of file RA8875.cpp.
| RetCode_t _RenderBitmap | ( | loc_t | x, |
| loc_t | y, | ||
| uint32_t | fileOffset, | ||
| FILE * | Image | ||
| ) | [protected, inherited] |
Protected method to render an image given a file handle and coordinates.
- Parameters:
-
x is the horizontal pixel coordinate y is the vertical pixel coordinate w is the image width restriction, or zero to permit full image width. h is the image height restriction, or zero to permit full image height. fileOffset is the offset into the file where the image data starts Image is the filename stream already opened for the data.
- Returns:
- success or error code.
Definition at line 450 of file GraphicsDisplay.cpp.
| RetCode_t background | ( | unsigned char | r, |
| unsigned char | g, | ||
| unsigned char | b | ||
| ) | [virtual] |
Set the background color.
- Parameters:
-
r is the red element of the color. g is the green element of the color. b is the blue element of the color.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 1017 of file RA8875.cpp.
| RetCode_t background | ( | color_t | color ) | [virtual] |
Set the background color.
- Parameters:
-
color is expressed in 16-bit format.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Implements TextDisplay.
Definition at line 1007 of file RA8875.cpp.
| RetCode_t Backlight | ( | float | brightness ) |
Set backlight brightness.
When the built-in PWM is used to control the backlight, this API can be used to set the brightness.
- Parameters:
-
brightness ranges from 0.0 (off) to 1.0 (full on)
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 982 of file RA8875.cpp.
| RetCode_t Backlight_u8 | ( | unsigned char | brightness ) |
Set backlight brightness.
When the built-in PWM is used to control the backlight, this API can be used to set the brightness.
- Parameters:
-
brightness ranges from 0 (off) to 255 (full on)
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 963 of file RA8875.cpp.
| int character | ( | int | x, |
| int | y, | ||
| int | value | ||
| ) | [virtual, inherited] |
prints one character at the specified coordinates.
This will print the character at the specified pixel coordinates.
- Parameters:
-
x is the horizontal offset in pixels. y is the vertical offset in pixels. value is the character to print.
- Returns:
- number of pixels to index to the right if a character was printed, 0 otherwise.
Implements TextDisplay.
Definition at line 196 of file GraphicsDisplay.cpp.
| RetCode_t circle | ( | loc_t | x, |
| loc_t | y, | ||
| dim_t | radius, | ||
| color_t | color, | ||
| fill_t | fillit = NOFILL |
||
| ) |
Draw a circle using the specified color.
- Note:
- As a side effect, this changes the current foreground color for subsequent operations.
- Parameters:
-
x is the horizontal center of the circle. y is the vertical center of the circle. radius defines the size of the circle. color defines the foreground color.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 850 of file RA8875.cpp.
| RetCode_t circle | ( | loc_t | x, |
| loc_t | y, | ||
| dim_t | radius, | ||
| fill_t | fillit = NOFILL |
||
| ) |
Draw a circle.
Draws a circle using the foreground color setting.
- Parameters:
-
x is the horizontal center of the circle. y is the vertical center of the circle. radius defines the size of the circle.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 866 of file RA8875.cpp.
| bool claim | ( | FILE * | stream ) | [virtual, inherited] |
redirect output from a stream (stoud, sterr) to display
- Note:
- this method may be overridden in a derived class.
- Parameters:
-
stream that shall be redirected to the TextDisplay
- Returns:
- true if the claim succeeded.
Definition at line 95 of file TextDisplay.cpp.
| void ClearPerformance | ( | ) |
Clear the performance metrics to zero.
Definition at line 109 of file RA8875.cpp.
| RetCode_t cls | ( | void | ) | [virtual] |
Clear the screen.
The behavior is to clear the whole screen.
- See also:
- clsw().
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Reimplemented from GraphicsDisplay.
Definition at line 570 of file RA8875.cpp.
| RetCode_t clsw | ( | RA8875::Region_t | region = FULLWINDOW ) |
Clear the screen, or clear only the active window.
The default behavior is to clear the whole screen. With the optional parameter, the action can be restricted to the active window, which can be set with the
- See also:
- window method.
- Parameters:
-
region is an optional parameter that defaults to FULLWINDOW or may be set to ACTIVEWINDOW.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 580 of file RA8875.cpp.
| dim_t color_bpp | ( | void | ) | [virtual] |
get the color depth in bits per pixel.
- Returns:
- 8 or 16 only.
Definition at line 282 of file RA8875.cpp.
| int columns | ( | void | ) | [virtual] |
get the number of colums based on the currently active font
- Returns:
- number of columns.
Reimplemented from GraphicsDisplay.
Definition at line 258 of file RA8875.cpp.
| color_t DOSColor | ( | int | i ) |
Get the RGB value for a DOS color.
- Parameters:
-
i is the color, in the range 0 to 15;
- Returns:
- the RGB color of the selected index, or 0 if the index is out of bounds.
Definition at line 1058 of file RA8875.cpp.
| const char * DOSColorNames | ( | int | i ) |
Get the color name (string) for a DOS color.
- Parameters:
-
i is the color, in the range 0 to 15;
- Returns:
- a pointer to a string with the color name, or NULL if the index is out of bounds.
Definition at line 1074 of file RA8875.cpp.
| RetCode_t ellipse | ( | loc_t | x, |
| loc_t | y, | ||
| dim_t | radius1, | ||
| dim_t | radius2, | ||
| color_t | color, | ||
| fill_t | fillit = NOFILL |
||
| ) |
Draw an Ellipse using the specified color.
- Note:
- As a side effect, this changes the current foreground color for subsequent operations.
- Parameters:
-
x is the horizontal center of the ellipse. y is the vertical center of the ellipse. radius1 defines the horizontal radius of the ellipse. radius2 defines the vertical radius of the ellipse. color defines the foreground color. fillit defines whether the circle is filled or not.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 892 of file RA8875.cpp.
| RetCode_t ellipse | ( | loc_t | x, |
| loc_t | y, | ||
| dim_t | radius1, | ||
| dim_t | radius2, | ||
| fill_t | fillit = NOFILL |
||
| ) |
Draw an Ellipse.
Draws it using the foreground color setting.
- Parameters:
-
x is the horizontal center of the ellipse. y is the vertical center of the ellipse. radius1 defines the horizontal radius of the ellipse. radius2 defines the vertical radius of the ellipse. fillit defines whether the circle is filled or not.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 906 of file RA8875.cpp.
| RetCode_t fillcircle | ( | loc_t | x, |
| loc_t | y, | ||
| dim_t | radius, | ||
| color_t | color, | ||
| fill_t | fillit = FILL |
||
| ) |
Draw a filled circle using the specified color.
- Note:
- As a side effect, this changes the current foreground color for subsequent operations.
- Parameters:
-
x is the horizontal center of the circle. y is the vertical center of the circle. radius defines the size of the circle. color defines the foreground color.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 858 of file RA8875.cpp.
| RetCode_t fillellipse | ( | loc_t | x, |
| loc_t | y, | ||
| dim_t | radius1, | ||
| dim_t | radius2, | ||
| color_t | color, | ||
| fill_t | fillit = FILL |
||
| ) |
Draw a filled Ellipse using the specified color.
- Note:
- As a side effect, this changes the current foreground color for subsequent operations.
- Parameters:
-
x is the horizontal center of the ellipse. y is the vertical center of the ellipse. radius1 defines the horizontal radius of the ellipse. radius2 defines the vertical radius of the ellipse. color defines the foreground color. fillit defines whether the circle is filled or not.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 899 of file RA8875.cpp.
| RetCode_t fillrect | ( | loc_t | x1, |
| loc_t | y1, | ||
| loc_t | x2, | ||
| loc_t | y2, | ||
| color_t | color, | ||
| fill_t | fillit = FILL |
||
| ) | [virtual] |
Draw a filled rectangle in the specified color.
- Note:
- As a side effect, this changes the current foreground color for subsequent operations.
- Parameters:
-
x1 is the horizontal start of the line. y1 is the vertical start of the line. x2 is the horizontal end of the line. y2 is the vertical end of the line. color defines the foreground color. fillit is optional to NOFILL the rectangle. default is FILL.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Implements GraphicsDisplay.
Definition at line 704 of file RA8875.cpp.
| RetCode_t fillroundrect | ( | loc_t | x1, |
| loc_t | y1, | ||
| loc_t | x2, | ||
| loc_t | y2, | ||
| dim_t | radius1, | ||
| dim_t | radius2, | ||
| color_t | color, | ||
| fill_t | fillit = FILL |
||
| ) |
Draw a filled rectangle with rounded corners using the specified color.
This draws a rounded rectangle. A numbers of checks are made on the values, and it could reduce this to drawing a line (if either x1 == x2, or y1 == y2), or a single point (x1 == x2 && y1 == y2). If the radius parameters are > 1/2 the length of that side (width or height), an error value is returned.
- Note:
- As a side effect, this changes the current foreground color for subsequent operations.
- Parameters:
-
x1 is the horizontal start of the line and must be <= x2. y1 is the vertical start of the line and must be <= y2. x2 is the horizontal end of the line and must be >= x1. y2 is the vertical end of the line and must be >= y1. radius1 defines the horizontal radius of the curved corner. Take care that this value < 1/2 the width of the rectangle, or bad_parameter is returned. radius2 defines the vertical radius of the curved corner. Take care that this value < 1/2 the height of the rectangle, or bad_parameter is returned. color defines the foreground color. fillit is optional to FILL the rectangle. default is NOFILL.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 747 of file RA8875.cpp.
| RetCode_t filltriangle | ( | loc_t | x1, |
| loc_t | y1, | ||
| loc_t | x2, | ||
| loc_t | y2, | ||
| loc_t | x3, | ||
| loc_t | y3, | ||
| color_t | color, | ||
| fill_t | fillit = FILL |
||
| ) |
Draw a filled triangle in the specified color.
- Note:
- As a side effect, this changes the current foreground color for subsequent operations.
- Parameters:
-
x1 is the horizontal for point 1. y1 is the vertical for point 1. x2 is the horizontal for point 2. y2 is the vertical for point 2. x3 is the horizontal for point 3. y3 is the vertical for point 3. color defines the foreground color. fillit is optional to FILL the rectangle. default is NOFILL.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 812 of file RA8875.cpp.
| int fontblit | ( | int | x, |
| int | y, | ||
| const unsigned char * | fontTable, | ||
| const unsigned char * | fontChar | ||
| ) | [virtual, inherited] |
This method transfers one character from the external font data to the screen.
- Note:
- the font data is in a special format as generate by the mikroe font creator. \ See http://www.mikroe.com/glcd-font-creator/
- Parameters:
-
x is the horizontal pixel coordinate y is the vertical pixel coordinate fontTable is the base of the table which has the metrics fontChar is the start of that record in the table for the char (e.g. 'A' - 'Z')
- Returns:
- how far the cursor should advance to the right in pixels
Definition at line 299 of file GraphicsDisplay.cpp.
| dim_t fontheight | ( | void | ) |
get the height in pixels of the currently active font
- Returns:
- font height in pixels.
Definition at line 243 of file RA8875.cpp.
| dim_t fontwidth | ( | void | ) |
get the width in pixels of the currently active font
- Returns:
- font width in pixels.
Definition at line 234 of file RA8875.cpp.
| RetCode_t foreground | ( | color_t | color ) | [virtual] |
Set the foreground color.
- Parameters:
-
color is expressed in 16-bit format.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Implements TextDisplay.
Definition at line 1027 of file RA8875.cpp.
| RetCode_t foreground | ( | unsigned char | r, |
| unsigned char | g, | ||
| unsigned char | b | ||
| ) | [virtual] |
Set the foreground color.
- Parameters:
-
r is the red element of the color. g is the green element of the color. b is the blue element of the color.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 1037 of file RA8875.cpp.
| color_t GetForeColor | ( | void | ) |
Get the current foreground color value.
- Returns:
- the current foreground color.
Definition at line 1047 of file RA8875.cpp.
| color_t getPixel | ( | loc_t | x, |
| loc_t | y | ||
| ) | [virtual] |
Get a pixel from the display.
- Parameters:
-
x is the horizontal offset to this pixel. y is the vertical offset to this pixel.
- Returns:
- the pixel. see
Implements GraphicsDisplay.
Definition at line 637 of file RA8875.cpp.
| RetCode_t getPixelStream | ( | color_t * | p, |
| uint32_t | count, | ||
| loc_t | x, | ||
| loc_t | y | ||
| ) | [virtual] |
Get a stream of pixels from the display.
- Parameters:
-
p is a pointer to a color_t array to accept the stream. count is the number of pixels to read. x is the horizontal offset to this pixel. y is the vertical offset to this pixel.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Implements GraphicsDisplay.
Definition at line 657 of file RA8875.cpp.
| point_t GetTextCursor | ( | void | ) |
Get the current cursor position in pixels.
- Returns:
- cursor position.
| loc_t GetTextCursor_X | ( | void | ) |
Get the current cursor horizontal position in pixels.
- Returns:
- cursor position horizontal offset.
Definition at line 309 of file RA8875.cpp.
| loc_t GetTextCursor_Y | ( | void | ) |
Get the current cursor vertical position in pixels.
- Returns:
- cursor position vertical offset.
Definition at line 300 of file RA8875.cpp.
| dim_t height | ( | void | ) | [virtual] |
get the screen height in pixels
- Returns:
- screen height in pixels.
Implements GraphicsDisplay.
Definition at line 276 of file RA8875.cpp.
| RetCode_t line | ( | loc_t | x1, |
| loc_t | y1, | ||
| loc_t | x2, | ||
| loc_t | y2, | ||
| color_t | color | ||
| ) |
Draw a line in the specified color.
- Note:
- As a side effect, this changes the current foreground color for subsequent operations.
- Parameters:
-
x1 is the horizontal start of the line. y1 is the vertical start of the line. x2 is the horizontal end of the line. y2 is the vertical end of the line. color defines the foreground color.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 680 of file RA8875.cpp.
| RetCode_t line | ( | loc_t | x1, |
| loc_t | y1, | ||
| loc_t | x2, | ||
| loc_t | y2 | ||
| ) |
Draw a line.
Draws a line using the foreground color setting.
- Parameters:
-
x1 is the horizontal start of the line. y1 is the vertical start of the line. x2 is the horizontal end of the line. y2 is the vertical end of the line.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 687 of file RA8875.cpp.
| RetCode_t locate | ( | textloc_t | column, |
| textloc_t | row | ||
| ) | [virtual] |
Set cursor position based on the current font size.
- Parameters:
-
column is the horizontal position in character positions row is the vertical position in character positions
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Implements TextDisplay.
Definition at line 252 of file RA8875.cpp.
| RetCode_t pixel | ( | loc_t | x, |
| loc_t | y, | ||
| color_t | color | ||
| ) | [virtual] |
Draw a pixel in the specified color.
- Note:
- Unlike many other operations, this does not set the forecolor!
- Parameters:
-
x is the horizontal offset to this pixel. y is the vertical offset to this pixel. color defines the color for the pixel.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Implements GraphicsDisplay.
Definition at line 591 of file RA8875.cpp.
| RetCode_t pixel | ( | loc_t | x, |
| loc_t | y | ||
| ) | [virtual] |
Draw a pixel in the current foreground color.
- Parameters:
-
x is the horizontal offset to this pixel. y is the veritical offset to this pixel.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 602 of file RA8875.cpp.
| RetCode_t pixelStream | ( | color_t * | p, |
| uint32_t | count, | ||
| loc_t | x, | ||
| loc_t | y | ||
| ) | [virtual] |
Write a stream of pixels to the display.
- Parameters:
-
p is a pointer to a color_t array to write. count is the number of pixels to write. x is the horizontal position on the display. y is the vertical position on the display.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Implements GraphicsDisplay.
Definition at line 618 of file RA8875.cpp.
| RetCode_t Power | ( | bool | on ) |
Control display power.
- Parameters:
-
on when set to true will turn on the display, when false it is turned off.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 945 of file RA8875.cpp.
| RetCode_t PrintScreen | ( | loc_t | x, |
| loc_t | y, | ||
| dim_t | w, | ||
| dim_t | h, | ||
| const char * | Name_BMP | ||
| ) | [inherited] |
This method captures the specified area as a 24-bit bitmap file.
Even though this is a 16-bit display, the stored image is in 24-bit format.
- Parameters:
-
x is the left edge of the region to capture y is the top edge of the region to capture w is the width of the region to capture h is the height of the region to capture.
- Returns:
- success or error code.
Definition at line 361 of file GraphicsDisplay.cpp.
| void puts | ( | const char * | string ) |
Write string of text to the display.
- Parameters:
-
string is the null terminated string to send to the display.
Definition at line 508 of file RA8875.cpp.
| void puts | ( | loc_t | x, |
| loc_t | y, | ||
| const char * | string | ||
| ) |
Write string of text to the display at the specified location.
- Parameters:
-
x is the horizontal position in pixels (from the left edge) y is the vertical position in pixels (from the top edge) string is the null terminated string to send to the display.
Definition at line 501 of file RA8875.cpp.
| unsigned char ReadCommand | ( | unsigned char | command ) |
Read a command register.
- Parameters:
-
command is the command register to read.
- Returns:
- the value read from the register.
Definition at line 190 of file RA8875.cpp.
| unsigned char ReadData | ( | void | ) |
Read a data byte from the display.
This is a high level command, and may invoke several primitives.
- Returns:
- data that was read.
Definition at line 197 of file RA8875.cpp.
| uint16_t ReadDataW | ( | void | ) |
Read a word from the display.
This is a high level command, and may invoke several primitives.
- Returns:
- data that was read.
Definition at line 209 of file RA8875.cpp.
| unsigned char ReadStatus | ( | void | ) |
Read the display status.
This is a high level command, and may invoke several primitives.
- Returns:
- data that was read.
Definition at line 222 of file RA8875.cpp.
| RetCode_t rect | ( | loc_t | x1, |
| loc_t | y1, | ||
| loc_t | x2, | ||
| loc_t | y2, | ||
| color_t | color, | ||
| fill_t | fillit = NOFILL |
||
| ) |
Draw a rectangle in the specified color.
- Note:
- As a side effect, this changes the current foreground color for subsequent operations.
- Parameters:
-
x1 is the horizontal start of the line. y1 is the vertical start of the line. x2 is the horizontal end of the line. y2 is the vertical end of the line. color defines the foreground color. fillit is optional to FILL the rectangle. default is NOFILL.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 711 of file RA8875.cpp.
| RetCode_t rect | ( | loc_t | x1, |
| loc_t | y1, | ||
| loc_t | x2, | ||
| loc_t | y2, | ||
| fill_t | fillit = NOFILL |
||
| ) |
Draw a rectangle.
Draws a rectangle using the foreground color setting.
- Parameters:
-
x1 is the horizontal start of the line. y1 is the vertical start of the line. x2 is the horizontal end of the line. y2 is the vertical end of the line. fillit is optional to FILL the rectangle. default is NOFILL.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 719 of file RA8875.cpp.
| RetCode_t RenderBitmapFile | ( | loc_t | x, |
| loc_t | y, | ||
| const char * | Name_BMP | ||
| ) | [inherited] |
This method reads a disk file that is in bitmap format and puts it on the screen.
Supported formats:
- 4-bit color format (16 colors)
- 8-bit color format (256 colors)
- 16-bit color format (65k colors)
- compression: no.
- Note:
- This is a slow operation, typically due to the use of the file system, and partially because bmp files are stored from the bottom up, and the memory is written from the top down; as a result, it constantly 'seeks' on the file system for the next row of information.
As a performance test, a sample picture was timed. A family picture was converted to Bitmap format; shrunk to 352 x 272 pixels and save in 8-bit color format. The resulting file size was 94.5 KByte. The SPI port interface was set to 20 MHz. The original bitmap rendering software was purely in software, pushing 1 pixel at a time to the write function, which did use SPI hardware (not pin wiggling) to transfer commands and data to the display. Then, the driver was improved to leverage the capability of the derived display driver. As a final check, instead of the [known slow] local file system, a randomly chosen USB stick was used. The performance results are impressive (but depend on the listed factors).
- 34 seconds, LocalFileSystem, Software Rendering
- 9 seconds, LocalFileSystem, Hardware Rending for RA8875
- 3 seconds, MSCFileSystem, Hardware Rendering for RA8875
- Parameters:
-
x is the horizontal pixel coordinate y is the vertical pixel coordinate Name_BMP is the filename on the mounted file system.
- Returns:
- success or error code.
Definition at line 580 of file GraphicsDisplay.cpp.
| RetCode_t RenderIconFile | ( | loc_t | x, |
| loc_t | y, | ||
| const char * | Name_ICO | ||
| ) | [inherited] |
This method reads a disk file that is in ico format and puts it on the screen.
Reading the disk is slow, but a typical icon file is small so it should be ok.
- Note:
- An Icon file can have more than one icon in it. This implementation only processes the first image in the file.
- Parameters:
-
x is the horizontal pixel coordinate y is the vertical pixel coordinate Name_ICO is the filename on the mounted file system.
- Returns:
- success or error code.
Definition at line 606 of file GraphicsDisplay.cpp.
| RetCode_t RenderImageFile | ( | loc_t | x, |
| loc_t | y, | ||
| const char * | FileName | ||
| ) | [inherited] |
This method attempts to render a specified graphics image file at the specified screen location.
This supports several variants of the following file types:
- Bitmap file format,
- Icon file format.
- Note:
- The specified image width and height, when adjusted for the x and y origin, must fit on the screen, or the image will not be shown (it does not clip the image).
- The file extension is tested, and if it ends in a supported format, the appropriate handler is called to render that image.
- Parameters:
-
x is the horizontal pixel coordinate y is the vertical pixel coordinate FileName refers to the fully qualified path and file on a mounted file system.
- Returns:
- success or error code.
Definition at line 569 of file GraphicsDisplay.cpp.
| void ReportPerformance | ( | Serial & | pc ) |
Report the performance metrics for drawing functions using the available serial channel.
- Parameters:
-
pc is the serial channel to write to.
Definition at line 125 of file RA8875.cpp.
| RetCode_t Reset | ( | void | ) |
Reset the display controller via the Software Reset interface.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 952 of file RA8875.cpp.
| RGBQUAD RGB16ToRGBQuad | ( | color_t | c ) | [inherited] |
This method converts a 16-bit color value into a 24-bit RGB Quad.
RRRR RGGG GGGB BBBB.
- Parameters:
-
c is the 16-bit color.
- See also:
- color_t
- Returns:
- an RGBQUAD value.
- See also:
- RGBQUAD
Definition at line 348 of file GraphicsDisplay.cpp.
| color_t RGBQuadToRGB16 | ( | RGBQUAD * | colorPalette, |
| uint16_t | i | ||
| ) | [inherited] |
This method returns the color value from a palette.
This method accepts a pointer to a Bitmap color palette, which is a table in memory composed of RGB Quad values (r, g, b, 0), and an index into that table. It then extracts the color information and downsamples it to a color_t value which it returns.
- Note:
- This method probably has very little value outside of the internal methods for reading BMP files.
- Parameters:
-
colorPalette is the handle to the color palette to use. i is the index into the color palette.
- Returns:
- the color in color_t format.
Definition at line 337 of file GraphicsDisplay.cpp.
| RetCode_t roundrect | ( | loc_t | x1, |
| loc_t | y1, | ||
| loc_t | x2, | ||
| loc_t | y2, | ||
| dim_t | radius1, | ||
| dim_t | radius2, | ||
| fill_t | fillit = NOFILL |
||
| ) |
Draw a rectangle with rounded corners.
This draws a rounded rectangle. A numbers of checks are made on the values, and it could reduce this to drawing a line (if either x1 == x2, or y1 == y2), or a single point (x1 == x2 && y1 == y2). If the radius parameters are > 1/2 the length of that side (width or height), an error value is returned.
- Parameters:
-
x1 is the horizontal start of the line and must be <= x2. y1 is the vertical start of the line and must be <= y2. x2 is the horizontal end of the line and must be >= x1. y2 is the vertical end of the line and must be >= y1. radius1 defines the horizontal radius of the curved corner. Take care that this value < 1/2 the width of the rectangle, or bad_parameter is returned. radius2 defines the vertical radius of the curved corner. Take care that this value < 1/2 the height of the rectangle, or bad_parameter is returned. fillit is optional to FILL the rectangle. default is NOFILL.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 763 of file RA8875.cpp.
| RetCode_t roundrect | ( | loc_t | x1, |
| loc_t | y1, | ||
| loc_t | x2, | ||
| loc_t | y2, | ||
| dim_t | radius1, | ||
| dim_t | radius2, | ||
| color_t | color, | ||
| fill_t | fillit = NOFILL |
||
| ) |
Draw a rectangle with rounded corners using the specified color.
This draws a rounded rectangle. A numbers of checks are made on the values, and it could reduce this to drawing a line (if either x1 == x2, or y1 == y2), or a single point (x1 == x2 && y1 == y2). If the radius parameters are > 1/2 the length of that side (width or height), an error value is returned.
- Note:
- As a side effect, this changes the current foreground color for subsequent operations.
- Parameters:
-
x1 is the horizontal start of the line and must be <= x2. y1 is the vertical start of the line and must be <= y2. x2 is the horizontal end of the line and must be >= x1. y2 is the vertical end of the line and must be >= y1. radius1 defines the horizontal radius of the curved corner. Take care that this value < 1/2 the width of the rectangle, or bad_parameter is returned. radius2 defines the vertical radius of the curved corner. Take care that this value < 1/2 the height of the rectangle, or bad_parameter is returned. color defines the foreground color. fillit is optional to FILL the rectangle. default is NOFILL.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 755 of file RA8875.cpp.
| int rows | ( | void | ) | [virtual] |
get the number of rows based on the currently active font
- Returns:
- number of rows.
Reimplemented from GraphicsDisplay.
Definition at line 264 of file RA8875.cpp.
| RetCode_t SelectLayer | ( | uint16_t | layer ) |
Select the layer for subsequent commands.
If the screen configuration is 480 x 272, or if it is 800 x 480 and 8-bit color, the the display supports two layers, which can be independently drawn on and shown. Additionally, complex operations involving both layers are permitted.
- Note:
- The user manual refers to Layer 1 and Layer 2, however the actual register values are value 0 and 1. This and other APIs use the values 0 and 1.
- Parameters:
-
layer selects the layer for subsequence commands, where the values 0 and 1 represent layers 1 and 2 (as referred to in the user manual).
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 75 of file RA8875.cpp.
| RetCode_t set_font | ( | const unsigned char * | font = NULL ) |
[virtual] |
Select a bitmap font (provided by the user) for all subsequent text.
- Note:
- Tool to create the fonts is accessible from its creator available at http://www.mikroe.com. Change the data to an array of type char[].
- Parameters:
-
font is a pointer to a specially formed font array. This special font array has a 4-byte header, followed by the data: - the number of bytes per char
- the vertical size in pixels for each character
- the horizontal size in pixels for each character
- the number of bytes per vertical line (width of the array)
- Returns:
- error code.
Reimplemented from GraphicsDisplay.
Definition at line 996 of file RA8875.cpp.
| RetCode_t SetGraphicsCursor | ( | loc_t | x, |
| loc_t | y | ||
| ) | [virtual] |
Prepare the controller to write binary data to the screen by positioning the memory cursor.
- Parameters:
-
x is the horizontal position in pixels (from the left edge) y is the vertical position in pixels (from the top edge)
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Implements GraphicsDisplay.
Definition at line 540 of file RA8875.cpp.
| RetCode_t SetGraphicsCursorRead | ( | loc_t | x, |
| loc_t | y | ||
| ) | [virtual] |
Prepare the controller to read binary data from the screen by positioning the memory read cursor.
- Parameters:
-
x is the horizontal position in pixels (from the left edge) y is the vertical position in pixels (from the top edge)
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Implements GraphicsDisplay.
Definition at line 548 of file RA8875.cpp.
| RetCode_t SetLayerMode | ( | uint8_t | mode ) |
Set the Layer presentation mode.
This sets the presentation mode for layers, and permits showing a single layer, or applying a mode where the two layers are combined using one of the hardware methods.
- Parameters:
-
mode sets the mode in the Layer Transparency Register.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 90 of file RA8875.cpp.
| RetCode_t SetLayerTransparency | ( | uint8_t | layer1, |
| uint8_t | layer2 | ||
| ) |
Set the layer transparency for each layer.
Set the transparency, where the range of values is from zero (fully visible) to eight (fully transparent). The input value is automatically limited to this range.
- Parameters:
-
layer1 sets the layer 1 transparency. layer2 sets the layer 2 transparency.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 97 of file RA8875.cpp.
| RetCode_t SetTextCursor | ( | loc_t | x, |
| loc_t | y | ||
| ) |
Prepare the controller to write text to the screen by positioning the cursor.
- Parameters:
-
x is the horizontal position in pixels (from the left edge) y is the vertical position in pixels (from the top edge)
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 291 of file RA8875.cpp.
| RetCode_t SetTextCursorControl | ( | cursor_t | cursor = NOCURSOR, |
| bool | blink = false |
||
| ) |
Configure additional Cursor Control settings.
This API lets you modify other cursor control settings; Cursor visible/hidden, Cursor blink/normal, Cursor I-Beam/underscore/box.
- Parameters:
-
cursor can be set to NOCURSOR (default), IBEAM, UNDER, or BLOCK. blink can be set to true or false (default false)
- Returns:
- success/failure code.
- See also:
- RetCode_t
Definition at line 318 of file RA8875.cpp.
| RetCode_t SetTextFont | ( | RA8875::font_t | font = ISO8859_1 ) |
Select the ISO 8859-X font to use next.
Supported fonts: ISO 8859-1, -2, -3, -4
- Parameters:
-
font selects the font for the subsequent text rendering.
- Note:
- if either hScale or vScale is outside of its permitted range, the command is not executed.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 356 of file RA8875.cpp.
| RetCode_t SetTextFontControl | ( | fill_t | fillit = FILL, |
| RA8875::font_angle_t | angle = normal, |
||
| RA8875::HorizontalScale | hScale = 1, |
||
| RA8875::VerticalScale | vScale = 1, |
||
| RA8875::alignment_t | alignment = align_none |
||
| ) |
Control the font behavior.
This command lets you make several modifications to any text that is written.
Options can be combined: Default:
- Full alignment disabled,
- Font with Background color,
- Font in normal orientiation,
- Horizontal scale x 1
- Vertical scale x 1
- alignment
- Parameters:
-
fillit defaults to FILL, but can be NOFILL angle defaults to normal, but can be rotated hScale defaults to 1, but can be 1, 2, 3, or 4, and scales the font size by this amount. vScale defaults to 1, but can be 1, 2, 3, or 4, and scales the font size by this amount. alignment defaults to align_none, but can be align_full.
- Note:
- if either hScale or vScale is outside of its permitted range, the command is not executed.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 367 of file RA8875.cpp.
| RetCode_t SetTextFontSize | ( | RA8875::HorizontalScale | hScale = 1, |
| RA8875::VerticalScale | vScale = -1 |
||
| ) |
Control the font size.
This command lets you set the font enlargement for both horizontal and vertical, independent of the rotation, background, and alignment.
- See also:
- SetTextFontControl.
- Parameters:
-
hScale defaults to 1, but can be 1, 2, 3, or 4, and scales the font size by this amount. vScale is an optional parameter that defaults to the hScale value, but can be 1, 2, 3, or 4, and scales the font size by this amount.
lcd.SetTextFontSize(2); // Set the font to 2x normal size lcd.SetTextFontSize(2,3); // Set the font to 2x Width and 3x Height lcd.SetTextFontSize(); // Restore to normal size in both dimensions
- Note:
- if either hScale or vScale is outside of its permitted range, the command is not executed.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 393 of file RA8875.cpp.
| RetCode_t triangle | ( | loc_t | x1, |
| loc_t | y1, | ||
| loc_t | x2, | ||
| loc_t | y2, | ||
| loc_t | x3, | ||
| loc_t | y3, | ||
| color_t | color, | ||
| fill_t | fillit = NOFILL |
||
| ) |
Draw a triangle in the specified color.
- Note:
- As a side effect, this changes the current foreground color for subsequent operations.
- Parameters:
-
x1 is the horizontal for point 1. y1 is the vertical for point 1. x2 is the horizontal for point 2. y2 is the vertical for point 2. x3 is the horizontal for point 3. y3 is the vertical for point 3. color defines the foreground color. fillit is optional to FILL the rectangle. default is NOFILL.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 801 of file RA8875.cpp.
| RetCode_t triangle | ( | loc_t | x1, |
| loc_t | y1, | ||
| loc_t | x2, | ||
| loc_t | y2, | ||
| loc_t | x3, | ||
| loc_t | y3, | ||
| fill_t | fillit = NOFILL |
||
| ) |
Draw a triangle.
Draws a triangle using the foreground color setting.
- Parameters:
-
x1 is the horizontal for point 1. y1 is the vertical for point 1. x2 is the horizontal for point 2. y2 is the vertical for point 2. x3 is the horizontal for point 3. y3 is the vertical for point 3. fillit is optional to FILL the rectangle. default is NOFILL.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 823 of file RA8875.cpp.
| dim_t width | ( | void | ) | [virtual] |
get the screen width in pixels
- Returns:
- screen width in pixels.
Implements GraphicsDisplay.
Definition at line 270 of file RA8875.cpp.
| RetCode_t window | ( | loc_t | x, |
| loc_t | y, | ||
| dim_t | width, | ||
| dim_t | height | ||
| ) | [virtual] |
Set the window, which controls where items are written to the screen.
When something hits the window width, it wraps back to the left side and down a row. If the initial write is outside the window, it will be captured into the window when it crosses a boundary.
- Parameters:
-
x is the left edge in pixels. y is the top edge in pixels. width is the window width in pixels. height is the window height in pixels.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Reimplemented from GraphicsDisplay.
Definition at line 558 of file RA8875.cpp.
| RetCode_t WriteCommand | ( | unsigned char | command, |
| unsigned int | data = 0xFFFF |
||
| ) | [virtual] |
Write a command to the display.
This is a high level command, and may invoke several primitives.
- Parameters:
-
command is the command to write. data is optional data to be written to the command register and only occurs if the data is in the range [0 - 0xFF].
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Implements GraphicsDisplay.
Definition at line 155 of file RA8875.cpp.
| RetCode_t WriteCommandW | ( | uint8_t | command, |
| uint16_t | data | ||
| ) |
Write a command to the display with a word of data.
This is a high level command, and may invoke several primitives.
- Parameters:
-
command is the command to write. data is data to be written to the command register.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 135 of file RA8875.cpp.
| RetCode_t WriteData | ( | unsigned char | data ) | [virtual] |
Write a data byte to the display.
This is a high level command, and may invoke several primitives.
- Parameters:
-
data is the data to write.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Implements GraphicsDisplay.
Definition at line 180 of file RA8875.cpp.
| RetCode_t WriteDataW | ( | uint16_t | data ) |
Write a data word to the display.
This is a high level command, and may invoke several primitives.
- Parameters:
-
data is the data to write.
- Returns:
- success/failure code.
- See also:
- RetCode_t.
Definition at line 169 of file RA8875.cpp.
Generated on Tue Jul 12 2022 21:36:16 by
1.7.2
