2#include "api_version.h"
17 .api_version = CNW_API_VERSION,
19 .base = &userapp_vector,
20 .
start = &start_and_init,
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 start(int MCULIBHANDLE, struct sc_firmware_api *api)
this is called when the board powers up
int on_command_received(struct command *com)
this is called for each command we receive
void user_loop()
this is called frequently, but with no timing guarantees. essentially, it's called in the "idle-loop"...
void(* stop)()
last thing to be called. no more userloops or irqs afterwards
int(* start)(int MCULIBHANDLE, struct sc_firmware_api *api)
guaranteed to be called by the firmware before any other functions
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