2017-07-31 13:26:29 +02:00
|
|
|
/*
|
2017-10-05 16:53:26 +02:00
|
|
|
* Simple example with ota-update only
|
2017-07-31 13:26:29 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
#include "contiki.h"
|
2017-10-06 13:25:53 +02:00
|
|
|
#include "bootloader_if.h"
|
2017-07-31 13:26:29 +02:00
|
|
|
#include "er-coap.h"
|
2017-10-05 16:53:26 +02:00
|
|
|
#include "ota-update.h"
|
2017-07-31 13:26:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void setup (void)
|
|
|
|
{
|
|
|
|
rest_init_engine ();
|
2017-10-05 16:53:26 +02:00
|
|
|
OTA_ACTIVATE_RESOURCES();
|
2017-07-31 13:26:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void loop (void)
|
|
|
|
{
|
2017-10-06 13:25:53 +02:00
|
|
|
printf ("Hello %lu\n",bootloader_get_active_part());
|
2017-10-05 16:53:26 +02:00
|
|
|
printf ("just sitting round and waiting for ota update\n");
|
2017-07-31 13:26:29 +02:00
|
|
|
}
|