From 2f50401ce6fac0fef325bfb851ef32193ee32dc8 Mon Sep 17 00:00:00 2001 From: asterix Date: Tue, 6 Sep 2011 08:40:36 +0000 Subject: [PATCH] Some tricks for old compatibility. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@5021 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/drv/sd.c | 5 +++++ bertos/drv/sd.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/bertos/drv/sd.c b/bertos/drv/sd.c index 441ff8b1..820873ed 100644 --- a/bertos/drv/sd.c +++ b/bertos/drv/sd.c @@ -47,6 +47,11 @@ #include + +#ifdef SD_INCLUDE_SPI_SOURCE + #include +#endif + void sd_writeTest(Sd *sd) { uint8_t buf[SD_DEFAULT_BLOCKLEN]; diff --git a/bertos/drv/sd.h b/bertos/drv/sd.h index d01b56f1..3e6ca6f3 100644 --- a/bertos/drv/sd.h +++ b/bertos/drv/sd.h @@ -182,8 +182,14 @@ INLINE int sd_setBus1bit(Sd *sd) #endif +// For old compatibility. +#ifndef CONFIG_SD_MODE + #define CONFIG_SD_MODE SD_SPI_MODE + #define SD_INCLUDE_SPI_SOURCE +#endif #if CONFIG_SD_OLD_INIT + #if !(ARCH & ARCH_NIGHTTEST) #warning "Deprecated: this API will be removed in the next major release," #warning "please disable CONFIG_SD_OLD_INIT and pass explicitly the SD context to sd_init()." -- 2.25.1