diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-11-04 16:03:57 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-11-04 16:03:57 +0000 |
commit | e6fbbc4da8ddf97e053651ad3d38802429562a23 (patch) | |
tree | 4e2f29b4d9d9b034c306cbbc906ddf2f07f2d59e /testhal/STM32/STM32F4xx/SDC | |
parent | b8352d5f4b945b307d5850b3bb2259e9ea3c75a8 (diff) | |
download | ChibiOS-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')
-rw-r--r-- | testhal/STM32/STM32F4xx/SDC/Makefile | 2 | ||||
-rw-r--r-- | testhal/STM32/STM32F4xx/SDC/main.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/testhal/STM32/STM32F4xx/SDC/Makefile b/testhal/STM32/STM32F4xx/SDC/Makefile index af5f1bf52..89dca9922 100644 --- a/testhal/STM32/STM32F4xx/SDC/Makefile +++ b/testhal/STM32/STM32F4xx/SDC/Makefile @@ -98,7 +98,7 @@ include $(CHIBIOS)/os/hal/osal/rt/osal.mk include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# Other files (optional).
-#include $(CHIBIOS)/test/lib/test.mk
+include $(CHIBIOS)/test/lib/test.mk
include $(CHIBIOS)/test/rt/rt_test.mk
include $(CHIBIOS)/test/oslib/oslib_test.mk
include $(CHIBIOS)/os/hal/lib/streams/streams.mk
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)) {
|