예제 #1
0
파일: card_spi.c 프로젝트: hl1itj/Team3
/*-------------------------------------------------------------------------------*/
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();
}
예제 #2
0
파일: disc.c 프로젝트: 0871087123/rtems
/*
 * 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;
}