This repository has been archived by the owner on Jun 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 224
/
power_decl.h
64 lines (53 loc) · 1.84 KB
/
power_decl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Microsoft Corporation. All rights reserved.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef _DRIVERS_POWER_DECL_H_
#define _DRIVERS_POWER_DECL_H_ 1
//--//
//
// !!! KEEP IN SYNC WITH Microsoft.SPOT.Hardware.SleepLevel !!!
//
enum SLEEP_LEVEL
{
SLEEP_LEVEL__AWAKE = 0x00,
SLEEP_LEVEL__SELECTIVE_OFF = 0x10,
SLEEP_LEVEL__SLEEP = 0x20,
SLEEP_LEVEL__DEEP_SLEEP = 0x30,
SLEEP_LEVEL__OFF = 0x40,
};
//
// !!! KEEP IN SYNC WITH Microsoft.SPOT.Hardware.SleepEventType !!!
//
enum SLEEP_LEVEL_CATEGORY
{
SLEEP_LEVEL_CATEGORY__INVALID = 0x00,
SLEEP_LEVEL_CATEGORY__CHANGEREQUESTED = 0x01,
SLEEP_LEVEL_CATEGORY__WAKEUP = 0x02,
};
//
// !!! KEEP IN SYNC WITH Microsoft.SPOT.Hardware.PowerLevel !!!
//
enum POWER_LEVEL
{
POWER_LEVEL__HIGH_POWER = 0x10,
POWER_LEVEL__MID_POWER = 0x20,
POWER_LEVEL__LOW_POWER = 0x30,
};
//
// !!! KEEP IN SYNC WITH Microsoft.SPOT.Hardware.PowerEventType !!!
//
enum POWER_LEVEL_CATEGORY
{
POWER_LEVEL_CATEGORY__INVALID = 0x00,
POWER_LEVEL_CATEGORY__PRENOTIFY = 0x01,
POWER_LEVEL_CATEGORY__POSTNOTIFY = 0x02,
};
//--//
BOOL CPU_Initialize ();
void CPU_Reset ();
void CPU_Sleep (SLEEP_LEVEL level, UINT64 wakeEvents);
void CPU_ChangePowerLevel(POWER_LEVEL level);
void CPU_Halt ();
BOOL CPU_IsSoftRebootSupported();
//--//
#endif // _DRIVERS_POWER_DECL_H_