From: asterix Date: Wed, 28 Sep 2011 13:45:06 +0000 (+0000) Subject: Add the new hw macro for the sd driver. X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=d7d8f1f7f4728a2c9af66989be015a17bbbc3e15;p=bertos.git Add the new hw macro for the sd driver. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@5111 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/hw/hw_sd.h b/bertos/hw/hw_sd.h index ed10b806..a21fd37d 100644 --- a/bertos/hw/hw_sd.h +++ b/bertos/hw/hw_sd.h @@ -45,8 +45,15 @@ #define SD_CS_ON() do { /* implement me */} while(0) #define SD_CS_OFF() do { /* implement me */} while(0) -#define SD_PIN_INIT() do { /* implement me */} while(0) -#define SD_CARD_PRESENT() true /* implement me */ +#include + +#define SD_STROBE_ON() do { PIOE_SODR = BV(0); } while(0) +#define SD_STROBE_OFF() do { PIOE_CODR = BV(0); } while(0) + +#define SD_STROBE_INIT() do { /* implement me */} while(0) +#define SD_PIN_INIT() do { /* implement me */} while(0) + +#define SD_CARD_PRESENT() (!(PIOE_PDSR & BV(6))) #define SD_WRITE_PROTECT() false /* implement me */ #endif /* HW_SD_H */