we want to show time in lcd screen (show a register that defined as unit8_t)
The function that show the value that in the register (unit_8 static): (lcd_writestringvalue ("the time is",*register,glcd_decformt_c)
if the *register is static - the function display the content if its unit8_t it dosen't.
How its supposed to be?? what to chang in the fun to be able to display unit8_t register.
thank you?
void LCD_WriteString
(
uint8_t line, /* IN: Line in display */
uint8_t *pstr /* Pointer to text string */
)
{
uint8_t len;
uint8_t x;
uint8_t *error = "Wrong line 1 & 2";
if( line == 2 ) {
LCDLine(LineTwo);
}
else if ( line == 1 ) {
LCDLine(LineOne);
}
else {
LCD_ClearDisplay();
LCDLine(LineOne);
pstr = error;
}
len = GetStrlen(pstr);
for ( x = 0; x < len; x++ ) {
LCD_WriteChar( pstr[x] );
}
/* Clear the rest of the line */
for ( ; x < gMAX_LCD_CHARS_c; x++ ) {
LCD_WriteChar( ' ' );
}