Beispiel #1
0
void biosMain(void)
{
	//Follows same left,right ordering defined in JoystickName
	//uint16_xy * center[2] = {&(joysticks[JOYSTICK_LEFT].center_x),&(joysticks[JOYSTICK_RIGHT].center_x)};
	//deadzone->x = JOYSTICK_TEST_DEADZONE_X;
	//deadzone->y = JOYSTICK_TEST_DEADZONE_Y;
	
	setupLEDs(false);
	
	for( int i=0; i<TEST_MODE_NUM_BLINKS; i++)
	{
		setLEDValue(LED_DIM, LED_OFF, LED_OFF);
		delay_ms(200);
		setLEDValue(LED_OFF, LED_OFF, LED_OFF);
		delay_ms(200);
	}
	
	turnBTOn(); //Joysticks are on the same power rail island as the Bluetooth module, so turn BT on
	
	ManufactureTestButtonPress();
}
Beispiel #2
0
//control passed here from bootTestCrt.S after creating stack
int boot(){	
	uint32 *STORE1 = (uint32 *)0x4090002c;	//Use RTC alarms as
	uint32 *STORE2 = (uint32 *)0x40900030;	// storage for debugging
	
	int i,j;

	*STORE1 = 0x98765;
	
	setupLEDs();
	setLEDs(GREEN);
		
	uint32 *kernel = (uint32 *)(RAM_START + KERNEL_OFFSET);
	uint32 *tags = (uint32 *)(RAM_START + TAGS_OFFSET);

	uint32 cs;
	
	setLEDs(GREEN);

	//now we need to copy the kernel code to where it likes to be
	cs = copyMem((uint32*)kernel_start,kernel, (kernel_end - kernel_start));

	if(cs != KERN_CHECKSUM)
		error(5,0);

	setup_tags(tags);

	setLEDs(BLUE);

	uint32 mtype = MACH_TYPE_HPIPAQ214;

	void (*theKernel)(uint32 zero, uint32 mtype, uint32 *tags);
	theKernel = (void (*)(uint32, uint32, uint32 *))kernel; /* set the kernel address */

	theKernel(0, mtype, tags);    /* jump to kernel with register set */

death:	__asm("nop");
	goto death;

}