Board Support
Version 1.0
Functions available when using the Board Software Components
|
Graphic LCD Interface. More...
Content | |
Configuration | |
Display configuration. | |
Color coding | |
Predefined colors. | |
Structures | |
struct | GLCD_FONT |
Font definitions. More... | |
Functions | |
int32_t | GLCD_Initialize (void) |
Initialize Graphic LCD. More... | |
int32_t | GLCD_Uninitialize (void) |
De-initialize Graphic LCD. More... | |
int32_t | GLCD_SetForegroundColor (uint32_t color) |
Set foreground color. More... | |
int32_t | GLCD_SetBackgroundColor (uint32_t color) |
Set background color. More... | |
int32_t | GLCD_ClearScreen (void) |
Clear screen (with active background color) More... | |
int32_t | GLCD_SetFont (GLCD_FONT *font) |
Set active font. More... | |
int32_t | GLCD_DrawPixel (uint32_t x, uint32_t y) |
Draw pixel (in active foreground color) More... | |
int32_t | GLCD_DrawHLine (uint32_t x, uint32_t y, uint32_t length) |
Draw horizontal line (in active foreground color) More... | |
int32_t | GLCD_DrawVLine (uint32_t x, uint32_t y, uint32_t length) |
Draw vertical line (in active foreground color) More... | |
int32_t | GLCD_DrawRectangle (uint32_t x, uint32_t y, uint32_t width, uint32_t height) |
Draw rectangle (in active foreground color) More... | |
int32_t | GLCD_DrawChar (uint32_t x, uint32_t y, int32_t ch) |
Draw character (in active foreground color) More... | |
int32_t | GLCD_DrawString (uint32_t x, uint32_t y, const char *str) |
Draw string (in active foreground color) More... | |
int32_t | GLCD_DrawBargraph (uint32_t x, uint32_t y, uint32_t width, uint32_t height, uint32_t val) |
Draw bargraph (in active foreground color) More... | |
int32_t | GLCD_DrawBitmap (uint32_t x, uint32_t y, uint32_t width, uint32_t height, const uint8_t *bitmap) |
Draw bitmap. More... | |
int32_t | GLCD_VScroll (uint32_t dy) |
Scroll picture on display vertically (newly scrolled in area should be filled with background color) More... | |
int32_t | GLCD_FrameBufferAccess (bool enable) |
Enable or disable direct access to FrameBuffer. More... | |
uint32_t | GLCD_FrameBufferAddress (void) |
Retrieve FrameBuffer address. More... | |
Graphic LCD Interface.
struct GLCD_FONT |
int32_t GLCD_ClearScreen | ( | void | ) |
Clear screen (with active background color)
The function clears the screen using the active background color. The function returns an integer value of 0 on success, and -1 on error.
int32_t GLCD_DrawBargraph | ( | uint32_t | x, |
uint32_t | y, | ||
uint32_t | width, | ||
uint32_t | height, | ||
uint32_t | val | ||
) |
Draw bargraph (in active foreground color)
[in] | x | Start x position in pixels (0 = left corner) |
[in] | y | Start y position in pixels (0 = upper corner) |
[in] | width | Full bargraph width in pixels |
[in] | height | Full bargraph height in pixels |
[in] | val | Active bargraph value (maximum value is 100) |
The function draws a bargraph in the active foreground color at position (x,y) with a given width, height, and value. The parameter x is the starting horizontal position in pixels (0 = left corner). The parameter y is the starting vertical position in pixels (0 = upper corner). The parameter width is the maximum width of the bargraph in pixel. The parameter height is the bargraph height in pixels. The parameter val is the value of the bargraph. The value range is [0..100]. The function returns an integer value of 0 on success, and -1 on error.
int32_t GLCD_DrawBitmap | ( | uint32_t | x, |
uint32_t | y, | ||
uint32_t | width, | ||
uint32_t | height, | ||
const uint8_t * | bitmap | ||
) |
Draw bitmap.
[in] | x | Start x position in pixels (0 = left corner) |
[in] | y | Start y position in pixels (0 = upper corner) |
[in] | width | Bitmap width in pixels |
[in] | height | Bitmap height in pixels |
[in] | bitmap | Bitmap data |
The function draws a graphical bitmap image at position (x,y), with a given width and height. The parameter x is the horizontal position. The parameter y is the vertical position. The parameter width is the width of the bitmap in pixels. The parameter height is the height of the bitmap in pixels. The parameter bitmap is a pointer to the bitmap data. The function returns an integer value of 0 on success, and -1 on error.
int32_t GLCD_DrawChar | ( | uint32_t | x, |
uint32_t | y, | ||
int32_t | ch | ||
) |
Draw character (in active foreground color)
[in] | x | x position in pixels (0 = left corner) |
[in] | y | y position in pixels (0 = upper corner) |
[in] | ch | Character |
The function draws a character in the active foreground color at position (x,y). The parameter x is the horizontal position in pixels (0 = left corner). The parameter y is the vertical position in pixels (0 = upper corner). The parameter ch is the character (index in the font table). The function returns an integer value of 0 on success, and -1 on error.
int32_t GLCD_DrawHLine | ( | uint32_t | x, |
uint32_t | y, | ||
uint32_t | length | ||
) |
Draw horizontal line (in active foreground color)
[in] | x | Start x position in pixels (0 = left corner) |
[in] | y | Start y position in pixels (0 = upper corner) |
[in] | length | Line length |
The function draws a horizontal line in the active foreground color at position (x,y) with a given length. Set the foreground color with the function GLCD_SetForegroundColor. The parameter x is the starting horizontal position in pixels (0 = left corner). The parameter y is the starting vertical position in pixels (0 = upper corner). The parameter length is the length of the line in pixels. The function returns an integer value of 0 on success, and -1 on error.
int32_t GLCD_DrawPixel | ( | uint32_t | x, |
uint32_t | y | ||
) |
Draw pixel (in active foreground color)
[in] | x | x position in pixels (0 = left corner) |
[in] | y | y position in pixels (0 = upper corner) |
The function draws a pixel in the defined foreground color at position (x,y). Set the foreground color with the function GLCD_SetForegroundColor. The parameter x is the horizontal position in pixels (0 = left corner). The parameter y is the vertical position in pixels (0 = upper corner). The function returns an integer value of 0 on success, and -1 on error.
int32_t GLCD_DrawRectangle | ( | uint32_t | x, |
uint32_t | y, | ||
uint32_t | width, | ||
uint32_t | height | ||
) |
Draw rectangle (in active foreground color)
[in] | x | Start x position in pixels (0 = left corner) |
[in] | y | Start y position in pixels (0 = upper corner) |
[in] | width | Rectangle width in pixels |
[in] | height | Rectangle height in pixels |
The function draws a rectangle in the active foreground color at position (x,y) with a given width and height. Set the foreground color with the function GLCD_SetForegroundColor. The parameter x is the starting horizontal position in pixels (0 = left corner). The parameter y is the starting vertical position in pixels (0 = upper corner). The parameter length is the lenght of the line in pixels. The function returns an integer value of 0 on success, and -1 on error.
int32_t GLCD_DrawString | ( | uint32_t | x, |
uint32_t | y, | ||
const char * | str | ||
) |
Draw string (in active foreground color)
[in] | x | x position in pixels (0 = left corner) |
[in] | y | y position in pixels (0 = upper corner) |
[in] | str | Null-terminated String |
The function draws a string in the active foreground color at position (x,y). The parameter x is the starting horizontal position in pixels (0 = left corner). The parameter y is the starting vertical position in pixels (0 = upper corner). The parameter str is a pointer to the Null-terminated string. The function returns an integer value of 0 on success, and -1 on error.
int32_t GLCD_DrawVLine | ( | uint32_t | x, |
uint32_t | y, | ||
uint32_t | length | ||
) |
Draw vertical line (in active foreground color)
[in] | x | Start x position in pixels (0 = left corner) |
[in] | y | Start y position in pixels (0 = upper corner) |
[in] | length | Line length in pixels |
The function draws a vertical line in the active foreground color at position (x,y) with a given length. Set the foreground color with the function GLCD_SetForegroundColor. The parameter x is the starting horizontal position in pixels (0 = left corner). The parameter y is the starting vertical position in pixels (0 = upper corner). The parameter length is the length of the line in pixels. The function returns an integer value of 0 on success, and -1 on error.
int32_t GLCD_FrameBufferAccess | ( | bool | enable | ) |
Enable or disable direct access to FrameBuffer.
[in] | enable | Enable or disable request
|
The function enables or disables direct access to FrameBuffer (Graphic RAM). The boolean parameter enable can have the value true to enable access, or false to disable access. The function returns an integer value of 0 on success, and -1 on error.
uint32_t GLCD_FrameBufferAddress | ( | void | ) |
Retrieve FrameBuffer address.
The function returns the FrameBuffer (Graphic RAM) address used for direct access.
int32_t GLCD_Initialize | ( | void | ) |
Initialize Graphic LCD.
The function initializes the Graphics LCD controller. The function returns an integer value of 0 on success, and -1 on error.
int32_t GLCD_SetBackgroundColor | ( | uint32_t | color | ) |
Set background color.
[in] | color | Color value |
The function sets the background color. The parameter color is the background color for text or graphics objects. Standard colors are defined in Color coding. The function returns an integer value of 0 on success, and -1 on error.
int32_t GLCD_SetFont | ( | GLCD_FONT * | font | ) |
Set active font.
[in] | font | Pointer to font structure |
The function sets the current font. The parameter font is a pointer to the font structure GLCD_FONT. The function returns an integer value of 0 on success, and -1 on error.
Example:
int32_t GLCD_SetForegroundColor | ( | uint32_t | color | ) |
Set foreground color.
[in] | color | Color value |
The function sets the foreground color. The parameter color is the foreground color for text or graphics objects. Standard colors are defined in Color coding. The function returns an integer value of 0 on success, and -1 on error.
int32_t GLCD_Uninitialize | ( | void | ) |
De-initialize Graphic LCD.
The function de-initializes the Graphics LCD controller. The function returns an integer value of 0 on success, and -1 on error.
int32_t GLCD_VScroll | ( | uint32_t | dy | ) |
Scroll picture on display vertically (newly scrolled in area should be filled with background color)
[in] | dy | Scroll size in pixels |
The function scrolls the whole display vertically up for dy pixels, and fills newly scrolled in area with background color. The function returns an integer value of 0 on success, and -1 on error.