git.droids-corp.org
/
protos
/
imu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ddcf722
)
fat: fix configuration for this hardware
author
Olivier Matz
<zer0@droids-corp.org>
Thu, 26 Jun 2014 18:39:38 +0000
(20:39 +0200)
committer
Olivier Matz
<zer0@droids-corp.org>
Thu, 26 Jun 2014 18:39:38 +0000
(20:39 +0200)
sd_raw_config.h
patch
|
blob
|
history
diff --git
a/sd_raw_config.h
b/sd_raw_config.h
index
23c4959
..
777d8d1
100644
(file)
--- 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.
*/
* 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__) || \
/* 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
#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;
#if SD_RAW_SDHC
typedef uint64_t offset_t;