Ejemplo n.º 1
0
// --------------------------------------------------------------------------
extern "C" void tinyos_wiselib_main( void )
{
   wiselib::tinyos::tinyos_init_wiselib_timer();
   wiselib::tinyos::tinyos_init_wiselib_radio();

   application_main( tiny_os_model_ );
}
Ejemplo n.º 2
0
int main(void)
{
    WDTCTL = WDTPW | WDTHOLD;	// Stop watchdog time;

    ClockDCOInit(DCOCLK_8M00HZ);
    ClockACLKConfig(SOURCE_DCOCLK, DIVIDE_BY_8);
    ClockSMCLKConfig(SOURCE_DCOCLK, DIVIDE_BY_8);
    ClockMCLKConfig(SOURCE_DCOCLK, DIVIDE_BY_1);
    SystemTimerInit(TimerA0, 1000000ul);

    while(1) {
    	application_main();
    }
}
Ejemplo n.º 3
0
int main(int argc, const char** argv )
{
	wiselib::ArduinoOsModel app_main_arg;
	
	init();
	
#if defined(USBCON)
	USBDevice.attach();
#endif
	
	pinMode(13, OUTPUT);
    Serial.begin(9600);
	application_main(app_main_arg);
	
	for(;;) { }
	
	return 0;
}
Ejemplo n.º 4
0
void start_application ( void )
{

	int
		string,
		count,
		argc;

	char
		strings[32][64],
		*argv[32],
		*ptr;


	SetThreadPriority ( GetCurrentThread (), THREAD_PRIORITY_NORMAL );

	strcpy ( &strings[0][0], "APPLICATION" );

	argv[0] = &strings[0][0];

	ptr = main_command_line;

	count = 0;

	string = 1;

	while ( *ptr != '\0' )
	{

		while ( ( *ptr != ' ' ) && ( *ptr != '\0' ) )
		{

			strings[string][count] = *ptr;

			count++;
			ptr++;
		}

		if ( *ptr == ' ' )
		{

			ptr++;
		}

		strings[string][count] = '\0';
		argv[string] = &strings[string][0];

		count = 0;
		string++;
	}

	argc = string;

	//
	// The graphics / 3d / 2d systems need the maths fpu to round to zero
	//

	set_fpu_rounding_mode_zero ();

	set_fpu_exceptions ();

	application_main ( argc, argv );
}
Ejemplo n.º 5
0
 virtual void boot ( void )
 { application_main( os_ ); }