Zephyr API Documentation 4.0.0-rc3
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
hawkBit autohandler API

hawkBit autohandler API. More...

Functions

void hawkbit_autohandler (bool auto_reschedule)
 Runs hawkBit probe and hawkBit update automatically.
 
enum hawkbit_response hawkbit_autohandler_wait (uint32_t events, k_timeout_t timeout)
 Wait for the autohandler to finish.
 
int hawkbit_autohandler_cancel (void)
 Cancel the run of the hawkBit autohandler.
 
int hawkbit_autohandler_set_delay (k_timeout_t timeout, bool if_bigger)
 Set the delay for the next run of the autohandler.
 

Detailed Description

hawkBit autohandler API.

Function Documentation

◆ hawkbit_autohandler()

void hawkbit_autohandler ( bool auto_reschedule)

#include <zephyr/mgmt/hawkbit/autohandler.h>

Runs hawkBit probe and hawkBit update automatically.

The hawkbit_autohandler handles the whole process in pre-determined time intervals.

Parameters
auto_rescheduleIf true, the handler will reschedule itself

◆ hawkbit_autohandler_cancel()

int hawkbit_autohandler_cancel ( void )

#include <zephyr/mgmt/hawkbit/autohandler.h>

Cancel the run of the hawkBit autohandler.

Returns
a value from k_work_cancel_delayable().

◆ hawkbit_autohandler_set_delay()

int hawkbit_autohandler_set_delay ( k_timeout_t timeout,
bool if_bigger )

#include <zephyr/mgmt/hawkbit/autohandler.h>

Set the delay for the next run of the autohandler.

This function will only delay the next run of the autohandler. The delay will not persist after the autohandler runs.

Parameters
timeoutThe delay to set.
if_biggerIf true, the delay will be set only if the new delay is bigger than the current one.
Return values
0if if_bigger was true and the current delay was bigger than the new one.
otherwise,avalue from k_work_reschedule().

◆ hawkbit_autohandler_wait()

enum hawkbit_response hawkbit_autohandler_wait ( uint32_t events,
k_timeout_t timeout )

#include <zephyr/mgmt/hawkbit/autohandler.h>

Wait for the autohandler to finish.

Parameters
eventsSet of desired events on which to wait. Set to UINT32_MAX to wait for the autohandler to finish one run, or BIT() together with a value from hawkbit_response to wait for a specific event.
timeoutWaiting period for the desired set of events or one of the special values K_NO_WAIT and K_FOREVER.
Returns
A value from hawkbit_response.