你好,我在用TI提供的CC3000的例程在调试Wi-Fi的时候发现程序总是死在SPI.c 中 while (sSpiInformation.ulSpiState != eSPI_STATE_INITIALIZED) 这里,大概是哪里的原因,谢谢!
long SpiWrite(unsigned char *pUserBuffer, unsigned short usLength)
{
unsigned char ucPad = 0;
//
// Figure out the total length of the packet in order to figure out if there is padding or not
//
if(!(usLength & 0x0001))
{
ucPad++;
}
pUserBuffer[0] = WRITE;
pUserBuffer[1] = HI(usLength + ucPad);
pUserBuffer[2] = LO(usLength + ucPad);
pUserBuffer[3] = 0;
pUserBuffer[4] = 0;
usLength += (sizeof(btspi_hdr) + ucPad);
if (sSpiInformation.ulSpiState == eSPI_STATE_POWERUP)
{
while (sSpiInformation.ulSpiState != eSPI_STATE_INITIALIZED)
;
}
