uchar * Fun_SpiS_RW( uchar * val , uchar len ) //读写SPI级联设备的函数
{
while(len)
{
len--;
* val = Fun_SPI_RW(* val);
val ++ ;
}
SS_SPI = 0;
SS_SPI = 1;
return (val);
}
调用:
*SPI_Key = Fun_SpiS_RW( *SPI_Dsp, 3);
编译后出现警告
../test.c:131: warning: passing argument 1 of 'Fun_SpiS_RW' makes pointer from integer without a cast
../test.c:131: warning: assignment makes integer from pointer without a cast
Fun_SpiS_RW 函数是正确的,问题是如何调用,才能消除告警 |