Zephyr Project API 4.0.0
A Scalable Open Source RTOS
|
hawkBit Firmware Over-the-Air for Zephyr Project. More...
Modules | |
hawkBit autohandler API | |
hawkBit autohandler API. | |
hawkBit configuration API | |
hawkBit configuration API. | |
Typedefs | |
typedef int(* | hawkbit_config_device_data_cb_handler_t) (const char *device_id, uint8_t *buffer, const size_t buffer_size) |
Callback to provide the custom data to the hawkBit server. | |
typedef bool(* | hawkbit_get_device_identity_cb_handler_t) (char *id, int id_max_len) |
Callback to get the device identity. | |
Enumerations | |
enum | hawkbit_response { HAWKBIT_NO_RESPONSE , HAWKBIT_NETWORKING_ERROR , HAWKBIT_UNCONFIRMED_IMAGE , HAWKBIT_PERMISSION_ERROR , HAWKBIT_METADATA_ERROR , HAWKBIT_DOWNLOAD_ERROR , HAWKBIT_OK , HAWKBIT_UPDATE_INSTALLED , HAWKBIT_NO_UPDATE , HAWKBIT_CANCEL_UPDATE , HAWKBIT_NOT_INITIALIZED , HAWKBIT_PROBE_IN_PROGRESS } |
Response message from hawkBit. More... | |
Functions | |
int | hawkbit_set_custom_data_cb (hawkbit_config_device_data_cb_handler_t cb) |
Set the custom data callback. | |
int | hawkbit_init (void) |
Init the flash partition. | |
enum hawkbit_response | hawkbit_probe (void) |
The hawkBit probe verify if there is some update to be performed. | |
void | hawkbit_reboot (void) |
Request system to reboot. | |
int | hawkbit_set_device_identity_cb (hawkbit_get_device_identity_cb_handler_t cb) |
Set the device identity callback. | |
int | hawkbit_reset_action_id (void) |
Resets the hawkBit action id, that is saved in settings. | |
hawkBit Firmware Over-the-Air for Zephyr Project.
typedef int(* hawkbit_config_device_data_cb_handler_t) (const char *device_id, uint8_t *buffer, const size_t buffer_size) |
#include <include/zephyr/mgmt/hawkbit/hawkbit.h>
Callback to provide the custom data to the hawkBit server.
This callback is used to provide the custom data to the hawkBit server. The custom data is used to provide the hawkBit server with the device specific data.
device_id | The device ID. |
buffer | The buffer to store the json. |
buffer_size | The size of the buffer. |
typedef bool(* hawkbit_get_device_identity_cb_handler_t) (char *id, int id_max_len) |
#include <include/zephyr/mgmt/hawkbit/hawkbit.h>
Callback to get the device identity.
id | Pointer to the buffer to store the device identity |
id_max_len | The maximum length of the buffer |
enum hawkbit_response |
#include <include/zephyr/mgmt/hawkbit/hawkbit.h>
Response message from hawkBit.
These messages are used to inform the server and the user about the process status of the hawkBit and also used to standardize the errors that may occur.
int hawkbit_init | ( | void | ) |
#include <include/zephyr/mgmt/hawkbit/hawkbit.h>
Init the flash partition.
0 | on success. |
-errno | if init fails. |
enum hawkbit_response hawkbit_probe | ( | void | ) |
#include <include/zephyr/mgmt/hawkbit/hawkbit.h>
The hawkBit probe verify if there is some update to be performed.
void hawkbit_reboot | ( | void | ) |
#include <include/zephyr/mgmt/hawkbit/hawkbit.h>
Request system to reboot.
int hawkbit_reset_action_id | ( | void | ) |
#include <include/zephyr/mgmt/hawkbit/hawkbit.h>
Resets the hawkBit action id, that is saved in settings.
This should be done after changing the hawkBit server.
0 | on success. |
-EAGAIN | if probe is currently running. |
-EIO | if the action id could not be reset. |
int hawkbit_set_custom_data_cb | ( | hawkbit_config_device_data_cb_handler_t | cb | ) |
#include <include/zephyr/mgmt/hawkbit/hawkbit.h>
Set the custom data callback.
This function is used to set the custom data callback. The callback is used to provide the custom data to the hawkBit server.
cb | The callback function. |
0 | on success. |
-EINVAL | if the callback is NULL. |
int hawkbit_set_device_identity_cb | ( | hawkbit_get_device_identity_cb_handler_t | cb | ) |
#include <include/zephyr/mgmt/hawkbit/hawkbit.h>
Set the device identity callback.
This function is used to set a custom device identity callback.
cb | The callback function. |
0 | on success. |
-EINVAL | if the callback is NULL. |