aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-05-08 19:50:20 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-05-08 19:50:20 +0000
commit3d0610f1cceb8f13b5b73dfe4dfd855450e69664 (patch)
tree1d3488cd86157fb4b1e81082e5fb601b2b88a69a /testhal
parent060ddb0dfc442f41b846f9bdd05e75d1e07589f4 (diff)
downloadChibiOS-3d0610f1cceb8f13b5b73dfe4dfd855450e69664.tar.gz
ChibiOS-3d0610f1cceb8f13b5b73dfe4dfd855450e69664.tar.bz2
ChibiOS-3d0610f1cceb8f13b5b73dfe4dfd855450e69664.zip
SDC write seems to work.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2941 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal')
-rw-r--r--testhal/STM32/SDIO/main.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/testhal/STM32/SDIO/main.c b/testhal/STM32/SDIO/main.c
index bd5375910..075af2cc3 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 * 16];
+static uint8_t buf[SDC_BLOCK_SIZE * 2];
/*
* Application entry point.
@@ -52,9 +52,18 @@ int main(void) {
if (!sdcConnect(&SDCD1)) {
int i;
/* Repeated multiple reads.*/
- for (i = 0; i < 1000; i++)
- if (sdcRead(&SDCD1, 0, buf, 16))
+ for (i = 0; i < 5000; i++) {
+ if (sdcRead(&SDCD1, 0, buf, 2))
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();
}
/*