sys/riotboot: introduce riotboot_slot_other()
This commit is contained in:
parent
ae35860510
commit
d75c1fd76c
@ -38,6 +38,13 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
int riotboot_slot_current(void);
|
int riotboot_slot_current(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get currently not running image slot
|
||||||
|
*
|
||||||
|
* @returns nr of currently inactive slot
|
||||||
|
*/
|
||||||
|
int riotboot_slot_other(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get jump-to address of image slot
|
* @brief Get jump-to address of image slot
|
||||||
*
|
*
|
||||||
|
|||||||
@ -60,6 +60,11 @@ int riotboot_slot_current(void)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int riotboot_slot_other(void)
|
||||||
|
{
|
||||||
|
return riotboot_slot_current() ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
void riotboot_slot_jump(unsigned slot)
|
void riotboot_slot_jump(unsigned slot)
|
||||||
{
|
{
|
||||||
_riotboot_slot_jump_to_image(riotboot_slot_get_hdr(slot));
|
_riotboot_slot_jump_to_image(riotboot_slot_get_hdr(slot));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user