fat: fix configuration for this hardware
[protos/imu.git] / sd_raw_config.h
index 23c4959..777d8d1 100644 (file)
@@ -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;