diff options
Diffstat (limited to 'testhal/STM32/STM32F4xx/SDC/main.c')
-rw-r--r-- | testhal/STM32/STM32F4xx/SDC/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testhal/STM32/STM32F4xx/SDC/main.c b/testhal/STM32/STM32F4xx/SDC/main.c index 8078784a8..832e7202f 100644 --- a/testhal/STM32/STM32F4xx/SDC/main.c +++ b/testhal/STM32/STM32F4xx/SDC/main.c @@ -106,7 +106,7 @@ void cmd_sdc(BaseSequentialStream *chp, int argc, char *argv[]) { /* Single block read performance, aligned.*/
chprintf(chp, "Single block aligned read performance: ");
start = chVTGetSystemTime();
- end = start + MS2ST(1000);
+ end = chTimeAddX(start, TIME_MS2I(1000));
n = 0;
do {
if (blkRead(&SDCD1, startblk, buf, 1)) {
@@ -120,7 +120,7 @@ void cmd_sdc(BaseSequentialStream *chp, int argc, char *argv[]) { /* Multiple sequential blocks read performance, aligned.*/
chprintf(chp, "16 sequential blocks aligned read performance: ");
start = chVTGetSystemTime();
- end = start + MS2ST(1000);
+ end = chTimeAddX(start, TIME_MS2I(1000));
n = 0;
do {
if (blkRead(&SDCD1, startblk, buf, SDC_BURST_SIZE)) {
@@ -135,7 +135,7 @@ void cmd_sdc(BaseSequentialStream *chp, int argc, char *argv[]) { /* Single block read performance, unaligned.*/
chprintf(chp, "Single block unaligned read performance: ");
start = chVTGetSystemTime();
- end = start + MS2ST(1000);
+ end = chTimeAddX(start, TIME_MS2I(1000));
n = 0;
do {
if (blkRead(&SDCD1, startblk, buf + 1, 1)) {
@@ -149,7 +149,7 @@ void cmd_sdc(BaseSequentialStream *chp, int argc, char *argv[]) { /* Multiple sequential blocks read performance, unaligned.*/
chprintf(chp, "16 sequential blocks unaligned read performance: ");
start = chVTGetSystemTime();
- end = start + MS2ST(1000);
+ end = chTimeAddX(start, TIME_MS2I(1000));
n = 0;
do {
if (blkRead(&SDCD1, startblk, buf + 1, SDC_BURST_SIZE)) {
|