Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
hawkbit.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Linumiz
3 * Copyright (c) 2024 Vogl Electronic GmbH
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
20#ifndef ZEPHYR_INCLUDE_MGMT_HAWKBIT_HAWKBIT_H_
21#define ZEPHYR_INCLUDE_MGMT_HAWKBIT_HAWKBIT_H_
22
23#include <stdint.h>
24
59
71typedef int (*hawkbit_config_device_data_cb_handler_t)(const char *device_id, uint8_t *buffer,
72 const size_t buffer_size);
73
86
93int hawkbit_init(void);
94
101
105void hawkbit_reboot(void);
106
113typedef bool (*hawkbit_get_device_identity_cb_handler_t)(char *id, int id_max_len);
114
126
138
143#endif /* ZEPHYR_INCLUDE_MGMT_HAWKBIT_HAWKBIT_H_ */
void hawkbit_reboot(void)
Request system to reboot.
int hawkbit_init(void)
Init the flash partition.
bool(* hawkbit_get_device_identity_cb_handler_t)(char *id, int id_max_len)
Callback to get the device identity.
Definition hawkbit.h:113
int hawkbit_reset_action_id(void)
Resets the hawkBit action id, that is saved in settings.
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.
Definition hawkbit.h:71
int hawkbit_set_device_identity_cb(hawkbit_get_device_identity_cb_handler_t cb)
Set the device identity callback.
enum hawkbit_response hawkbit_probe(void)
The hawkBit probe verify if there is some update to be performed.
hawkbit_response
Response message from hawkBit.
Definition hawkbit.h:33
int hawkbit_set_custom_data_cb(hawkbit_config_device_data_cb_handler_t cb)
Set the custom data callback.
@ HAWKBIT_PERMISSION_ERROR
fail to get the permission to access the hawkBit server
Definition hawkbit.h:41
@ HAWKBIT_PROBE_IN_PROGRESS
probe is currently running
Definition hawkbit.h:57
@ HAWKBIT_METADATA_ERROR
fail to parse or to encode the metadata
Definition hawkbit.h:43
@ HAWKBIT_NETWORKING_ERROR
fail to connect to the hawkBit server
Definition hawkbit.h:37
@ HAWKBIT_OK
image was already updated
Definition hawkbit.h:47
@ HAWKBIT_CANCEL_UPDATE
update was cancelled by the server
Definition hawkbit.h:53
@ HAWKBIT_UPDATE_INSTALLED
an update was installed.
Definition hawkbit.h:49
@ HAWKBIT_NO_RESPONSE
matching events were not received within the specified time
Definition hawkbit.h:35
@ HAWKBIT_NOT_INITIALIZED
hawkBit is not initialized
Definition hawkbit.h:55
@ HAWKBIT_NO_UPDATE
no update was available
Definition hawkbit.h:51
@ HAWKBIT_UNCONFIRMED_IMAGE
image is unconfirmed
Definition hawkbit.h:39
@ HAWKBIT_DOWNLOAD_ERROR
fail while downloading the update package
Definition hawkbit.h:45
#define bool
Definition stdbool.h:13
__UINT8_TYPE__ uint8_t
Definition stdint.h:88