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