diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-05-22 07:06:19 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-05-22 07:06:19 +0000 |
commit | 6d58148a5270e9b0e64af4273c07fff11fb83b02 (patch) | |
tree | 68e110a336c24eda0e26c753530fd20fb4421b1b /testhal/STM32/SDIO | |
parent | bf5a88b425eb989d597e91d8b338bc4203bfc86e (diff) | |
download | ChibiOS-6d58148a5270e9b0e64af4273c07fff11fb83b02.tar.gz ChibiOS-6d58148a5270e9b0e64af4273c07fff11fb83b02.tar.bz2 ChibiOS-6d58148a5270e9b0e64af4273c07fff11fb83b02.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2993 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/SDIO')
-rw-r--r-- | testhal/STM32/SDIO/main.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/testhal/STM32/SDIO/main.c b/testhal/STM32/SDIO/main.c index 075af2cc3..8c5452ed7 100644 --- a/testhal/STM32/SDIO/main.c +++ b/testhal/STM32/SDIO/main.c @@ -28,7 +28,7 @@ static const SDCConfig sdccfg = { 0
};
-static uint8_t buf[SDC_BLOCK_SIZE * 2];
+static uint8_t blkbuf[SDC_BLOCK_SIZE * 4];
/*
* Application entry point.
@@ -53,15 +53,18 @@ int main(void) { int i;
/* Repeated multiple reads.*/
for (i = 0; i < 5000; i++) {
- if (sdcRead(&SDCD1, 0, buf, 2))
+ if (sdcRead(&SDCD1, 0, blkbuf, 4))
+ chSysHalt();
+ }
+ /* Repeated multiple write.*/
+ for (i = 0; i < 100; i++) {
+ if (sdcRead(&SDCD1, 0x10000, blkbuf, 4))
+ chSysHalt();
+ if (sdcWrite(&SDCD1, 0x10000, blkbuf, 4))
+ chSysHalt();
+ if (sdcWrite(&SDCD1, 0x10000, blkbuf, 4))
chSysHalt();
}
- if (sdcRead(&SDCD1, 0x10000, buf, 2))
- chSysHalt();
- if (sdcWrite(&SDCD1, 0x10000, buf, 2))
- chSysHalt();
- if (sdcRead(&SDCD1, 0x10000, buf, 2))
- chSysHalt();
if (sdcDisconnect(&SDCD1))
chSysHalt();
}
|