/****************************************************************************** * Function name : DisplayLCD * Description : This function controls the LCD writes. * The display supports 8 lines with up to 12 characters per line * Use the defines LCD_LINE1 to LCD_LINE8 to specfify the starting * position. * For example, to start at the 4th position on line 1: * DisplayLCD(LCD_LINE1 + 4, "Hello") * Arguments : uint8_t position - line number of display * const unit8_t * string - pointer to null terminated string * Return Value : none ******************************************************************************/ void DisplayLCD(uint8_t position, const uint8_t * string) { uint8_t y = position - (position % 8); uint8_t xOffset = (position % 8)<<3 ; /* Draw text lines, 8 pixels high, 96 pixels wide */ /* Clear the rectangle of this line */ GlyphEraseBlock(G_lcd, xOffset, y, (95 - xOffset), y+7); GlyphSetXY(G_lcd, xOffset, y); GlyphString(G_lcd, (uint8_t *)string, strlen((void *)string)); }
void LCDClearLine (uint8_t aLine) { uint8_t y = aLine * G_CharHeight; GlyphEraseBlock(G_lcd, 0u, y, 95u, y + 7u); }