Ejemplo n.º 1
0
int main(void)
{
    (void)printf("Initializing mbed specific things...\r\n");

    /* These are needed in order to initialize the time provider for Proton-C */
    mbed_log_init();
    mbedtime_init();

	if (EthernetInterface::init())
	{
		(void)printf("Error initializing EthernetInterface.\r\n");
		return -1;
	}

	if (setupRealTime() != 0)
	{
		(void)printf("Failed setting up real time clock\r\n");
		return -1;
	}

	if (EthernetInterface::connect())
	{
		(void)printf("Error connecting EthernetInterface.\r\n");
		return -1;
	}

    remote_monitoring_run();

	(void)EthernetInterface::disconnect();

    return 0;
}
int main(void)
{
    int result = remote_monitoring_init();
    if(result == 0)
    {
        remote_monitoring_run();
    }
    return result;
}