From 6d58148a5270e9b0e64af4273c07fff11fb83b02 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 22 May 2011 07:06:19 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2993 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- testhal/STM32/SDIO/main.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'testhal') 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(); } -- cgit v1.2.3