aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32F4xx/SDC/main.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-11-04 16:03:57 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-11-04 16:03:57 +0000
commite6fbbc4da8ddf97e053651ad3d38802429562a23 (patch)
tree4e2f29b4d9d9b034c306cbbc906ddf2f07f2d59e /testhal/STM32/STM32F4xx/SDC/main.c
parentb8352d5f4b945b307d5850b3bb2259e9ea3c75a8 (diff)
downloadChibiOS-e6fbbc4da8ddf97e053651ad3d38802429562a23.tar.gz
ChibiOS-e6fbbc4da8ddf97e053651ad3d38802429562a23.tar.bz2
ChibiOS-e6fbbc4da8ddf97e053651ad3d38802429562a23.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10939 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/STM32F4xx/SDC/main.c')
-rw-r--r--testhal/STM32/STM32F4xx/SDC/main.c8
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)) {