mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-22 09:59:18 +01:00
Definitely supports SC Lite now
This commit is contained in:
parent
698f3aecee
commit
299d69a1e3
@ -210,6 +210,8 @@ bool _SCSD_cmd_17byte_response (u8* responseBuffer, u8 command, u32 data) {
|
|||||||
|
|
||||||
|
|
||||||
static bool _SCSD_initCard (void) {
|
static bool _SCSD_initCard (void) {
|
||||||
|
_SCSD_enable_lite();
|
||||||
|
|
||||||
// Give the card time to stabilise
|
// Give the card time to stabilise
|
||||||
_SCSD_sendClocks (NUM_STARTUP_CLOCKS);
|
_SCSD_sendClocks (NUM_STARTUP_CLOCKS);
|
||||||
|
|
||||||
@ -236,8 +238,6 @@ static bool _SCSD_readData (void* buffer) {
|
|||||||
volatile register u32 temp;
|
volatile register u32 temp;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
_SCSD_enable_lite();
|
|
||||||
|
|
||||||
i = BUSY_WAIT_TIMEOUT;
|
i = BUSY_WAIT_TIMEOUT;
|
||||||
while ((REG_SCSD_DATAREAD & SCSD_STS_BUSY) && (--i));
|
while ((REG_SCSD_DATAREAD & SCSD_STS_BUSY) && (--i));
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
@ -280,6 +280,7 @@ bool _SCSD_startUp (void) {
|
|||||||
|
|
||||||
bool _SCSD_isInserted (void) {
|
bool _SCSD_isInserted (void) {
|
||||||
u8 responseBuffer [6];
|
u8 responseBuffer [6];
|
||||||
|
|
||||||
// Make sure the card receives the command
|
// Make sure the card receives the command
|
||||||
if (!_SCSD_sendCommand (SEND_STATUS, 0)) {
|
if (!_SCSD_sendCommand (SEND_STATUS, 0)) {
|
||||||
return false;
|
return false;
|
||||||
@ -339,8 +340,6 @@ bool _SCSD_writeSectors (u32 sector, u32 numSectors, const void* buffer) {
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
while (numSectors--) {
|
while (numSectors--) {
|
||||||
_SCSD_enable_lite ();
|
|
||||||
|
|
||||||
// Calculate the CRC16
|
// Calculate the CRC16
|
||||||
_SD_CRC16 ( data, BYTES_PER_READ, (u8*)crc);
|
_SD_CRC16 ( data, BYTES_PER_READ, (u8*)crc);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user