2020-10-29 07:11:16 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
typedef struct Power Power;
|
2021-04-30 04:51:48 +00:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
PowerBootModeNormal,
|
|
|
|
PowerBootModeDfu,
|
|
|
|
} PowerBootMode;
|
|
|
|
|
|
|
|
/** Power off device
|
|
|
|
* @param power - Power instance
|
|
|
|
*/
|
|
|
|
void power_off(Power* power);
|
|
|
|
|
2021-07-01 22:53:20 +00:00
|
|
|
/** Reboot device
|
2021-04-30 04:51:48 +00:00
|
|
|
* @param power - Power instance
|
|
|
|
* @param mode - PowerBootMode
|
|
|
|
*/
|
2021-07-01 22:53:20 +00:00
|
|
|
void power_reboot(Power* power, PowerBootMode mode);
|