git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2993 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
bf5a88b425
commit
6d58148a52
|
@ -28,7 +28,7 @@ static const SDCConfig sdccfg = {
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t buf[SDC_BLOCK_SIZE * 2];
|
static uint8_t blkbuf[SDC_BLOCK_SIZE * 4];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Application entry point.
|
* Application entry point.
|
||||||
|
@ -53,15 +53,18 @@ int main(void) {
|
||||||
int i;
|
int i;
|
||||||
/* Repeated multiple reads.*/
|
/* Repeated multiple reads.*/
|
||||||
for (i = 0; i < 5000; i++) {
|
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();
|
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))
|
if (sdcDisconnect(&SDCD1))
|
||||||
chSysHalt();
|
chSysHalt();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue