2020-11-17 20:08:31 +03:00
|
|
|
#pragma once
|
2021-04-19 19:30:25 +03:00
|
|
|
#include <stdint.h>
|
2020-11-17 20:08:31 +03:00
|
|
|
|
2020-12-02 13:47:13 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2021-03-24 12:35:33 +03:00
|
|
|
/** Boot modes */
|
2020-11-17 20:08:31 +03:00
|
|
|
typedef enum {
|
|
|
|
ApiHalBootModeNormal,
|
|
|
|
ApiHalBootModeDFU
|
|
|
|
} ApiHalBootMode;
|
|
|
|
|
2021-05-18 16:57:39 +03:00
|
|
|
/** Boot flags */
|
|
|
|
typedef enum {
|
|
|
|
ApiHalBootFlagDefault=0,
|
|
|
|
ApiHalBootFlagFactoryReset=1,
|
|
|
|
} ApiHalBootFlag;
|
|
|
|
|
2021-07-02 16:02:36 +03:00
|
|
|
/** Initialize boot subsystem */
|
|
|
|
void api_hal_boot_init();
|
|
|
|
|
2021-03-24 12:35:33 +03:00
|
|
|
/** Set boot mode */
|
2020-11-17 20:08:31 +03:00
|
|
|
void api_hal_boot_set_mode(ApiHalBootMode mode);
|
2020-12-02 13:47:13 +03:00
|
|
|
|
2021-05-18 16:57:39 +03:00
|
|
|
/** Set boot flags */
|
|
|
|
void api_hal_boot_set_flags(ApiHalBootFlag flags);
|
|
|
|
|
|
|
|
/** Get boot flag */
|
|
|
|
ApiHalBootFlag api_hal_boot_get_flags();
|
|
|
|
|
2020-12-02 13:47:13 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|