X-Git-Url: http://git.droids-corp.org/?p=protos%2Fimu.git;a=blobdiff_plain;f=sd_raw_config.h;h=777d8d1c141bf667b521fa322816ff7b13df7796;hp=ca88eaa038b1674a8a9a093d08a3a41f828d571d;hb=HEAD;hpb=b1352af6f340a1b878d46ed15b51d30eb3d3c36a diff --git a/sd_raw_config.h b/sd_raw_config.h index ca88eaa..777d8d1 100644 --- a/sd_raw_config.h +++ b/sd_raw_config.h @@ -49,7 +49,7 @@ extern "C" /** * \ingroup sd_raw_config * Controls MMC/SD access buffering. - * + * * Set to 1 to save static RAM, but be aware that you will * lose performance. * @@ -65,12 +65,23 @@ extern "C" * Set to 1 to support so-called SDHC memory cards, i.e. SD * cards with more than 2 gigabytes of memory. */ -#define SD_RAW_SDHC 0 +#define SD_RAW_SDHC 1 /** * @} */ +#define zer0 +#ifdef zer0 + #define configure_pin_mosi() DDRB |= (1 << DDB5) + #define configure_pin_sck() DDRB |= (1 << DDB7) + #define configure_pin_ss() DDRC |= (1 << DDC6) + #define configure_pin_miso() DDRB &= ~(1 << DDB6) + +#define select_card() PORTC &= ~(1 << PORTC6) +#define unselect_card() PORTC |= (1 << PORTC6) + +#else /* defines for customisation of sd/mmc port access */ #if defined(__AVR_ATmega8__) || \ defined(__AVR_ATmega48__) || \ @@ -109,12 +120,13 @@ extern "C" #else #error "no sd/mmc pin mapping available!" #endif +#endif -#define configure_pin_available() DDRC &= ~(1 << DDC4) -#define configure_pin_locked() DDRC &= ~(1 << DDC5) +#define configure_pin_available() do {} while (0) // DDRC &= ~(1 << DDC4) +#define configure_pin_locked() do {} while (0) // DDRC &= ~(1 << DDC5) -#define get_pin_available() (PINC & (1 << PINC4)) -#define get_pin_locked() (PINC & (1 << PINC5)) +#define get_pin_available() (0) // (PINC & (1 << PINC4)) +#define get_pin_locked() (1) // (PINC & (1 << PINC5)) #if SD_RAW_SDHC typedef uint64_t offset_t;