Hi
I'm writing a program for UART communication with a PIC16F887 as master and a PIC 16F886 as slave. I use MPLABX and XC8 compiler.
I've made a library whit this function:
void lee_cad_usart(char *buf, char longitud)
{
PORTBbits.RB0 = 0;
while(*buf!='\0')
{
PORTBbits.RB0 ^= 1;
while(RCIF == 0){}
*buf++ = lee_usart();
__delay_us(100);
if(!RCIF&&RCIDL)
{
*buf = '\0';
break;
}
}
}
In the master I write:
I declare the array:
char *dato[20];
and in the void main()
lee_cad_usart(*dato, 20);
But in compiling I receive a warning: warning: (1498) pointer (lee_cad_usart@buf) in expression may have no targets
I don't understand why
May somebody help me please
Regards
I'm writing a program for UART communication with a PIC16F887 as master and a PIC 16F886 as slave. I use MPLABX and XC8 compiler.
I've made a library whit this function:
void lee_cad_usart(char *buf, char longitud)
{
PORTBbits.RB0 = 0;
while(*buf!='\0')
{
PORTBbits.RB0 ^= 1;
while(RCIF == 0){}
*buf++ = lee_usart();
__delay_us(100);
if(!RCIF&&RCIDL)
{
*buf = '\0';
break;
}
}
}
In the master I write:
I declare the array:
char *dato[20];
and in the void main()
lee_cad_usart(*dato, 20);
But in compiling I receive a warning: warning: (1498) pointer (lee_cad_usart@buf) in expression may have no targets
I don't understand why
May somebody help me please
Regards