void LCDChar(char aChar, uint8_t aX, uint8_t aLine) { uint8_t y = aLine * G_CharHeight; GlyphSetXY (G_lcd, aX, y); GlyphChar(G_lcd, aChar); }
void lcdPutChar(char_t c) { if(c == '\r') { lcdColumn = 0; } else if(c == '\n') { lcdColumn = 0; lcdLine++; } else if(lcdLine < 8 && lcdColumn < 12) { //Display current character GlyphSetXY(lcdHandle, lcdColumn * 8, lcdLine * 8); GlyphChar(lcdHandle, c); //Advance the cursor position if(++lcdColumn >= 12) { lcdColumn = 0; lcdLine++; } } }
void LCDCharPos(char aChar, uint8_t aPos, uint8_t aLine) { uint8_t x; uint8_t y; x = aPos * G_CharWidth; y = aLine * G_CharHeight; GlyphSetXY (G_lcd, x, y); GlyphChar(G_lcd, aChar); }
/****************************************************************************** * ID : 12.0 * Outline : GlyphString * Include : Glyph.h * Function Name: GlyphString * Description : Draws the given character string in the currently chosen font at the * current X and Y top left starting pixel on the LCD Screen. * * Each character of the string is set from the start of the last character * by the number of aSpacing given. So if the font is say 8 pixels wide, * a good number to use here might be 10 pixels which would give you * two pixels between each character in the string. * * You must count the number of characters you wish to put to the LCD * screen and enter that number in the aLength variable. * Argument : aHandle - the Glyph handle setup by the LCD and Communications. * : aString - The given character string. * : aLength - The count of characters in the string * you wish to display on the LCD. * Return Value : 0=success, not 0= error * Calling Functions : main ******************************************************************************/ T_glyphError GlyphString(T_glyphHandle aHandle, uint8_t * aString, uint8_t aLength) { uint16_t nIndex = 0 ; nIndex = 0 ; while (nIndex < aLength) { GlyphChar(aHandle, aString[nIndex]) ; nIndex++ ; } return GLYPH_ERROR_NONE ; }