CircleOS  1
Functions
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)
 
tFontDefLCD_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

void LCD_ChangeFont ( enum ENUM_FontID  ID)

Change the current font and its definition.

Parameters
[in]ID: the font's ID

Definition at line 692 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]xThe horizontal coordinate of the character.
[in]yThe vertical coordinate of the character.
[in]asciiThe ASCII code of the character to display.
Ascii must be higher than 31 and lower than 255.
[in]textColorThe color used to draw the character.
[in]bGndColorThe background color of the drawn character.
[in]charMagCoeffThe magnify coefficient used to draw the character.
Warning
The (0x0) point in on the low left corner.

Definition at line 436 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]xThe horizontal coordinate of the rectangle low left corner.
[in]yThe vertical coordinate of the rectangle low left corner.
[in]widthThe rectangle width in pixels.
[in]heightThe rectangle height in pixels.
[in]colorThe RGB color to draw the rectangle with.
Warning
The (0x0) point in on the low left corner.

Definition at line 402 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]xThe horizontal coordinate of the rectangle low left corner.
[in]yThe vertical coordinate of the rectangle low left corner.
[in]widthThe rectangle width in pixels.
[in]heightThe rectangle height in pixels.
[in]colorThe RGB color to fill the rectangle with.
Warning
The (0x0) point in on the low left corner.

Definition at line 345 of file lcd.c.

backlight_t LCD_GetBackLight ( void  )

Returns le LCD PWM rate.

Returns
The current LCD PWM rate.

Definition at line 515 of file lcd.c.

tFontDef* LCD_GetFontDef ( void  )

Get the current font definition.

Returns
: Pointer of the curent font definition structure

Definition at line 659 of file lcd.c.

bool LCD_GetRotateScreen ( void  )

Return the screen rotation mode.

Return values
0screen rotation is disabled.
1screen rotation is enabled.

Definition at line 555 of file lcd.c.

coord_t LCD_GetScreenHeight ( void  )

Get the screen height

Returns
Height of the screen in pixels.

Definition at line 781 of file lcd.c.

Rotate_H12_V_Match_TypeDef LCD_GetScreenOrientation ( void  )

Return current screen orientation.

Returns
A Rotate_H12_V_Match_TypeDef telling the current screen orientation.

Definition at line 599 of file lcd.c.

coord_t LCD_GetScreenWidth ( void  )

Get the screen width

Returns
Width of the screen in pixels.

Definition at line 763 of file lcd.c.

u8 LCD_GetTransparency ( void  )

Get the transparency value for the characters.

Returns
Current transparency value.

Definition at line 817 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]newBacklightStartThe new PWM rate.

Definition at line 458 of file lcd.c.

void LCD_SetBackLightOff ( void  )

Switch the LCD back light off.

Definition at line 481 of file lcd.c.

void LCD_SetBackLightOn ( void  )

Switch the LCD back light on.

Definition at line 497 of file lcd.c.

void LCD_SetDefaultFont ( void  )

Restore the default system font.

Definition at line 675 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 616 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 633 of file lcd.c.

void LCD_SetOffset ( ENUM_Offset  Offset)

Activate the offset

Parameters
[in]Offsetnew offset state
Note
OFFSET_OFF = no offset, OFFSET_ON = x pixels are turned black on each side of the screen.

Definition at line 721 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]RotateScreen0 to disable screen rotation and 1 to enable.

Definition at line 536 of file lcd.c.

void LCD_SetScreenOrientation ( Rotate_H12_V_Match_TypeDef  ScreenOrientation)

Set the screen orientation.

Parameters
[in]ScreenOrientationThe new screen orientation.

Definition at line 573 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 799 of file lcd.c.