23 static int userctr = 0;
32 api->
printf(
"Hello World (userapp)\r\n");
66 if (api->mculib_has_time_passed(2, &ctr)) {
67 api->
printf(
"user_loop (%i) (app: %p)\r\n", userctr, &userapp_vector);
void on_new_node(struct hostroute *host)
called when and if a new node is detected. this may be used, to, for example to activate when a route...
int on_command_received(struct command *com)
this is called for each command we receive
void(* printf)(const char *format,...)
print a message on console and possibly forward to server into logfile as well (uses radio - expensiv...
void start(int mculib_handle, struct sc_firmware_api *uapi)
this is called when the board powers up
void user_loop()
this is called frequently, but with no timing guarantees. essentially, it's called in the "idle-loop"...
definitions of routing table structures
these are the callbacks available. the firmware "api". provided to the app on startup
this must be implemented by the userapp, stored in flash at the beginning of the file (offset 0)
user application interface