From: Olivier Matz Date: Thu, 26 Jun 2014 18:39:38 +0000 (+0200) Subject: fat: fix configuration for this hardware X-Git-Url: http://git.droids-corp.org/?p=protos%2Fimu.git;a=commitdiff_plain;h=883f5aae494ab066938b0cebb554a1ee13766713 fat: fix configuration for this hardware --- diff --git a/sd_raw_config.h b/sd_raw_config.h index 23c4959..777d8d1 100644 --- a/sd_raw_config.h +++ b/sd_raw_config.h @@ -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;