diff --git a/gg.c b/gg.c index ab2ecdf..0ad0fd3 100644 --- a/gg.c +++ b/gg.c @@ -88,12 +88,12 @@ int main(void) // } debug = 2-debug; - debug = mmc_read_part(0, (unsigned char *) &length, 4); + debug = mmc_read_part(1, (unsigned char *) &length, 4); debug = 1; if(length==0){ debug = 2; } - debug = length & 0xff; + debug = (length>>24) & 0xff; timer_init_tiny26(); diff --git a/mmc.h b/mmc.h index 0562d58..e86ded2 100644 --- a/mmc.h +++ b/mmc.h @@ -14,7 +14,7 @@ Copyright (C) 2004 Ulrich Radig //#define SPI_Mode 1 //1 = Hardware SPI | 0 = Software SPI #define SPI_Mode 0 -#define WAIT_HALF_CLOCK _delay_us(2) +#define WAIT_HALF_CLOCK _delay_us(0.5) #define WAIT_HALF_CLOCK_SLOW _delay_us(20) #define MMC_Write PORTA //Port an der die MMC/SD-Karte angeschlossen ist also des SPI