Defines | |
| #define | abs(X) ( ( (X) < 0 ) ? -(X) : (X) ) |
| #define | sgn(X) ( ( (X) < 0 ) ? -1 : 1 ) |
Functions | |
| void | DRAW_SetCharMagniCoeff (u16 Coeff) |
| u16 | DRAW_GetCharMagniCoeff (void) |
| u16 | DRAW_GetTextColor (void) |
| void | DRAW_SetTextColor (u16 Color) |
| u16 | DRAW_GetBGndColor (void) |
| void | DRAW_SetBGndColor (u16 Color) |
| void | DRAW_Clear (void) |
| void | DRAW_SetLogoBW (void) |
| void | DRAW_SetImage (const u16 *imageptr, u8 x, u8 y, u8 width, u8 height) |
| Draw a color bitmap at the provided coordinates. | |
| void | DRAW_SetImageBW (const u8 *imageptr, u8 x, u8 y, u8 width, u8 height) |
| Draw a monochrome bitmap at the provided coordinates. | |
| void | DRAW_DisplayVbat (u8 x, u8 y) |
| void | DRAW_DisplayTime (u8 x, u8 y) |
| void | DRAW_DisplayString (u8 x, u8 y, const u8 *ptr, u8 len) |
| void | DRAW_DisplayStringInverted (u8 x, u8 y, const u8 *ptr, u8 len) |
| void | DRAW_SetDefaultColor (void) |
| void | DRAW_DisplayTemp (u8 x, u8 y) |
| void | DRAW_Line (s16 x1, s16 y1, s16 x2, s16 y2, u16 color) |
| #define abs | ( | X | ) | ( ( (X) < 0 ) ? -(X) : (X) ) |
| #define sgn | ( | X | ) | ( ( (X) < 0 ) ? -1 : 1 ) |
| void DRAW_Clear | ( | void | ) |
Clear the LCD display. Draw Batterie and butterfly if main display.
| void DRAW_DisplayString | ( | u8 | x, | |
| u8 | y, | |||
| const u8 * | ptr, | |||
| u8 | len | |||
| ) |
This function is used to display a 17 character max string of characters on the LCD display at the provided coordinates.
| [in] | x | The horizontal coordinate of the displayed string. |
| [in] | y | The vertical coordinate of the display string. |
| [in] | *ptr | Pointer to the string to display on LCD. |
| [in] | len | String length. |
| void DRAW_DisplayStringInverted | ( | u8 | x, | |
| u8 | y, | |||
| const u8 * | ptr, | |||
| u8 | len | |||
| ) |
This function is used to display a 17 character max string of characters on the LCD display at the provided coordinates with inverted colors.
| [in] | x | The horizontal coordinate of the displayed string. |
| [in] | y | The vertical coordinate of the display string. |
| [in] | *ptr | Pointer to the string to display on LCD. |
| [in] | len | String length. |
| void DRAW_DisplayTemp | ( | u8 | x, | |
| u8 | y | |||
| ) |
This function is used to display the current temperature in ascii. The choice between Celcius and Fahrenheit is fixed by UTIL_SetModeTemp()
| [in] | x | The horizontal coordinate of the displayed string. |
| [in] | y | The vertical coordinate of the display string. |
| void DRAW_DisplayTime | ( | u8 | x, | |
| u8 | y | |||
| ) |
This function is used to display time in ascii on the first line of LCD
| [in] | x | The horizontal coordinate of the displayed string. |
| [in] | y | The vertical coordinate of the display string. |
| void DRAW_DisplayVbat | ( | u8 | x, | |
| u8 | y | |||
| ) |
This function is used to display vbat in ascii
| [in] | x | The horizontal coordinate of the displayed string. |
| [in] | y | The vertical coordinate of the display string. |
| u16 DRAW_GetBGndColor | ( | void | ) |
Return current background color.
| u16 DRAW_GetCharMagniCoeff | ( | void | ) |
Return the current magnifying value for the characters
| u16 DRAW_GetTextColor | ( | void | ) |
Return current text color.
| void DRAW_Line | ( | s16 | x1, | |
| s16 | y1, | |||
| s16 | x2, | |||
| s16 | y2, | |||
| u16 | color | |||
| ) |
Draw a line on the LCD screen. Optimized for horizontal/vertical lines, and use the Bresenham algorithm for other cases.
| [in] | x1 | The x-coordinate of the first line endpoint. |
| [in] | x2 | The x-coordinate of the second line endpoint. |
| [in] | y1 | The y-coordinate of the first line endpoint. |
| [in] | y2 | The y-coordinate of the second line endpoint. |
| [in] | color | The line color. |
| void DRAW_SetBGndColor | ( | u16 | Color | ) |
Set current background color
| [in] | Color | The new RGB color for background. |
| void DRAW_SetCharMagniCoeff | ( | u16 | Coeff | ) |
Set the magnifying value for the characters (should be 1 or 2)
| [in] | Coeff | The new magnifying coefficent. |
| void DRAW_SetDefaultColor | ( | void | ) |
Reset text and background colors to their default values.
| void DRAW_SetImage | ( | const u16 * | imageptr, | |
| u8 | x, | |||
| u8 | y, | |||
| u8 | width, | |||
| u8 | height | |||
| ) |
The provided bitmap is made width * height 2 byte words. Each 2 byte word contains the RGB color of a pixel.
| [in] | imageptr | A pointer to an array of width * height 2 byte words. |
| [in] | x | The horizontal coordinate of the low left corner of the bitmap. |
| [in] | y | The vertical coordinate of the low left corner of the bitmap. |
| [in] | width | The bitmap width. |
| [in] | height | The bitmap height. |
| void DRAW_SetImageBW | ( | const u8 * | imageptr, | |
| u8 | x, | |||
| u8 | y, | |||
| u8 | width, | |||
| u8 | height | |||
| ) |
The provided bitmap is made of width * height bits where a set bit means a pixel drawn in the current text color, whereas an unset bit means a pixel drawn in the current background color.
| [in] | imageptr | A pointer to an array of width * height bits. |
| [in] | x | The horizontal coordinate of the low left corner of the bitmap. |
| [in] | y | The vertical coordinate of the low left corner of the bitmap. |
| [in] | width | The bitmap width. |
| [in] | height | The bitmap height. |
| void DRAW_SetLogoBW | ( | void | ) |
Draw the butterfly logo
| void DRAW_SetTextColor | ( | u16 | Color | ) |
Set current text color.
| [in] | Color | The new RGB color used when drawing text. |