Estoy tratando de descularlo pero nada che. Fijate a ver que hago mal
primero el array con los textos como variable gobal:
const char menu_AB[2][13] = {" Menu Ppal."," Ajustes"};
la definicion de las funciones:
void lcdText (unsigned int, unsigned int, char *);
void lcdString(char);
luego desde una funcion con la variable MiBuffer2[16] (ya que tienen que entrar diferentes tamaños de array)
strcpy (MiBuffer2, menu_AB[i + sumar]);
lcdText (1,1,*MiBuffer2);
y en las funciones que me pasaste:
void lcdString(char *string)
{
while (*string != '\0') //probé con el 0 pero tampoco anda y puse este por ser fin de cadena pero nada.
lcd_send_byte (1,*string++);
//printf(lcd_putc,"%c", *string++);
}
void lcdText (unsigned int x, unsigned int y, char *text)
{
lcd_gotoxy (x, y);
lcdString (text);
}
strcpy( )Hay que pasarle un string, y alli intentas hacer que analice dos variables...
strcopy( )
--------------------------------------------------------------------------------
Syntax:
strcpy (dest, src)
strcopy (dest, src)
Parameters:
dest is a pointer to a RAM array of characters.
src may be either a pointer to a RAM array of characters or it may be a constant string.
Returns:
undefined
Function:
Copies a constant or RAM string to a RAM string. Strings are terminated with a 0.
Availability:
All devices.
Requires:
Nothing
Examples:
char string[10], string2[10];
.
.
.
strcpy (string, "Hi There");
strcpy(string2,string);