28 lines
773 B
C
28 lines
773 B
C
// Copyright 2014 Normmatt
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#include "command_ntr.h"
|
|
|
|
#include "protocol_ntr.h"
|
|
|
|
void NTR_CmdReset(void)
|
|
{
|
|
static const u32 reset_cmd[2] = { 0x9F000000, 0x00000000 };
|
|
NTR_SendCommand(reset_cmd, 0x2000, NTRCARD_CLK_SLOW | NTRCARD_DELAY1(0x1FFF) | NTRCARD_DELAY2(0x18), NULL);
|
|
}
|
|
|
|
int NTR_CmdGetCartId(void)
|
|
{
|
|
int id;
|
|
static const u32 getid_cmd[2] = { 0x90000000, 0x00000000 };
|
|
NTR_SendCommand(getid_cmd, 0x4, NTRCARD_CLK_SLOW | NTRCARD_DELAY1(0x1FFF) | NTRCARD_DELAY2(0x18), &id);
|
|
return id;
|
|
}
|
|
|
|
void NTR_CmdEnter16ByteMode(void)
|
|
{
|
|
static const u32 enter16bytemode_cmd[2] = { 0x3E000000, 0x00000000 };
|
|
NTR_SendCommand(enter16bytemode_cmd, 0x0, 0, NULL);
|
|
}
|