2015-05-12 11:15:16 +12:00
|
|
|
// Copyright 2014 Normmatt
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2015-05-09 23:42:30 -07:00
|
|
|
#pragma once
|
|
|
|
#include "common.h"
|
|
|
|
|
2015-05-10 13:09:49 -07:00
|
|
|
#define REG_CARDCONF (*(vu16*)0x1000000C)
|
|
|
|
#define REG_CARDCONF2 (*(vu8*)0x10000010)
|
|
|
|
|
|
|
|
//REG_AUXSPICNT
|
|
|
|
#define CARD_ENABLE (1<<15)
|
|
|
|
#define CARD_SPI_ENABLE (1<<13)
|
|
|
|
#define CARD_SPI_BUSY (1<<7)
|
|
|
|
#define CARD_SPI_HOLD (1<<6)
|
|
|
|
|
|
|
|
#define LATENCY 0x822C
|
|
|
|
|
2015-05-10 00:53:09 -07:00
|
|
|
u32 BSWAP32(u32 val);
|
|
|
|
|
2015-05-14 21:30:39 -04:00
|
|
|
void Cart_Init(void);
|
|
|
|
int Cart_IsInserted(void);
|
|
|
|
u32 Cart_GetID(void);
|
2015-05-09 23:42:30 -07:00
|
|
|
void Cart_Secure_Init(u32* buf, u32* out);
|
2015-05-25 17:46:00 -03:00
|
|
|
void Cart_Dummy(void);
|