add compile doku and fix compile warnings

This commit is contained in:
Harald Pichler 2017-08-23 08:59:04 +02:00
parent 7ea0e3b933
commit 32bbd0cc71
2 changed files with 4 additions and 0 deletions

View file

@ -1,6 +1,8 @@
Arduino compatibility example Arduino compatibility example
============================= =============================
make clean TARGET=osd-merkur-256 flash
This example shows that it is now possible to re-use arduino sketches in This example shows that it is now possible to re-use arduino sketches in
Contiki. This example documents the necessary magic. Arduino specifies Contiki. This example documents the necessary magic. Arduino specifies
two routines, `setup` and `loop`. Before `setup` is called, the two routines, `setup` and `loop`. Before `setup` is called, the

View file

@ -29,9 +29,11 @@ void setup (void)
led_status=0; led_status=0;
// init coap resourcen // init coap resourcen
rest_init_engine (); rest_init_engine ();
#pragma GCC diagnostic ignored "-Wwrite-strings"
rest_activate_resource (&res_led, "s/led"); rest_activate_resource (&res_led, "s/led");
rest_activate_resource (&res_battery, "s/battery"); rest_activate_resource (&res_battery, "s/battery");
rest_activate_resource (&res_cputemp, "s/cputemp"); rest_activate_resource (&res_cputemp, "s/cputemp");
#pragma GCC diagnostic pop
// NETSTACK_MAC.off(1); // NETSTACK_MAC.off(1);
mcu_sleep_set(128); mcu_sleep_set(128);