int main(void)
{
spi_init();
unsigned char datas; //received data stored here
uint8_t x = 0;
while(1)
{
datas = 0x00;
datas = spi_operation(++x); //HERE I get the error
}
这在主函数中,这是声明的函数:
unsigned char spi_operation (unsigned char data)
{
SPDR = data;
while(!(SPSR & (1<<SPIF)));
return (SPDR);
}
错误在我评论的行上显示void value not ignored as it ought be