@@ -88,62 +88,6 @@ int hawkbit_set_custom_data_cb(hawkbit_config_device_data_cb_handler_t cb);
8888 */
8989int hawkbit_init (void );
9090
91- /**
92- * @brief Runs hawkBit probe and hawkBit update automatically
93- *
94- * @details The hawkbit_autohandler handles the whole process
95- * in pre-determined time intervals.
96- *
97- * @param auto_reschedule If true, the handler will reschedule itself
98- */
99- void hawkbit_autohandler (bool auto_reschedule );
100-
101- /**
102- * @brief Wait for the autohandler to finish.
103- *
104- * @param events Set of desired events on which to wait. Set to ::UINT32_MAX to wait for the
105- * autohandler to finish one run, or BIT() together with a value from
106- * ::hawkbit_response to wait for a specific event.
107- * @param timeout Waiting period for the desired set of events or one of the
108- * special values ::K_NO_WAIT and ::K_FOREVER.
109- *
110- * @retval HAWKBIT_OK if success.
111- * @retval HAWKBIT_NO_RESPONSE if matching events were not received within the specified time
112- * @retval HAWKBIT_NETWORKING_ERROR fail to connect to the hawkBit server.
113- * @retval HAWKBIT_UNCONFIRMED_IMAGE image is unconfirmed.
114- * @retval HAWKBIT_PERMISSION_ERROR fail to get the permission to access the hawkBit server.
115- * @retval HAWKBIT_METADATA_ERROR fail to parse or to encode the metadata.
116- * @retval HAWKBIT_DOWNLOAD_ERROR fail while downloading the update package.
117- * @retval HAWKBIT_UPDATE_INSTALLED if an update was installed. Reboot is required to apply it.
118- * @retval HAWKBIT_NO_UPDATE if no update was available.
119- * @retval HAWKBIT_CANCEL_UPDATE update was cancelled.
120- * @retval HAWKBIT_NOT_INITIALIZED if hawkBit is not initialized.
121- * @retval HAWKBIT_PROBE_IN_PROGRESS if probe is currently running.
122- */
123- enum hawkbit_response hawkbit_autohandler_wait (uint32_t events , k_timeout_t timeout );
124-
125- /**
126- * @brief Cancel the run of the hawkBit autohandler.
127- *
128- * @return a value from k_work_cancel_delayable().
129- */
130- int hawkbit_autohandler_cancel (void );
131-
132- /**
133- * @brief Set the delay for the next run of the autohandler.
134- *
135- * @details This function will only delay the next run of the autohandler. The delay will not
136- * persist after the autohandler runs.
137- *
138- * @param timeout The delay to set.
139- * @param if_bigger If true, the delay will be set only if the new delay is bigger than the current
140- * one.
141- *
142- * @retval 0 if @a if_bigger was true and the current delay was bigger than the new one.
143- * @retval otherwise, a value from k_work_reschedule().
144- */
145- int hawkbit_autohandler_set_delay (k_timeout_t timeout , bool if_bigger );
146-
14791/**
14892 * @brief The hawkBit probe verify if there is some update to be performed.
14993 *
@@ -330,6 +274,70 @@ uint32_t hawkbit_get_poll_interval(void);
330274int hawkbit_reset_action_id (void );
331275
332276/**
277+ * @brief hawkBit autohandler.
278+ * @defgroup hawkbit_autohandler hawkBit autohandler
279+ * @ingroup hawkbit
280+ * @{
281+ */
282+
283+ /**
284+ * @brief Runs hawkBit probe and hawkBit update automatically
285+ *
286+ * @details The hawkbit_autohandler handles the whole process
287+ * in pre-determined time intervals.
288+ *
289+ * @param auto_reschedule If true, the handler will reschedule itself
290+ */
291+ void hawkbit_autohandler (bool auto_reschedule );
292+
293+ /**
294+ * @brief Wait for the autohandler to finish.
295+ *
296+ * @param events Set of desired events on which to wait. Set to ::UINT32_MAX to wait for the
297+ * autohandler to finish one run, or BIT() together with a value from
298+ * ::hawkbit_response to wait for a specific event.
299+ * @param timeout Waiting period for the desired set of events or one of the
300+ * special values ::K_NO_WAIT and ::K_FOREVER.
301+ *
302+ * @retval HAWKBIT_OK if success.
303+ * @retval HAWKBIT_NO_RESPONSE if matching events were not received within the specified time
304+ * @retval HAWKBIT_NETWORKING_ERROR fail to connect to the hawkBit server.
305+ * @retval HAWKBIT_UNCONFIRMED_IMAGE image is unconfirmed.
306+ * @retval HAWKBIT_PERMISSION_ERROR fail to get the permission to access the hawkBit server.
307+ * @retval HAWKBIT_METADATA_ERROR fail to parse or to encode the metadata.
308+ * @retval HAWKBIT_DOWNLOAD_ERROR fail while downloading the update package.
309+ * @retval HAWKBIT_UPDATE_INSTALLED if an update was installed. Reboot is required to apply it.
310+ * @retval HAWKBIT_NO_UPDATE if no update was available.
311+ * @retval HAWKBIT_CANCEL_UPDATE update was cancelled.
312+ * @retval HAWKBIT_NOT_INITIALIZED if hawkBit is not initialized.
313+ * @retval HAWKBIT_PROBE_IN_PROGRESS if probe is currently running.
314+ */
315+ enum hawkbit_response hawkbit_autohandler_wait (uint32_t events , k_timeout_t timeout );
316+
317+ /**
318+ * @brief Cancel the run of the hawkBit autohandler.
319+ *
320+ * @return a value from k_work_cancel_delayable().
321+ */
322+ int hawkbit_autohandler_cancel (void );
323+
324+ /**
325+ * @brief Set the delay for the next run of the autohandler.
326+ *
327+ * @details This function will only delay the next run of the autohandler. The delay will not
328+ * persist after the autohandler runs.
329+ *
330+ * @param timeout The delay to set.
331+ * @param if_bigger If true, the delay will be set only if the new delay is bigger than the current
332+ * one.
333+ *
334+ * @retval 0 if @a if_bigger was true and the current delay was bigger than the new one.
335+ * @retval otherwise, a value from k_work_reschedule().
336+ */
337+ int hawkbit_autohandler_set_delay (k_timeout_t timeout , bool if_bigger );
338+
339+ /**
340+ * @}
333341 * @}
334342 */
335343
0 commit comments