Esempio n. 1
0
/*-------------------------------------------------------------------------------*/
void cardSpiInit(CARD_SPI_CLOCK clock) {
/*-------------------------------------------------------------------------------*/
	card_spi_settings.clock = clock;
	card_spi_settings.enable_irq = 0;
#ifdef ARM9
	sysSetCardOwner(BUS_OWNER_ARM9);
#else
	sysSetCardOwner(BUS_OWNER_ARM7);
#endif
	//cardSpiSetHandler(NULL);
	cardSpiStop();
}
Esempio n. 2
0
/*
 * Check the DS card slot for a valid memory card interface
 * If an interface is found, it is set as the default interace
 * and it returns true. Otherwise the default interface is left
 * untouched and it returns false.
 */
const IO_INTERFACE* _FAT_disc_dsSlotFindInterface (void)
{
#ifdef ARM9
	sysSetCardOwner(BUS_OWNER_ARM9);
#endif
	int i;

	for (i = 0; i < (sizeof(ioInterfaces) / sizeof(IO_INTERFACE*)); i++) {
		if ((ioInterfaces[i]->features & FEATURE_SLOT_NDS) && (ioInterfaces[i]->fn_startup())) {
			return ioInterfaces[i];
		}
	}

	return NULL;
}