-
Notifications
You must be signed in to change notification settings - Fork 3
/
shims.d.ts
71 lines (59 loc) · 2.1 KB
/
shims.d.ts
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
65
66
67
68
69
70
71
// Auto-generated. Do not edit.
//% block="Power"
//% icon="\uf011"
//% color=#AA278D
declare namespace power {
/**
* Request low power when the next idle
* @param mode If Continue, then return immediately; if Wait, then pause until a power-up event occurs
*/
//% shim=power::_lowPowerRequest
function _lowPowerRequest(mode: LowPowerMode): void;
/**
* Pause for a fixed interval, and request low power when idle.
* @param interval The period of time to pause, in milliseconds.
*/
//% shim=power::_lowPowerPause
function _lowPowerPause(interval: int32): void;
/**
* Prevent or allow low power.
* Prevent and allow requests should occur in pairs.
* The default is to allow.
*/
//% shim=power::_lowPowerEnable
function _lowPowerEnable(enable: LowPowerEnable): void;
/**
* Determine if low power is enabled
*/
//% shim=power::_lowPowerIsEnabled
function _lowPowerIsEnabled(): boolean;
/**
* Do something repeatedy with full power using a timer.
* @param interval the time (in ms) for the timer.
* @param code the code to execute
*/
//% shim=power::_fullPowerEvery
function _fullPowerEvery(interval: int32, code: () => void): void;
/**
* Set whether the source should trigger full power.
* @param source the source to set
* @param enable true to trigger full power
*/
//% shim=power::_fullPowerSourceEnable
function _fullPowerSourceEnable(source: FullPowerSource, enable: boolean): void;
/**
* Determine if the source will trigger full power.
* @param source the source to check
* @return true if the source will trigger full power
*/
//% help=power/full-power-source-is-enabled
//% shim=power::_fullPowerSourceIsEnabled
function _fullPowerSourceIsEnabled(source: FullPowerSource): boolean;
/**
* Set the source to trigger full power.
* @param source the source to set
*/
//% shim=power::_fullPowerOn
function _fullPowerOn(source: FullPowerSource): void;
}
// Auto-generated. Do not edit. Really.