diff options
| author | wuyangyong <[email protected]> | 2011-01-15 02:51:57 +0000 |
|---|---|---|
| committer | wuyangyong <[email protected]> | 2011-01-15 02:51:57 +0000 |
| commit | dede5414decc94bcdf8730c44a855be042fadbde (patch) | |
| tree | d36671824afb88066de057254570ed33253c5f2f | |
| parent | 93ee3dbfc0abf25cae2fac8eb709174bbcf0580b (diff) | |
update msd.c
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1242 bbd45198-f89e-11dd-88c7-29a3b14d5316
| -rw-r--r-- | bsp/stm3210/msd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bsp/stm3210/msd.c b/bsp/stm3210/msd.c index 654a97e5db..48b8662a77 100644 --- a/bsp/stm3210/msd.c +++ b/bsp/stm3210/msd.c @@ -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);
} /******************************************************************************* @@ -792,7 +797,7 @@ void SPI_Config(void) /* * RT-Thread SD Card Driver * 2009-04-17 Bernard first version - * 2010-07-15 Modify read/write according new block driver interface + * 2010-07-15 Modify read/write according new block driver interface */ #include <rtthread.h> #include <dfs_fs.h> |
