mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
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);
|
||||
|
||||
/**
|
||||
* @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
|
||||
*
|
||||
|
@ -60,6 +60,11 @@ int riotboot_slot_current(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int riotboot_slot_other(void)
|
||||
{
|
||||
return riotboot_slot_current() ? 0 : 1;
|
||||
}
|
||||
|
||||
void riotboot_slot_jump(unsigned slot)
|
||||
{
|
||||
_riotboot_slot_jump_to_image(riotboot_slot_get_hdr(slot));
|
||||
|
Loading…
Reference in New Issue
Block a user