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);
|
|
|
|
|
|
|
|
/** Reset device
|
|
|
|
* @param power - Power instance
|
|
|
|
* @param mode - PowerBootMode
|
|
|
|
*/
|
|
|
|
void power_reset(Power* power, PowerBootMode mode);
|