Ejemplo n.º 1
0
int
main(int argc, char **argv)
{
	rte_openlog_stream(stderr);

	/* Config */
	app_config_init(&app);

	app_config_args(&app, argc, argv);

	app_config_parse(&app, app.config_file);

	app_config_check(&app);

	/* Init */
	app_init(&app);

	/* Run-time */
	rte_eal_mp_remote_launch(
		app_thread,
		(void *) &app,
		CALL_MASTER);

	return 0;
}
Ejemplo n.º 2
0
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(default_app_process, ev, data)
{
    PROCESS_BEGIN();

    uart_handler_init();
    clock_init();

    // we wait until mounted, before loading config
    PROCESS_WAIT_EVENT_UNTIL(ev == event_mount);

    if (app_config_init() != 0) {
        log_e("Loading saved config failed!\n");
    }

    // start sensor process
    process_start(&sensor_update, NULL);

    //    printf("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n");

    PROCESS_END();
}