futz
Active Member
Here's the part of the code in question (with some irrelevant lines left out):
Now why does MPLAB/C30 give me this warning?
According to O'Reilly's **broken link removed** that's the way to do it.
It seems to work anyway, but I always like to get rid of warnings if possible.
Code:
void lcd_string(char *);
char sentence[16] = "dsPIC 30F4013";
int main(void)
{
lcd_string(&sentence); //send string to LCD
for(;;){} //spin forever
return 0;
}
void lcd_string(char *senpoint)
{
while(*senpoint != '\0')
{
lcd_char(*senpoint);
senpoint++;
}
}
lcd_4bit_2.c:38: warning: passing argument 1 of 'lcd_string' from incompatible pointer type
According to O'Reilly's **broken link removed** that's the way to do it.
It seems to work anyway, but I always like to get rid of warnings if possible.