Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
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. | |
Boot mode interface.
enum BOOT_MODE_TYPES |
#include <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) |
int bootmode_check | ( | uint8_t | boot_mode | ) |
#include <include/zephyr/retention/bootmode.h>
Checks if the boot mode of the device is set to a specific value.
boot_mode | Expected boot mode to check. |
1 | If successful and boot mode matches. |
0 | If boot mode does not match. |
-errno | Error code code. |
int bootmode_clear | ( | void | ) |
#include <include/zephyr/retention/bootmode.h>
Clear boot mode value (sets to 0) - which corresponds to BOOT_MODE_TYPE_NORMAL.
0 | If successful. |
-errno | Error code code. |
int bootmode_set | ( | uint8_t | boot_mode | ) |
#include <include/zephyr/retention/bootmode.h>
Sets boot mode of device.
boot_mode | Boot mode value to set. |
0 | If successful. |
-errno | Error code code. |