Exemple #1
0
void init()
{
	INTCON=0;	// purpose of disabling the interrupts.
	OSCCON = 0xE8;
	PORTA = 0;
	LATA = 0;
	ANSELA = 0;
	TRISA = TRISS_;  //Set RA<5:0> as Outputs

#ifdef __1822__

	APFCON = 0b00000000;
	TRISA2 =0;
	TRISA4 =0;
	TRISA3 = 1;
//	APFCON = 0b11000111;
//	APFCON = 0b10000100;
	

#else
	ANSELB = 0;
#endif

	init_comms();	// set up the USART - settings defined in usart.h
	Init_timer1();
	initInts();

}
Exemple #2
0
void _main (unsigned long magic, multiboot_info_t *mbi)
{
	//enable_paging();
	initializeComputer(magic, mbi);
	
	//fill_rectangle(100, 50, 700, 300, 0x00ff0000);
	//fill_rectangle(100, 50, 700, 350, 0x0000ff00);
	//fill_rectangle(100, 50, 700, 400, 0x000000ff);
	
	memcpy (computer.videoInfo.address, splashscreen_image.pixel_data, splashscreen_image.width * splashscreen_image.height * 4);
	//bitblt_32bit_to_fb(splashscreen_image.pixel_data, splashscreen_image.width, splashscreen_image.height, 0, 0);
	//printf("aaaa\nbbbb\ncccc\ndddd\neeee\nffff\ngggg");

	if (computer.image)
	{
		printf_pocho("Found image at 0x%x\n", computer.image);
		initInts();
		sqMain(computer.image, length);
	}
	mark(0x00ff);
}