picofuse

Typedefs | Enumerations
app.h File Reference

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

#include "hid.h"
#include "hw.h"
#include "sys.h"
Include dependency graph for app.h:
This graph shows which files directly or indirectly include this file:

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_tapp_hid (const app_t *app)
 Get the HID instance initialized for this app. More...
 
hw_led_tapp_led (const app_t *app)
 Get the on-board LED handle initialized for this app. More...
 
hw_watchdog_tapp_watchdog (const app_t *app)
 Get the watchdog handle initialized for this app. More...
 
hw_usb_tapp_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...
 

Detailed Description

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

Definition in file app.h.