Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
|
hawkBit event API. More...
Macros | |
#define | HAWKBIT_EVENT_CREATE_CALLBACK(_callback, _handler, _event) |
Macro to create and initialize a struct hawkbit_event_callback properly. | |
Typedefs | |
typedef void(* | hawkbit_event_callback_handler_t) (struct hawkbit_event_callback *cb, enum hawkbit_event_type event) |
Define the application callback handler function signature. | |
Functions | |
static void | hawkbit_event_init_callback (struct hawkbit_event_callback *callback, hawkbit_event_callback_handler_t handler, enum hawkbit_event_type event) |
Helper to initialize a struct hawkbit_event_callback properly. | |
int | hawkbit_event_add_callback (struct hawkbit_event_callback *cb) |
Add an application callback. | |
int | hawkbit_event_remove_callback (struct hawkbit_event_callback *cb) |
Remove an application callback. | |
hawkBit event API.
#define HAWKBIT_EVENT_CREATE_CALLBACK | ( | _callback, | |
_handler, | |||
_event ) |
#include <zephyr/mgmt/hawkbit/event.h>
Macro to create and initialize a struct hawkbit_event_callback properly.
This macro can be used instead of hawkbit_event_init_callback().
_callback | Name of the callback structure |
_handler | A valid handler function pointer. |
_event | The event of hawkbit_event_type that will trigger the callback |
typedef void(* hawkbit_event_callback_handler_t) (struct hawkbit_event_callback *cb, enum hawkbit_event_type event) |
#include <zephyr/mgmt/hawkbit/event.h>
Define the application callback handler function signature.
cb | Original struct hawkbit_event_callback owning this handler |
event | The event that triggered the callback |
Note: cb pointer can be used to retrieve private data through CONTAINER_OF() if original struct hawkbit_event_callback is stored in another private structure.
enum hawkbit_event_type |
#include <zephyr/mgmt/hawkbit/event.h>
hawkBit event type.
These events are used to register the callback functions.
int hawkbit_event_add_callback | ( | struct hawkbit_event_callback * | cb | ) |
#include <zephyr/mgmt/hawkbit/event.h>
Add an application callback.
cb | A valid application's callback structure pointer. |
|
inlinestatic |
#include <zephyr/mgmt/hawkbit/event.h>
Helper to initialize a struct hawkbit_event_callback properly.
callback | A valid Application's callback structure pointer. |
handler | A valid handler function pointer. |
event | The event of hawkbit_event_type that will trigger the callback. |
int hawkbit_event_remove_callback | ( | struct hawkbit_event_callback * | cb | ) |
#include <zephyr/mgmt/hawkbit/event.h>
Remove an application callback.
cb | A valid application's callback structure pointer. |