From 299d69a1e3b22497cf6026cca0efda5d9c4f8e43 Mon Sep 17 00:00:00 2001 From: Michael Chisholm Date: Sat, 19 Aug 2006 12:32:54 +0000 Subject: [PATCH] Definitely supports SC Lite now --- source/disc_io/io_scsd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/disc_io/io_scsd.c b/source/disc_io/io_scsd.c index bd9b9f4..bdb4b1e 100644 --- a/source/disc_io/io_scsd.c +++ b/source/disc_io/io_scsd.c @@ -210,6 +210,8 @@ bool _SCSD_cmd_17byte_response (u8* responseBuffer, u8 command, u32 data) { static bool _SCSD_initCard (void) { + _SCSD_enable_lite(); + // Give the card time to stabilise _SCSD_sendClocks (NUM_STARTUP_CLOCKS); @@ -236,8 +238,6 @@ static bool _SCSD_readData (void* buffer) { volatile register u32 temp; int i; - _SCSD_enable_lite(); - i = BUSY_WAIT_TIMEOUT; while ((REG_SCSD_DATAREAD & SCSD_STS_BUSY) && (--i)); if (i == 0) { @@ -280,6 +280,7 @@ bool _SCSD_startUp (void) { bool _SCSD_isInserted (void) { u8 responseBuffer [6]; + // Make sure the card receives the command if (!_SCSD_sendCommand (SEND_STATUS, 0)) { return false; @@ -339,8 +340,6 @@ bool _SCSD_writeSectors (u32 sector, u32 numSectors, const void* buffer) { int i; while (numSectors--) { - _SCSD_enable_lite (); - // Calculate the CRC16 _SD_CRC16 ( data, BYTES_PER_READ, (u8*)crc);