Draw simple characters or full lines.
More...
|
file | text.c |
| Simple graphic library draw text functionality.
Draw simple characters or full lines.
|
|
|
static void | LCD_DrawChar (uint16_t Xpos, uint16_t Ypos, LCDCOLOR BackColor, LCDCOLOR TextColor, FONT_T *Font, void *ptr) |
| Draws a character on LCD. More...
|
|
void | LCD_SetTextColor (LCDCOLOR Color) |
| Sets the Text color. More...
|
|
void | LCD_SetBackColor (LCDCOLOR Color) |
| Sets the Background color. More...
|
|
void | LCD_SetFont (FONT_T *Font) |
| Sets the current font. More...
|
|
FONT_T * | LCD_GetFont (void) |
| Gets the current font. More...
|
|
uint8_t | LCD_GetLineCount (void) |
| Gets the current count of possible lines. More...
|
|
void | LCD_ClearLine (uint8_t Line) |
| Clears the selected line. More...
|
|
void | LCD_DisplayCharXY (uint16_t x, uint16_t y, char Ascii) |
| Displays one character (16dots width, 24dots height) on the LCD. Position is set with a x- and a y-coordinate. More...
|
|
void | LCD_DisplayCharLine (uint8_t Line, uint8_t Column, char Ascii) |
| Displays one character (16dots width, 24dots height) on the LCD. Position is set with a line and a column. More...
|
|
void | LCD_DisplayStringXY (uint16_t x, uint16_t y, const char *ptr) |
| Displays a string on the LCD. Position is set with the x- and y-coordinate. More...
|
|
void | LCD_DisplayStringLine (uint8_t Line, const char *ptr) |
| Displays a string on a line on the LCD. Position is set with a line number. More...
|
|
void | LCD_DisplayStringCenterLine (uint8_t Line, const char *ptr) |
| Displays a string on the LCD. Position is set at the y-coordinate on center of the display. More...
|
|
Draw simple characters or full lines.
void LCD_ClearLine |
( |
uint8_t |
Line | ) |
|
Clears the selected line.
- Parameters
-
[in] | Line | The Line to be cleared. This parameter can be one of the following values:
- Linex: where x can be 0..9
|
Definition at line 186 of file text.c.
void LCD_DisplayCharLine |
( |
uint8_t |
Line, |
|
|
uint8_t |
Column, |
|
|
char |
Ascii |
|
) |
| |
Displays one character (16dots width, 24dots height) on the LCD. Position is set with a line and a column.
- Parameters
-
[in] | Line | The Line where to display the character shape. This parameter can be one of the following values:
- Linex: where x can be 0..9
|
[in] | Column | Start column address. |
[in] | Ascii | Character ascii code, must be between 0x20 and 0x7E. |
Definition at line 223 of file text.c.
void LCD_DisplayCharXY |
( |
uint16_t |
x, |
|
|
uint16_t |
y, |
|
|
char |
Ascii |
|
) |
| |
Displays one character (16dots width, 24dots height) on the LCD. Position is set with a x- and a y-coordinate.
- Parameters
-
[in] | x | X-Position in pixel |
[in] | y | Y-Position in pixel |
[in] | Ascii | Character ascii code, must be between 0x20 and 0x7E. |
Definition at line 199 of file text.c.
void LCD_DisplayStringCenterLine |
( |
uint8_t |
Line, |
|
|
const char * |
ptr |
|
) |
| |
Displays a string on the LCD. Position is set at the y-coordinate on center of the display.
- Parameters
-
[in] | Line | The Line where to display the character shape. |
[in] | *ptr | Pointer to string to display on LCD. |
- Examples:
- bitmap.c, and geometry.c.
Definition at line 288 of file text.c.
void LCD_DisplayStringLine |
( |
uint8_t |
Line, |
|
|
const char * |
ptr |
|
) |
| |
Displays a string on a line on the LCD. Position is set with a line number.
- Parameters
-
[in] | Line | The Line where to display the character shape. |
[in] | *ptr | Pointer to string to display on LCD. |
Definition at line 250 of file text.c.
void LCD_DisplayStringXY |
( |
uint16_t |
x, |
|
|
uint16_t |
y, |
|
|
const char * |
ptr |
|
) |
| |
Displays a string on the LCD. Position is set with the x- and y-coordinate.
- Parameters
-
[in] | x | X-Position in pixel |
[in] | y | Y-Position in pixel |
[in] | *ptr | Pointer to string to display on LCD. |
Definition at line 236 of file text.c.
static void LCD_DrawChar |
( |
uint16_t |
Xpos, |
|
|
uint16_t |
Ypos, |
|
|
LCDCOLOR |
BackColor, |
|
|
LCDCOLOR |
TextColor, |
|
|
FONT_T * |
Font, |
|
|
void * |
ptr |
|
) |
| |
|
static |
Draws a character on LCD.
- Parameters
-
[in] | Xpos | Specifies the X position. |
[in] | Ypos | Specifies the Y position. |
[in] | BackColor | Specifies the Background color code RGB(5-6-5). |
[in] | TextColor | Specifies the Text color code RGB(5-6-5). |
[in] | Font | Fonttype to use font.h. |
[in] | ptr | Pointer to the character data. |
Definition at line 113 of file text.c.
Gets the current font.
- Returns
- Pointer to the current font.
Definition at line 168 of file text.c.
uint8_t LCD_GetLineCount |
( |
void |
| ) |
|
Gets the current count of possible lines.
- Returns
- Number of possible lines.
Definition at line 176 of file text.c.
Sets the Background color.
- Parameters
-
[in] | Color | specifies the Background color code RGB(5-6-5). |
Definition at line 152 of file text.c.
void LCD_SetFont |
( |
FONT_T * |
Font | ) |
|
Sets the Text color.
- Parameters
-
[in] | Color | specifies the Text color code RGB(5-6-5). |
Definition at line 144 of file text.c.