Application bootstrap: a single entry point wrapping the sys lifecycle and run loop. More...


Go to the source code of this file.
Typedefs | |
| typedef struct app_t | app_t |
| Opaque application instance passed to app callbacks. | |
| typedef void(* | app_callback_start_t) (app_t *app, void *userdata) |
| Called once, on the main worker, before the run loop starts dispatching events. More... | |
| typedef void(* | app_callback_event_t) (app_t *app, sys_event_t event, void *userdata) |
| Called on a worker for each event the run loop dispatches. More... | |
Enumerations | |
| enum | app_flag_t { app_flag_none = 0, app_flag_multicore = (1 << 0), app_flag_signal = (1 << 1), app_flag_user_button = (1 << 2), app_flag_temperature = (1 << 3), app_flag_stdio_rtt = (1 << 5), app_flag_led = (1 << 6), app_flag_watchdog = (1 << 7), app_flag_usb = (1 << 8) } |
| Feature flags controlling how app_main() runs. More... | |
Functions | |
Lifecycle | |
| int | app_main (int argc, char *argv[], app_flag_t flags, app_callback_start_t on_start, app_callback_event_t on_event, void *userdata) |
| Initialize the sys subsystem, run the event loop, then tear it down. More... | |
Properties | |
| hid_t * | app_hid (const app_t *app) |
| Get the HID instance initialized for this app. More... | |
| hw_led_t * | app_led (const app_t *app) |
| Get the on-board LED handle initialized for this app. More... | |
| hw_watchdog_t * | app_watchdog (const app_t *app) |
| Get the watchdog handle initialized for this app. More... | |
| hw_usb_t * | app_usb (const app_t *app) |
| Get the USB host handle initialized for this app. More... | |
Methods | |
| void | app_shutdown (int exit_code) |
| Request that the running app's event loop stop. More... | |
Application bootstrap: a single entry point wrapping the sys lifecycle and run loop.
Definition in file app.h.