我用STM32驱动W5500成功了,不过成立有个地方不明白,想请教大家。
unsigned char Read_W5500_1Byte(unsigned short reg)
{
unsigned char i;
GPIO_ResetBits(W5500_SCS_PORT, W5500_SCS);//ÖÃW5500µÄSCSΪµÍµçƽ
SPI1_Send_Short(reg);//ͨ¹ýSPI1д16λ¼Ä´æÆ÷µØÖ·
SPI1_Send_Byte(FDM1|RWB_READ|COMMON_R);//ͨ¹ýSPI1д¿ØÖÆ×Ö½Ú,1¸ö×Ö½ÚÊý¾Ý³¤¶È,¶ÁÊý¾Ý,Ñ¡ÔñͨÓüĴæÆ÷
i=SPI_I2S_ReceiveData(SPI1);
SPI1_Send_Byte(0x00);//·¢ËÍÒ»¸öÑÆÊý¾Ý
i=SPI_I2S_ReceiveData(SPI1);//¶ÁÈ¡1¸ö×Ö½ÚÊý¾Ý
GPIO_SetBits(W5500_SCS_PORT, W5500_SCS);//ÖÃW5500µÄSCSΪ¸ßµçƽ
return i;//·µ»Ø¶ÁÈ¡µ½µÄ¼Ä´æÆ÷Êý¾Ý
}
请问粗体斜体的那句有什么作用?我看不懂,请指教,谢谢!
更多回帖