Пример #1
0
int main(void) {
    cpu_clock_init(); /* CPU Clock is now 104 MHz */
    ssp_clock_init();
    systickInit();

    SETUPgout(EN_VDD);
    SETUPgout(MIXER_EN);
    SETUPgout(MIC_AMP_DIS);

    SETUPgout(LED1);
    SETUPgout(LED2);
    SETUPgout(LED3);
    SETUPgout(LED4);

    inputInit();
    lcdInit();
    lcdFill(0xff);
    lcdPrintln("Flash-App");
    lcdNl();
    lcdDisplay();

    cpld_flash();
    cpu_clock_set(50);
    full_msc();

    return 0;
}
Пример #2
0
int main(void) {
	cpuClockInit(); /* CPU Clock is now 104 MHz */
	ssp_clock_init();
	systickInit();

//	cpu_clock_set(204);

	SETUPgout(EN_VDD);
	SETUPgout(MIXER_EN);
	SETUPgout(MIC_AMP_DIS);

	SETUPgout(LED1);
	SETUPgout(LED2);
	SETUPgout(LED3);
	SETUPgout(LED4);

	inputInit();
	lcdInit();
	fsInit(); 
	lcdFill(0xff);
	readConfig();

	generated_init();

	while(1) {
        handleMenu(&menu_main);
        getInputWaitRelease();
	}
	return 0;
}
Пример #3
0
int main(uint32_t startloc) {
	cpu_clock_init();
	ssp_clock_init();
	systickInit();

//	cpu_clock_set(204);

	SETUPgout(EN_VDD);
	SETUPgout(MIXER_EN);
	SETUPgout(MIC_AMP_DIS);

	SETUPgout(LED1);
	SETUPgout(LED2);
	SETUPgout(LED3);
	SETUPgout(LED4);
	inputInit();
	flashInit();

	lcdInit();
	fsInit();
	lcdFill(0xff); /* Display BL Image here */

	sli=startloc;

	if (startloc != (uintptr_t)&_app_start){ /* not booted via DFU, do autoboot */ 
        char filename[FLEN];
        switch(getInputRaw()){
            case BTN_LEFT:
                getInputWaitRelease();
                doRealExec(1);
                break;
            case BTN_UP:
                doMSC();
            default:
            case BTN_NONE:
                readTextFile(BOOTCFG, filename, FLEN);
                lcdPrintln("Booting:");
                lcdPrintln(filename);
                bootFile(filename);
                break;
		};
	};
	static const struct MENU main={ "Bootloader", {
		{ "Exec Firmware", &doExec},
		{ "MSC", &doMSC},
		{ "Flash Boot Ldr", &doFlash},
		{ "Info", &doInfo},
		{NULL,NULL}
	}};
	do {
		handleMenu(&main);
	}while(1);
}
Пример #4
0
int main(void)
{
	cpu_clock_init();
	ssp_clock_init();

	inputInit();

    lcdInit();
    lcdFill(0xff);
	OFF(MIXER_EN);

	static const struct MENU main={ "img test", {
		{ "LCD", &doLCD},
		{NULL,NULL}
	}};
	handleMenu(&main);
	return 0;
}
Пример #5
0
int main(uint32_t startloc) {
	cpu_clock_init();
	ssp_clock_init();
	systick_set_reload(208000);
	systick_set_clocksource(0);
	systick_interrupt_enable();
	systick_counter_enable();

//	cpu_clock_pll1_max_speed();

	SETUPgout(EN_VDD);
	SETUPgout(MIXER_EN);

	SETUPgout(LED1);
	SETUPgout(LED2);
	SETUPgout(LED3);
	SETUPgout(LED4);
	inputInit();
	flashInit();

    lcdInit();
	fsInit();
    lcdFill(0xff); /* Display BL Image here */

	sli=startloc;

	if (startloc != (uintptr_t)&_app_start){ /* not booted via DFU, do autoboot */ 
		if (getInputRaw()!=BTN_LEFT){
			char filename[FLEN];
			readTextFile(BOOTCFG, filename, FLEN);
			lcdPrintln("Fname");
			lcdPrintln(filename);
			bootFile(filename,0);
		};
	};
	static const struct MENU main={ "Bootloader", {
		{ "Info", &doInfo},
		{ "Exec", &doExec},
		{ "Flash", &doFlash},
		{NULL,NULL}
	}};
	handleMenu(&main);
	return 0;
}
Пример #6
0
int main(void) {
	cpu_clock_init_();
	ssp_clock_init();

	systickInit();

//	cpu_clock_pll1_max_speed();

	SETUPgout(EN_VDD);
	SETUPgout(MIXER_EN);

	SETUPgout(LED1);
	SETUPgout(LED2);
	SETUPgout(LED3);
	SETUPgout(LED4);

	inputInit();
	feldInit();

    lcdInit();
	fsInit(); 
    lcdFill(0xff);

	static const struct MENU main={ "main 1", {
		{ "FS", &doFS},
		{ "MSC", &doMSC},
		{ "flash", &doFlash},
		{ "LCD", &doLCD},
		{ "speed", &doSpeed},
		{ "ADC", &doADC},
		{ "feld", &doFeld},
		{ "chrg", &doChrg},
		{NULL,NULL}
	}};
	handleMenu(&main);
	return 0;
}