Subversion Repositories Projects

Rev

Rev 294 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 294 Rev 295
Line 93... Line 93...
93
 
93
 
Line 94... Line 94...
94
        SSC_Disable();
94
        SSC_Disable();
95
 
95
 
96
        // 20MHz / 32 = 625 kHz
96
        // 20MHz / 32 = 625 kHz
97
        #ifdef __SD_INTERFACE_INVERTED
97
        #ifdef __SD_INTERFACE_INVERTED
98
        SPCR = (1<<SPE)|(1<<MSTR)|(0<<DORD)|(1<<CPOL)|(0<<CPHA)|(1<<SPR1)|(1<<SPR0);    // Enable SSC in mastermode, inverted clockpolarity (idle high)
98
        SPCR = (1<<SPE)|(1<<MSTR)|(0<<DORD)|(1<<CPOL)|(0<<CPHA)|(1<<SPR1)|(0<<SPR0);    // Enable SSC in mastermode, inverted clockpolarity (idle high)
99
        #else
99
        #else
100
        SPCR = (1<<SPE)|(1<<MSTR)|(0<<DORD)|(0<<CPOL)|(0<<CPHA)|(1<<SPR1)|(1<<SPR0);    // Enable SSC in mastermode, noninverted clockpolarity (idle low)
100
        SPCR = (1<<SPE)|(1<<MSTR)|(0<<DORD)|(0<<CPOL)|(0<<CPHA)|(1<<SPR1)|(0<<SPR0);    // Enable SSC in mastermode, noninverted clockpolarity (idle low)
Line 101... Line 101...
101
        #endif
101
        #endif
102
        SPSR |= (1<<SPI2X);
102
        SPSR |= (1<<SPI2X);