Hi. I have this warning:
- #169-D argument of type "volatile unsigned char *" is incompatible with parameter of type
"unsigned char *"
The code works but I'd like to understand what's the problem . This is part of the code :
I have this array in the main, and I use it as argument of a function on a separate library, where I fill this array :
MAIN :
volatile unsigned char IMEI[15];
Read_IMEI(IMEI);
LIBRARY :
//Read IMEI
//Retrurn 1 if the IMEI have sense. Also fill the IMEI array
unsigned int Read_IMEI(unsigned char array[])
{
unsigned int ret=1;
unsigned int z = 0;
unsigned int x = 0;
unsigned int y = 0;
unsigned int i = 0;
unsigned int j = 0;
Send_data_UARTA1(command_GSN,8);
//Wait 500 ms and check the response
__delay_cycles(8000000);
y=Counter_UART_A1-23;
i=Counter_UART_A1-4;
j=Counter_UART_A1-3;
if(Counter_UART_A1>23)
{
//Response is OK
if(String_UART_A1[i]=='O' && String_UART_A1[j]=='K')
{
//Check if the IMEI have sense
for(z=y,x=0 ; z<=y+14; z++,x++)
{
if((String_UART_A1[z] -'0')>=0 && (String_UART_A1[z]-'0')<=9)
{
array[x]=String_UART_A1[z];
}
else
{
ret= 0;
}
}
//Check the part of the iMEI with the Producer CODE
for(x=0 ; x<6; x++)
{
if(array[x]!=IMEI_PRODUCER_PART[x])
{
ret = 0;
}
}
}
else
{
ret=0;
}
}
else
{
ret=0;
}
//CLEAR INDEX
Counter_UART_A1=0;
return ret;
}
Thanks
Riccardo