Exemple #1
0
BOOL slot1Change(NDS_SLOT1_TYPE changeToType)
{
    if(changeToType == slot1_device_type) return FALSE; //nothing to do
    if (changeToType > NDS_SLOT1_COUNT || changeToType < 0) return FALSE;
    slot1_device.close();
    slot1_device_type = changeToType;
    slot1_device = slot1List[slot1_device_type];
    if (changeToType == NDS_SLOT1_R4)
        scanDir();
    printf("Slot 1: %s\n", slot1_device.name);
    printf("sending eject signal to SLOT-1\n");
    NDS_TriggerCardEjectIRQ();
    return slot1_device.init();
}
Exemple #2
0
bool slot1_Change(NDS_SLOT1_TYPE changeToType)
{
	if((changeToType == slot1_device_type) || (changeToType == slot1_GetSelectedType()))
		return FALSE; //nothing to do
	if (changeToType > NDS_SLOT1_COUNT || changeToType < 0) return FALSE;
	if(slot1_device != NULL)
		slot1_device->disconnect();
	slot1_device_type = changeToType;
	slot1_device = slot1_List[slot1_device_type];
	printf("Slot 1: %s\n", slot1_device->info()->name());
	printf("sending eject signal to SLOT-1\n");
	NDS_TriggerCardEjectIRQ();
	slot1_device->connect();
	return true;
}