Skip to content

Commit 5591b60

Browse files
committed
Implement enableSlot1/disableSlot1 using scfgSetMcPower
1 parent 01ca072 commit 5591b60

3 files changed

Lines changed: 11 additions & 77 deletions

File tree

include/nds/card.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
#ifndef NDS_CARD_INCLUDE
2828
#define NDS_CARD_INCLUDE
2929

30-
3130
#include "ndstypes.h"
31+
#include <calico/nds/scfg.h>
3232

3333
// Card bus
3434
#define REG_CARD_DATA_RD (*(vu32*)0x04100010)
@@ -105,9 +105,17 @@
105105
extern "C" {
106106
#endif
107107

108+
//---------------------------------------------------------------------------------
109+
static inline void enableSlot1(void) {
110+
//---------------------------------------------------------------------------------
111+
scfgSetMcPower(true);
112+
}
108113

109-
void enableSlot1();
110-
void disableSlot1();
114+
//---------------------------------------------------------------------------------
115+
static inline void disableSlot1(void) {
116+
//---------------------------------------------------------------------------------
117+
scfgSetMcPower(false);
118+
}
111119

112120
void cardWriteCommand(const u8 *command);
113121
void cardPolledTransfer(u32 flags, u32 *destination, u32 length, const u8 *command);

source/arm7/card.twl.c

Lines changed: 0 additions & 58 deletions
This file was deleted.

source/arm9/system.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,3 @@ void powerOff(int bits) {
6262
//else
6363
// fifoSendValue32(FIFO_PM, PM_REQ_OFF | (bits & 0xFFFF));
6464
}
65-
66-
//---------------------------------------------------------------------------------
67-
void enableSlot1() {
68-
//---------------------------------------------------------------------------------
69-
70-
//if(isDSiMode()) fifoSendValue32(FIFO_PM, PM_REQ_SLOT1_ENABLE);
71-
72-
}
73-
74-
//---------------------------------------------------------------------------------
75-
void disableSlot1() {
76-
//---------------------------------------------------------------------------------
77-
78-
//if(isDSiMode()) fifoSendValue32(FIFO_PM, PM_REQ_SLOT1_DISABLE);
79-
80-
}

0 commit comments

Comments
 (0)