mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/riotboot: provide riotboot_slot_offset()
This commit is contained in:
parent
3e7ddcdd4c
commit
87fcd061a8
@ -93,6 +93,11 @@ static inline void riotboot_slot_print_hdr(unsigned slot)
|
||||
riotboot_hdr_print(riotboot_slot_get_hdr(slot));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the offset (in flash, in bytes) for a given slot.
|
||||
*/
|
||||
size_t riotboot_slot_offset(unsigned slot);
|
||||
|
||||
/**
|
||||
* @brief Dump the addresses of all configured slots
|
||||
*
|
||||
|
@ -93,3 +93,8 @@ const riotboot_hdr_t *riotboot_slot_get_hdr(unsigned slot)
|
||||
|
||||
return riotboot_slots[slot];
|
||||
}
|
||||
|
||||
size_t riotboot_slot_offset(unsigned slot)
|
||||
{
|
||||
return (size_t)riotboot_slot_get_hdr(slot) - CPU_FLASH_BASE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user