mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-15 09:33:50 +01:00
sys/riotboot/slot: add riotboot_slot_get_current_hdr()
This commit is contained in:
parent
57cdaa3c1e
commit
6e55a2050e
@ -71,6 +71,20 @@ void riotboot_slot_jump(unsigned slot);
|
||||
*/
|
||||
const riotboot_hdr_t *riotboot_slot_get_hdr(unsigned slot);
|
||||
|
||||
/**
|
||||
* @brief Get header from currently running image slot
|
||||
*
|
||||
* @returns header of current image
|
||||
*/
|
||||
static inline const riotboot_hdr_t *riotboot_slot_get_current_hdr(void)
|
||||
{
|
||||
int slot = riotboot_slot_current();
|
||||
if (slot < 0) {
|
||||
return NULL;
|
||||
}
|
||||
return riotboot_slot_get_hdr(slot);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Validate slot
|
||||
*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user