Пример #1
0
Файл: main.c Проект: 0prj/asm3u
int main (void)
{
	/* Insert system clock initialization code here (sysclk_init()). */
	boot_init();
	/* Insert application code here, after the board has been initialized. */
	boot_main();
}
Пример #2
0
int main(void)
{
	CLKPR = 0x80;
	CLKPR = 0x00;

	init_ports();
	init_timer1();
	init_timer2();
	init_analog();

	TWAR = 1 << 1;
	TWCR = 0x45;
	TWCR = (1 << TWEN) | (1 << TWIE) | (1 << TWEA);

	sei();
	state = WAIT_ZCROSS;
	//state = TEST;
	while (1)
	{
     		_delay_ms(10000);
     	}
	clr_led();
	cli();

	boot_main();
}
Пример #3
0
int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
	int result;

	// parse command line:
	int argc = 0;
	char** argv = 0;
	parseCmdLine(GetCommandLine(),&argc,&argv);

	// call the main function:
	result = boot_main(argc, argv);

	// clean up parsed arguments:
	while(argc) free(argv[--argc]);
	free(argv);

	// dispatch result:
	return result;
}
Пример #4
0
void init()
{
	extern int bss_start, bss_end, data_start, data_end, rodata_end;

	memset(&bss_start, 0, (long)&bss_end - (long)&bss_start);					// Bssセクション初期化
	memcpy(&data_start, &rodata_end, (long)&data_end - (long)&data_start);		// dataセクション初期化
	memset(&buf_start, 0, (long*)0x600);										// bufセクション初期化

	// 割り込みDISABLE
	INTERUUPT_DISABLE

	// ソフト割り込み初期化
	softvec_init();

	// シリアル通信初期化
	sci_init(SCI_NO_1, BitRate_type_br9600);

	boot_main();
}
Пример #5
0
int main (int argc, char ** argv) {
	return boot_main(argc, argv);
}