lcd.c File Reference
The common LCD functions.
More...
Go to the source code of this file.
Functions |
| void | LCD_FillRect (coord_t x, coord_t y, coord_t width, coord_t height, color_t color) |
| void | LCD_DrawRect (coord_t x, coord_t y, coord_t width, coord_t height, color_t color) |
| void | LCD_DisplayChar (coord_t x, coord_t y, u8 ascii, color_t textColor, color_t bGndColor, mag_t charMagCoeff) |
| void | LCD_SetBackLight (backlight_t newBacklightStart) |
| void | LCD_SetBackLightOff (void) |
| void | LCD_SetBackLightOn (void) |
| backlight_t | LCD_GetBackLight (void) |
| void | LCD_SetRotateScreen (bool RotateScreen) |
| bool | LCD_GetRotateScreen (void) |
| void | LCD_SetScreenOrientation (Rotate_H12_V_Match_TypeDef ScreenOrientation) |
| Rotate_H12_V_Match_TypeDef | LCD_GetScreenOrientation (void) |
| void | LCD_SetFont (const u8 *NewFont) |
| void | LCD_SetFontDef (tFontDef *FontDef) |
| tFontDef * | LCD_GetFontDef (void) |
| void | LCD_SetDefaultFont (void) |
| void | LCD_ChangeFont (enum ENUM_FontID ID) |
| void | LCD_SetOffset (ENUM_Offset Offset) |
| coord_t | LCD_GetScreenWidth (void) |
| coord_t | LCD_GetScreenHeight (void) |
| void | LCD_SetTransparency (u8 NewTransparency) |
| u8 | LCD_GetTransparency (void) |
Detailed Description
- Author:
- FL
- Date:
- 07/2007
- Version:
- 4.0 Add Open4 Primer
- Date:
- 10/2009
Definition in file lcd.c.
Function Documentation
Change the current font and its definition.
- Parameters:
-
Definition at line 672 of file lcd.c.
| void LCD_DisplayChar |
( |
coord_t |
x, |
|
|
coord_t |
y, |
|
|
u8 |
ascii, |
|
|
color_t |
textColor, |
|
|
color_t |
bGndColor, |
|
|
mag_t |
charMagCoeff | |
|
) |
| | |
Display at provided coordinates the provided ASCII character with the provided text and background colors and with the provided magnify coefficient.
- Parameters:
-
| [in] | x | The horizontal coordinate of the character. |
| [in] | y | The vertical coordinate of the character. |
| [in] | ascii | The ASCII code of the character to display.
Ascii must be higher than 31 and lower than 255. |
| [in] | textColor | The color used to draw the character. |
| [in] | bGndColor | The background color of the drawn character. |
| [in] | charMagCoeff | The magnify coefficient used to draw the character. |
- Warning:
- The (0x0) point in on the low left corner.
Definition at line 422 of file lcd.c.
| void LCD_DrawRect |
( |
coord_t |
x, |
|
|
coord_t |
y, |
|
|
coord_t |
width, |
|
|
coord_t |
height, |
|
|
color_t |
color | |
|
) |
| | |
Draw a rectangle with a provided color.
- Parameters:
-
| [in] | x | The horizontal coordinate of the rectangle low left corner. |
| [in] | y | The vertical coordinate of the rectangle low left corner. |
| [in] | width | The rectangle width in pixels. |
| [in] | height | The rectangle height in pixels. |
| [in] | color | The RGB color to draw the rectangle with. |
- Warning:
- The (0x0) point in on the low left corner.
Definition at line 388 of file lcd.c.
| void LCD_FillRect |
( |
coord_t |
x, |
|
|
coord_t |
y, |
|
|
coord_t |
width, |
|
|
coord_t |
height, |
|
|
color_t |
color | |
|
) |
| | |
Fill a rectangle with a provided color.
- Parameters:
-
| [in] | x | The horizontal coordinate of the rectangle low left corner. |
| [in] | y | The vertical coordinate of the rectangle low left corner. |
| [in] | width | The rectangle width in pixels. |
| [in] | height | The rectangle height in pixels. |
| [in] | color | The RGB color to fill the rectangle with. |
- Warning:
- The (0x0) point in on the low left corner.
Definition at line 331 of file lcd.c.
| backlight_t LCD_GetBackLight |
( |
void |
|
) |
|
Returns le LCD PWM rate.
- Returns:
- The current LCD PWM rate.
Definition at line 501 of file lcd.c.
Get the current font definition.
- Returns:
- : Pointer of the curent font definition structure
Definition at line 639 of file lcd.c.
| bool LCD_GetRotateScreen |
( |
void |
|
) |
|
Return the screen rotation mode.
- Return values:
-
| 0 | screen rotation is disabled. |
| 1 | screen rotation is enabled. |
Definition at line 541 of file lcd.c.
| coord_t LCD_GetScreenHeight |
( |
void |
|
) |
|
Get the screen height
- Returns:
- Height of the screen in pixels.
Definition at line 761 of file lcd.c.
Return current screen orientation.
- Returns:
- A Rotate_H12_V_Match_TypeDef telling the current screen orientation.
Definition at line 579 of file lcd.c.
| coord_t LCD_GetScreenWidth |
( |
void |
|
) |
|
Get the screen width
- Returns:
- Width of the screen in pixels.
Definition at line 743 of file lcd.c.
| u8 LCD_GetTransparency |
( |
void |
|
) |
|
Get the transparency value for the characters.
- Returns:
- Current transparency value.
Definition at line 797 of file lcd.c.
| void LCD_SetBackLight |
( |
backlight_t |
newBacklightStart |
) |
|
Modify the PWM rate. Any value below BACKLIGHTMIN reset the value to the default value (DEFAULT_CCR_BACKLIGHTSTART).
- Parameters:
-
| [in] | newBacklightStart | The new PWM rate. |
Definition at line 444 of file lcd.c.
| void LCD_SetBackLightOff |
( |
void |
|
) |
|
Switch the LCD back light off.
Definition at line 467 of file lcd.c.
| void LCD_SetBackLightOn |
( |
void |
|
) |
|
Switch the LCD back light on.
Definition at line 483 of file lcd.c.
| void LCD_SetDefaultFont |
( |
void |
|
) |
|
Restore the default system font.
Definition at line 655 of file lcd.c.
| void LCD_SetFont |
( |
const u8 * |
NewFont |
) |
|
Change the current font, with the specified new one.
- Parameters:
-
| [in] | NewFont | : pointer on new font array |
Definition at line 596 of file lcd.c.
| void LCD_SetFontDef |
( |
tFontDef * |
FontDef |
) |
|
Change the current font definition to fit with a new current font.
- Parameters:
-
| [in] | FontDef | : Pointer of the new font definition structure |
Definition at line 613 of file lcd.c.
Activate the offset
- Parameters:
-
| [in] | Offset | new offset state |
- Note:
- OFFSET_OFF = no offset, OFFSET_ON = x pixels are turned black on each side of the screen.
Definition at line 701 of file lcd.c.
| void LCD_SetRotateScreen |
( |
bool |
RotateScreen |
) |
|
Enable or disable the ability of the screen display to rotate according to the MEMs information.
- Parameters:
-
| [in] | RotateScreen | 0 to disable screen rotation and 1 to enable. |
Definition at line 522 of file lcd.c.
Set the screen orientation.
- Parameters:
-
| [in] | ScreenOrientation | The new screen orientation. |
Definition at line 559 of file lcd.c.
| void LCD_SetTransparency |
( |
u8 |
NewTransparency |
) |
|
Set the transparency value for the characters
- Parameters:
-
| [in] | NewTransparency | : new transparency value. |
Definition at line 779 of file lcd.c.