Esempio n. 1
0
File: main.c Progetto: d33tah/whitix
void KernelMain()
{
	EarlyConsoleInit();
	ArchInit();
	ThrEarlyInit();
	TimeInit();
	ShutdownInit();
	
	/* Set up the device-related subsystems. */
	IcInit();

	/* Once we've set up the ICFS framework, there are several
	 * areas of Whitix (like the slab code) that need to expose
	 * their internal information.
	 */

	SlabInfoInit();
	
	ModuleInfoInit();
	
	ThrInit();
	
	VfsInit();
	DevFsInit();
	DeviceInit();
	
	MiscInit();
	
	LoadInit();

	StartInit();

	/* This is where the idle thread idles, after returning from StartInit in startup.c */
	ThrIdleFunc();
}
Esempio n. 2
0
//*----------------------------------------------------------------------------
//* Function Name       : main
//* Object              :
//* Object              :
//* Input Parameters    :
//* Output Parameters   :
//* Functions called    :
//*----------------------------------------------------------------------------
int main(void)
{
//	uchar i;

	// Set unbuffered mode for stdout (newlib)
	//setvbuf( stdout, 0, _IONBF, 0 );

//	SYSCFG_MemoryRemapConfig(SYSCFG_MemoryRemap_SRAM);

	// HW init
	mchf_board_init();


	// Power on
	mchf_board_green_led(1);

	// Set default transceiver state
	TransceiverStateInit();

	// Virtual Eeprom init
	ts.ee_init_stat = EE_Init();	// get status of EEPROM initialization

	// Show logo
	UiLcdHy28_ShowStartUpScreen(100);

	// Extra init
	MiscInit();

	// Init the RX Hilbert transform/filter prior
	// to initializing the audio!
	//
	UiCalcRxPhaseAdj();
	//
	// Init TX Hilbert transform/filter
	//
	UiCalcTxPhaseAdj();	//

	UiDriverLoadFilterValue();	// Get filter value so we can init audio with it

	// Audio HW init
	audio_driver_init();

	// Usb Host driver init
	//keyb_driver_init();

	// UI HW init
	ui_driver_init();

	// Audio HW init - again, using EEPROM-loaded values
	audio_driver_init();
	//
	ts.audio_gain_change = 99;		// Force update of volume control
	uiCodecMute(0);					// make cure codec is un-muted

	UiCheckForEEPROMLoadDefaultRequest();	// check - and act on - request for loading of EEPROM defaults, if any


#ifdef DEBUG_BUILD
	printf("== main loop starting ==\n\r");
#endif

	// Transceiver main loop
	for(;;)
	{
		// UI events processing
		ui_driver_thread();

		// Audio driver processing
		//audio_driver_thread();

		// USB Host driver processing
		//usbh_driver_thread();

		// Reset WD - not working
		//wd_reset();
	}
}