update msd.c

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1242 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
wuyangyong 2011-01-15 02:51:57 +00:00
parent 93ee3dbfc0
commit dede5414de
1 changed files with 6 additions and 1 deletions

View File

@ -710,6 +710,11 @@ void MSD_WriteByte(u8 Data)
while (SPI_I2S_GetFlagStatus(MSD_SPI, SPI_I2S_FLAG_TXE) == RESET);
/* Send the byte */
SPI_I2S_SendData(MSD_SPI, Data);
/*!< Wait to receive a byte*/
while(SPI_I2S_GetFlagStatus(MSD_SPI, SPI_I2S_FLAG_RXNE) == RESET);
/*!< Return the byte read from the SPI bus */
SPI_I2S_ReceiveData(MSD_SPI);
}
/*******************************************************************************