Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Boot mode interface. More...

Enumerations

enum  BOOT_MODE_TYPES { BOOT_MODE_TYPE_NORMAL = 0x00 , BOOT_MODE_TYPE_BOOTLOADER }
 

Functions

int bootmode_check (uint8_t boot_mode)
 Checks if the boot mode of the device is set to a specific value.
 
int bootmode_set (uint8_t boot_mode)
 Sets boot mode of device.
 
int bootmode_clear (void)
 Clear boot mode value (sets to 0) - which corresponds to BOOT_MODE_TYPE_NORMAL.
 

Detailed Description

Boot mode interface.

Enumeration Type Documentation

◆ BOOT_MODE_TYPES

#include <zephyr/retention/bootmode.h>

Enumerator
BOOT_MODE_TYPE_NORMAL 

Default (normal) boot, to user application.

BOOT_MODE_TYPE_BOOTLOADER 

Bootloader boot mode (e.g.

serial recovery for MCUboot)

Function Documentation

◆ bootmode_check()

int bootmode_check ( uint8_t  boot_mode)

#include <zephyr/retention/bootmode.h>

Checks if the boot mode of the device is set to a specific value.

Parameters
boot_modeExpected boot mode to check.
Return values
1If successful and boot mode matches.
0If boot mode does not match.
-errnoError code code.

◆ bootmode_clear()

int bootmode_clear ( void  )

#include <zephyr/retention/bootmode.h>

Clear boot mode value (sets to 0) - which corresponds to BOOT_MODE_TYPE_NORMAL.

Return values
0If successful.
-errnoError code code.

◆ bootmode_set()

int bootmode_set ( uint8_t  boot_mode)

#include <zephyr/retention/bootmode.h>

Sets boot mode of device.

Parameters
boot_modeBoot mode value to set.
Return values
0If successful.
-errnoError code code.