Skip to content

Commit a7ee496

Browse files
maass-hamburgkartben
authored andcommitted
mgmt: hawkbit: add event for confirmed current image during init
add event for confirmed current image during initialization Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
1 parent 0826996 commit a7ee496

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

include/zephyr/mgmt/hawkbit/event.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ enum hawkbit_event_type {
5757
HAWKBIT_EVENT_END_RUN,
5858
/** Event triggered before hawkBit does a reboot */
5959
HAWKBIT_EVENT_BEFORE_REBOOT,
60+
/**
61+
* Event triggered during initialisation when the current image is confirmed and the old
62+
* image is erased
63+
*/
64+
HAWKBIT_EVENT_CONFIRMED_CURRENT_IMAGE,
6065
};
6166

6267
struct hawkbit_event_callback;

subsys/mgmt/hawkbit/hawkbit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,8 @@ int hawkbit_init(void)
864864
LOG_ERR("Failed to erase second slot: %d", ret);
865865
return ret;
866866
}
867+
868+
hawkbit_event_raise(HAWKBIT_EVENT_CONFIRMED_CURRENT_IMAGE);
867869
}
868870
hawkbit_initialized = true;
869871

0 commit comments

Comments
 (0)