예제 #1
0
파일: utils.c 프로젝트: AEUG/400plus
void led_flash(int duration) {
	eventproc_EdLedOn();
	SleepTask(EVENT_WAIT);

	SleepTask(duration);

	eventproc_EdLedOff();
	SleepTask(EVENT_WAIT);
}
예제 #2
0
파일: main.c 프로젝트: easyaspi314/400plus
void start_up() {
	// Check and create our 400PLUS folder
	status.folder_exists = check_create_folder();

	// Recover persisting information
	persist_read();

	// Read settings from file
	settings_read();

	// If configured, start debug mode
	if (settings.debug_on_poweron)
		start_debug_mode();

	// If configured, restore AEB
	if (settings.persist_aeb)
		send_to_intercom(IC_SET_AE_BKT, persist.aeb);

	// Enable IR remote
	// i'm not sure where to call this? perhaps this isn't the right place.
	if (settings.remote_enable)
		remote_on();

	// Enable extended ISOs
	// Enable (hidden) CFn.8 for ISO H
	send_to_intercom(IC_SET_CF_EXTEND_ISO, 1);

	// Enable realtime ISO change
	send_to_intercom(IC_SET_REALTIME_ISO_0, 0);
	send_to_intercom(IC_SET_REALTIME_ISO_1, 0);

	// Set current language
	enqueue_action(lang_pack_init);

	// Read custom modes configuration from file
	enqueue_action(cmodes_read);

	// And optionally apply a custom mode
	enqueue_action(cmode_recall);

    // turn off the blue led after it was lighten by our hack_task_MainCtrl()
	eventproc_EdLedOff();

#ifdef MEMSPY
	debug_log("starting memspy task");
	CreateTask("memspy", 0x1e, 0x1000, memspy_task, 0);
#endif

#if 0
	debug_log("=== DUMPING DDD ===");
	printf_DDD_log( (void*)(int)(0x00007604+0x38) );

	debug_log("maindlg @ 0x%08X, handler @ 0x%08X", hMainDialog, hMainDialog->event_handler);

	debug_log("dumping");
	long *addr   = (long*) 0x7F0000;

	int file = FIO_OpenFile("A:/dump.bin", O_CREAT | O_WRONLY , 644);

	if (file != -1) {
		FIO_WriteFile(file, addr, 0xFFFF);
		FIO_CloseFile(file);
		beep();
	}
#endif
}