From a4a3c00c533ae5ea9735fb8a798903359eadb065 Mon Sep 17 00:00:00 2001 From: Paul Goeser Date: Sat, 14 Jan 2012 14:03:14 +0100 Subject: [PATCH] debugging: outputting the 515th byte (works) --- gg.c | 4 ++-- mmc.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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