Zephyr API Documentation 4.0.0-rc3
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bootmode.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12#ifndef ZEPHYR_INCLUDE_RETENTION_BOOTMODE_
13#define ZEPHYR_INCLUDE_RETENTION_BOOTMODE_
14
15#include <stdint.h>
16#include <stddef.h>
17#include <zephyr/kernel.h>
18#include <zephyr/device.h>
19#include <zephyr/types.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
39
49int bootmode_check(uint8_t boot_mode);
50
59int bootmode_set(uint8_t boot_mode);
60
69
74#ifdef __cplusplus
75}
76#endif
77
78#endif /* ZEPHYR_INCLUDE_RETENTION_BOOTMODE_ */
BOOT_MODE_TYPES
Definition bootmode.h:32
int bootmode_clear(void)
Clear boot mode value (sets to 0) - which corresponds to BOOT_MODE_TYPE_NORMAL.
int bootmode_set(uint8_t boot_mode)
Sets boot mode of device.
int bootmode_check(uint8_t boot_mode)
Checks if the boot mode of the device is set to a specific value.
@ BOOT_MODE_TYPE_BOOTLOADER
Bootloader boot mode (e.g.
Definition bootmode.h:37
@ BOOT_MODE_TYPE_NORMAL
Default (normal) boot, to user application.
Definition bootmode.h:34
Public kernel APIs.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88