2016-04-02 02:45:18 +02:00
|
|
|
// Auto-generated. Do not edit.
|
2019-12-02 05:58:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
declare const enum NumberFormat {
|
|
|
|
Int8LE = 1,
|
|
|
|
UInt8LE = 2,
|
|
|
|
Int16LE = 3,
|
|
|
|
UInt16LE = 4,
|
|
|
|
Int32LE = 5,
|
|
|
|
Int8BE = 6,
|
|
|
|
UInt8BE = 7,
|
|
|
|
Int16BE = 8,
|
|
|
|
UInt16BE = 9,
|
|
|
|
Int32BE = 10,
|
|
|
|
|
|
|
|
UInt32LE = 11,
|
|
|
|
UInt32BE = 12,
|
|
|
|
Float32LE = 13,
|
|
|
|
Float64LE = 14,
|
|
|
|
Float32BE = 15,
|
|
|
|
Float64BE = 16,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
declare const enum PerfCounters {
|
|
|
|
GC = 0,
|
|
|
|
}
|
2016-04-02 04:55:51 +02:00
|
|
|
declare namespace images {
|
|
|
|
}
|
2016-04-02 02:45:18 +02:00
|
|
|
declare namespace basic {
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum Button {
|
2016-04-02 02:45:18 +02:00
|
|
|
A = 1, // MICROBIT_ID_BUTTON_A
|
|
|
|
B = 2, // MICROBIT_ID_BUTTON_B
|
|
|
|
//% block="A+B"
|
2020-08-19 22:03:58 +02:00
|
|
|
AB = 3, // MICROBIT_ID_BUTTON_AB
|
2020-02-20 03:24:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum Dimension {
|
2016-04-02 02:45:18 +02:00
|
|
|
//% block=x
|
|
|
|
X = 0,
|
|
|
|
//% block=y
|
|
|
|
Y = 1,
|
|
|
|
//% block=z
|
|
|
|
Z = 2,
|
|
|
|
//% block=strength
|
|
|
|
Strength = 3,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum Rotation {
|
2016-04-02 02:45:18 +02:00
|
|
|
//% block=pitch
|
|
|
|
Pitch = 0,
|
|
|
|
//% block=roll
|
|
|
|
Roll = 1,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum TouchPin {
|
2020-08-19 22:03:58 +02:00
|
|
|
P0 = 112, // MICROBIT_ID_IO_P12
|
|
|
|
P1 = 100, // MICROBIT_ID_IO_P0
|
|
|
|
P2 = 101, // MICROBIT_ID_IO_P1
|
|
|
|
P3 = 116, // MICROBIT_ID_IO_P16
|
2016-04-02 02:45:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum AcceleratorRange {
|
2016-04-02 02:45:18 +02:00
|
|
|
/**
|
|
|
|
* The accelerator measures forces up to 1 gravity
|
|
|
|
*/
|
|
|
|
//% block="1g"
|
|
|
|
OneG = 1,
|
|
|
|
/**
|
|
|
|
* The accelerator measures forces up to 2 gravity
|
|
|
|
*/
|
|
|
|
//% block="2g"
|
|
|
|
TwoG = 2,
|
|
|
|
/**
|
|
|
|
* The accelerator measures forces up to 4 gravity
|
|
|
|
*/
|
|
|
|
//% block="4g"
|
|
|
|
FourG = 4,
|
|
|
|
/**
|
|
|
|
* The accelerator measures forces up to 8 gravity
|
|
|
|
*/
|
|
|
|
//% block="8g"
|
|
|
|
EightG = 8,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum Gesture {
|
2016-04-02 02:45:18 +02:00
|
|
|
/**
|
|
|
|
* Raised when shaken
|
|
|
|
*/
|
|
|
|
//% block=shake
|
2019-12-02 05:58:26 +01:00
|
|
|
//% jres=gestures.shake
|
|
|
|
Shake = 11, // MICROBIT_ACCELEROMETER_EVT_SHAKE
|
2016-04-02 02:45:18 +02:00
|
|
|
/**
|
|
|
|
* Raised when the logo is upward and the screen is vertical
|
|
|
|
*/
|
|
|
|
//% block="logo up"
|
2019-12-02 05:58:26 +01:00
|
|
|
//% jres=gestures.tiltforward
|
2016-05-12 21:35:40 +02:00
|
|
|
LogoUp = 1, // MICROBIT_ACCELEROMETER_EVT_TILT_UP
|
2016-04-02 02:45:18 +02:00
|
|
|
/**
|
|
|
|
* Raised when the logo is downward and the screen is vertical
|
|
|
|
*/
|
|
|
|
//% block="logo down"
|
2019-12-02 05:58:26 +01:00
|
|
|
//% jres=gestures.tiltbackwards
|
2016-05-12 21:35:40 +02:00
|
|
|
LogoDown = 2, // MICROBIT_ACCELEROMETER_EVT_TILT_DOWN
|
2016-04-02 02:45:18 +02:00
|
|
|
/**
|
2020-05-08 18:35:38 +02:00
|
|
|
* Raised when the screen is pointing up and the board is horizontal
|
2016-04-02 02:45:18 +02:00
|
|
|
*/
|
|
|
|
//% block="screen up"
|
2019-12-02 05:58:26 +01:00
|
|
|
//% jres=gestures.frontsideup
|
2016-05-12 21:35:40 +02:00
|
|
|
ScreenUp = 5, // MICROBIT_ACCELEROMETER_EVT_FACE_UP
|
2016-04-02 02:45:18 +02:00
|
|
|
/**
|
2020-05-08 18:35:38 +02:00
|
|
|
* Raised when the screen is pointing down and the board is horizontal
|
2016-04-02 02:45:18 +02:00
|
|
|
*/
|
|
|
|
//% block="screen down"
|
2019-12-02 05:58:26 +01:00
|
|
|
//% jres=gestures.backsideup
|
2016-05-12 21:35:40 +02:00
|
|
|
ScreenDown = 6, // MICROBIT_ACCELEROMETER_EVT_FACE_DOWN
|
2016-04-02 02:45:18 +02:00
|
|
|
/**
|
|
|
|
* Raised when the screen is pointing left
|
|
|
|
*/
|
|
|
|
//% block="tilt left"
|
2019-12-02 05:58:26 +01:00
|
|
|
//% jres=gestures.tiltleft
|
2016-05-12 21:35:40 +02:00
|
|
|
TiltLeft = 3, // MICROBIT_ACCELEROMETER_EVT_TILT_LEFT
|
2016-04-02 02:45:18 +02:00
|
|
|
/**
|
|
|
|
* Raised when the screen is pointing right
|
|
|
|
*/
|
|
|
|
//% block="tilt right"
|
2019-12-02 05:58:26 +01:00
|
|
|
//% jres=gestures.tiltright
|
2016-05-12 21:35:40 +02:00
|
|
|
TiltRight = 4, // MICROBIT_ACCELEROMETER_EVT_TILT_RIGHT
|
2016-04-02 02:45:18 +02:00
|
|
|
/**
|
|
|
|
* Raised when the board is falling!
|
|
|
|
*/
|
|
|
|
//% block="free fall"
|
2019-12-02 05:58:26 +01:00
|
|
|
//% jres=gestures.freefall
|
2016-05-12 21:35:40 +02:00
|
|
|
FreeFall = 7, // MICROBIT_ACCELEROMETER_EVT_FREEFALL
|
2016-05-20 14:39:44 +02:00
|
|
|
/**
|
|
|
|
* Raised when a 3G shock is detected
|
|
|
|
*/
|
|
|
|
//% block="3g"
|
2019-12-02 05:58:26 +01:00
|
|
|
//% jres=gestures.impact3g
|
|
|
|
ThreeG = 8, // MICROBIT_ACCELEROMETER_EVT_3G
|
2016-05-20 14:39:44 +02:00
|
|
|
/**
|
|
|
|
* Raised when a 6G shock is detected
|
|
|
|
*/
|
|
|
|
//% block="6g"
|
2019-12-02 05:58:26 +01:00
|
|
|
//% jres=gestures.impact6g
|
|
|
|
SixG = 9, // MICROBIT_ACCELEROMETER_EVT_6G
|
2017-12-14 20:00:47 +01:00
|
|
|
/**
|
|
|
|
* Raised when a 8G shock is detected
|
|
|
|
*/
|
|
|
|
//% block="8g"
|
2019-12-02 05:58:26 +01:00
|
|
|
//% jres=gestures.impact8g
|
|
|
|
EightG = 10, // MICROBIT_ACCELEROMETER_EVT_8G
|
2017-12-14 20:00:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
declare const enum MesDpadButtonInfo {
|
|
|
|
//% block="A down"
|
|
|
|
ADown = 1, // MES_DPAD_BUTTON_A_DOWN
|
|
|
|
//% block="A up"
|
|
|
|
AUp = 2, // MES_DPAD_BUTTON_A_UP
|
|
|
|
//% block="B down"
|
|
|
|
BDown = 3, // MES_DPAD_BUTTON_B_DOWN
|
|
|
|
//% block="B up"
|
|
|
|
BUp = 4, // MES_DPAD_BUTTON_B_UP
|
|
|
|
//% block="C down"
|
|
|
|
CDown = 5, // MES_DPAD_BUTTON_C_DOWN
|
|
|
|
//% block="C up"
|
|
|
|
CUp = 6, // MES_DPAD_BUTTON_C_UP
|
|
|
|
//% block="D down"
|
|
|
|
DDown = 7, // MES_DPAD_BUTTON_D_DOWN
|
|
|
|
//% block="D up"
|
|
|
|
DUp = 8, // MES_DPAD_BUTTON_D_UP
|
|
|
|
//% block="1 down"
|
|
|
|
_1Down = 9, // MES_DPAD_BUTTON_1_DOWN
|
|
|
|
//% block="1 up"
|
|
|
|
_1Up = 10, // MES_DPAD_BUTTON_1_UP
|
|
|
|
//% block="2 down"
|
|
|
|
_2Down = 11, // MES_DPAD_BUTTON_2_DOWN
|
|
|
|
//% block="2 up"
|
|
|
|
_2Up = 12, // MES_DPAD_BUTTON_2_UP
|
|
|
|
//% block="3 down"
|
|
|
|
_3Down = 13, // MES_DPAD_BUTTON_3_DOWN
|
|
|
|
//% block="3 up"
|
|
|
|
_3Up = 14, // MES_DPAD_BUTTON_3_UP
|
|
|
|
//% block="4 down"
|
|
|
|
_4Down = 15, // MES_DPAD_BUTTON_4_DOWN
|
|
|
|
//% block="4 up"
|
|
|
|
_4Up = 16, // MES_DPAD_BUTTON_4_UP
|
2016-04-02 02:45:18 +02:00
|
|
|
}
|
2016-04-02 06:26:06 +02:00
|
|
|
declare namespace input {
|
|
|
|
}
|
2016-04-02 02:45:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* How to create the event.
|
|
|
|
*/
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum EventCreationMode {
|
2016-04-02 02:45:18 +02:00
|
|
|
/**
|
|
|
|
* MicroBitEvent is initialised, and no further processing takes place.
|
|
|
|
*/
|
|
|
|
CreateOnly = 0, // CREATE_ONLY
|
|
|
|
/**
|
|
|
|
* MicroBitEvent is initialised, and its event handlers are immediately fired (not suitable for use in interrupts!).
|
|
|
|
*/
|
2016-04-15 02:58:10 +02:00
|
|
|
CreateAndFire = 1, // CREATE_AND_FIRE
|
2016-04-02 02:45:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum EventBusSource {
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MICROBIT_ID_BUTTON_A = 1, // MICROBIT_ID_BUTTON_A
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MICROBIT_ID_BUTTON_B = 2, // MICROBIT_ID_BUTTON_B
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_BUTTON_AB = 3, // MICROBIT_ID_BUTTON_AB
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_RADIO = 9, // MICROBIT_ID_RADIO
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_GESTURE = 13, // MICROBIT_ID_GESTURE
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_ACCELEROMETER = 5, // MICROBIT_ID_ACCELEROMETER
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P0 = 100, // MICROBIT_ID_IO_P0
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P1 = 101, // MICROBIT_ID_IO_P1
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P2 = 102, // MICROBIT_ID_IO_P2
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P3 = 103, // MICROBIT_ID_IO_P3
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P4 = 104, // MICROBIT_ID_IO_P4
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P5 = 105, // MICROBIT_ID_IO_P5
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P6 = 106, // MICROBIT_ID_IO_P6
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P7 = 107, // MICROBIT_ID_IO_P7
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P8 = 108, // MICROBIT_ID_IO_P8
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P9 = 109, // MICROBIT_ID_IO_P9
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P10 = 110, // MICROBIT_ID_IO_P10
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P11 = 111, // MICROBIT_ID_IO_P11
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P12 = 112, // MICROBIT_ID_IO_P12
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P13 = 113, // MICROBIT_ID_IO_P13
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P14 = 114, // MICROBIT_ID_IO_P14
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P15 = 115, // MICROBIT_ID_IO_P15
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P16 = 116, // MICROBIT_ID_IO_P16
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P19 = 119, // MICROBIT_ID_IO_P19
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2020-08-19 22:03:58 +02:00
|
|
|
MICROBIT_ID_IO_P20 = 120, // MICROBIT_ID_IO_P20
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DEVICE_INFO_ID = 1103, // MES_DEVICE_INFO_ID
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_SIGNAL_STRENGTH_ID = 1101, // MES_SIGNAL_STRENGTH_ID
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_CONTROLLER_ID = 1104, // MES_DPAD_CONTROLLER_ID
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventSourceId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_BROADCAST_GENERAL_ID = 2000, // MES_BROADCAST_GENERAL_ID
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum EventBusValue {
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MICROBIT_EVT_ANY = 0, // MICROBIT_EVT_ANY
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
|
|
|
MICROBIT_BUTTON_EVT_DOWN = 1, // MICROBIT_BUTTON_EVT_DOWN
|
|
|
|
//% blockIdentity="control.eventValueId"
|
|
|
|
MICROBIT_BUTTON_EVT_UP = 2, // MICROBIT_BUTTON_EVT_UP
|
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MICROBIT_BUTTON_EVT_CLICK = 3, // MICROBIT_BUTTON_EVT_CLICK
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MICROBIT_RADIO_EVT_DATAGRAM = 1, // MICROBIT_RADIO_EVT_DATAGRAM
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MICROBIT_ACCELEROMETER_EVT_DATA_UPDATE = 1, // MICROBIT_ACCELEROMETER_EVT_DATA_UPDATE
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2017-01-30 20:19:54 +01:00
|
|
|
MICROBIT_PIN_EVT_RISE = 2, // MICROBIT_PIN_EVT_RISE
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2017-01-30 20:19:54 +01:00
|
|
|
MICROBIT_PIN_EVT_FALL = 3, // MICROBIT_PIN_EVT_FALL
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2017-01-30 20:19:54 +01:00
|
|
|
MICROBIT_PIN_EVT_PULSE_HI = 4, // MICROBIT_PIN_EVT_PULSE_HI
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2017-01-30 20:19:54 +01:00
|
|
|
MICROBIT_PIN_EVT_PULSE_LO = 5, // MICROBIT_PIN_EVT_PULSE_LO
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_ALERT_EVT_ALARM1 = 6, // MES_ALERT_EVT_ALARM1
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_ALERT_EVT_ALARM2 = 7, // MES_ALERT_EVT_ALARM2
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_ALERT_EVT_ALARM3 = 8, // MES_ALERT_EVT_ALARM3
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_ALERT_EVT_ALARM4 = 9, // MES_ALERT_EVT_ALARM4
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_ALERT_EVT_ALARM5 = 10, // MES_ALERT_EVT_ALARM5
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_ALERT_EVT_ALARM6 = 11, // MES_ALERT_EVT_ALARM6
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_ALERT_EVT_DISPLAY_TOAST = 1, // MES_ALERT_EVT_DISPLAY_TOAST
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_ALERT_EVT_FIND_MY_PHONE = 5, // MES_ALERT_EVT_FIND_MY_PHONE
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_ALERT_EVT_PLAY_RINGTONE = 4, // MES_ALERT_EVT_PLAY_RINGTONE
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_ALERT_EVT_PLAY_SOUND = 3, // MES_ALERT_EVT_PLAY_SOUND
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_ALERT_EVT_VIBRATE = 2, // MES_ALERT_EVT_VIBRATE
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_CAMERA_EVT_LAUNCH_PHOTO_MODE = 1, // MES_CAMERA_EVT_LAUNCH_PHOTO_MODE
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_CAMERA_EVT_LAUNCH_VIDEO_MODE = 2, // MES_CAMERA_EVT_LAUNCH_VIDEO_MODE
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_CAMERA_EVT_START_VIDEO_CAPTURE = 4, // MES_CAMERA_EVT_START_VIDEO_CAPTURE
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_CAMERA_EVT_STOP_PHOTO_MODE = 6, // MES_CAMERA_EVT_STOP_PHOTO_MODE
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_CAMERA_EVT_STOP_VIDEO_CAPTURE = 5, // MES_CAMERA_EVT_STOP_VIDEO_CAPTURE
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_CAMERA_EVT_STOP_VIDEO_MODE = 7, // MES_CAMERA_EVT_STOP_VIDEO_MODE
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_CAMERA_EVT_TAKE_PHOTO = 3, // MES_CAMERA_EVT_TAKE_PHOTO
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_CAMERA_EVT_TOGGLE_FRONT_REAR = 8, // MES_CAMERA_EVT_TOGGLE_FRONT_REAR
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DEVICE_DISPLAY_OFF = 5, // MES_DEVICE_DISPLAY_OFF
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DEVICE_DISPLAY_ON = 6, // MES_DEVICE_DISPLAY_ON
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DEVICE_GESTURE_DEVICE_SHAKEN = 4, // MES_DEVICE_GESTURE_DEVICE_SHAKEN
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DEVICE_INCOMING_CALL = 7, // MES_DEVICE_INCOMING_CALL
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DEVICE_INCOMING_MESSAGE = 8, // MES_DEVICE_INCOMING_MESSAGE
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DEVICE_ORIENTATION_LANDSCAPE = 1, // MES_DEVICE_ORIENTATION_LANDSCAPE
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DEVICE_ORIENTATION_PORTRAIT = 2, // MES_DEVICE_ORIENTATION_PORTRAIT
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_BUTTON_1_DOWN = 9, // MES_DPAD_BUTTON_1_DOWN
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_BUTTON_1_UP = 10, // MES_DPAD_BUTTON_1_UP
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_BUTTON_2_DOWN = 11, // MES_DPAD_BUTTON_2_DOWN
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_BUTTON_2_UP = 12, // MES_DPAD_BUTTON_2_UP
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_BUTTON_3_DOWN = 13, // MES_DPAD_BUTTON_3_DOWN
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_BUTTON_3_UP = 14, // MES_DPAD_BUTTON_3_UP
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_BUTTON_4_DOWN = 15, // MES_DPAD_BUTTON_4_DOWN
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_BUTTON_4_UP = 16, // MES_DPAD_BUTTON_4_UP
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_BUTTON_A_DOWN = 1, // MES_DPAD_BUTTON_A_DOWN
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_BUTTON_A_UP = 2, // MES_DPAD_BUTTON_A_UP
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_BUTTON_B_DOWN = 3, // MES_DPAD_BUTTON_B_DOWN
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_BUTTON_B_UP = 4, // MES_DPAD_BUTTON_B_UP
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_BUTTON_C_DOWN = 5, // MES_DPAD_BUTTON_C_DOWN
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_BUTTON_C_UP = 6, // MES_DPAD_BUTTON_C_UP
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_BUTTON_D_DOWN = 7, // MES_DPAD_BUTTON_D_DOWN
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_DPAD_BUTTON_D_UP = 8, // MES_DPAD_BUTTON_D_UP
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_REMOTE_CONTROL_EVT_FORWARD = 6, // MES_REMOTE_CONTROL_EVT_FORWARD
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_REMOTE_CONTROL_EVT_NEXTTRACK = 4, // MES_REMOTE_CONTROL_EVT_NEXTTRACK
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_REMOTE_CONTROL_EVT_PAUSE = 2, // MES_REMOTE_CONTROL_EVT_PAUSE
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_REMOTE_CONTROL_EVT_PLAY = 1, // MES_REMOTE_CONTROL_EVT_PLAY
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_REMOTE_CONTROL_EVT_PREVTRACK = 5, // MES_REMOTE_CONTROL_EVT_PREVTRACK
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_REMOTE_CONTROL_EVT_REWIND = 7, // MES_REMOTE_CONTROL_EVT_REWIND
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_REMOTE_CONTROL_EVT_STOP = 3, // MES_REMOTE_CONTROL_EVT_STOP
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_REMOTE_CONTROL_EVT_VOLUMEDOWN = 9, // MES_REMOTE_CONTROL_EVT_VOLUMEDOWN
|
2017-12-14 20:00:47 +01:00
|
|
|
//% blockIdentity="control.eventValueId"
|
2016-04-02 02:45:18 +02:00
|
|
|
MES_REMOTE_CONTROL_EVT_VOLUMEUP = 8, // MES_REMOTE_CONTROL_EVT_VOLUMEUP
|
|
|
|
}
|
2019-12-02 05:58:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
declare const enum EventFlags {
|
|
|
|
//%
|
2020-08-19 22:03:58 +02:00
|
|
|
QueueIfBusy = 16, // MESSAGE_BUS_LISTENER_QUEUE_IF_BUSY
|
2019-12-02 05:58:26 +01:00
|
|
|
//%
|
2020-08-19 22:03:58 +02:00
|
|
|
DropIfBusy = 32, // MESSAGE_BUS_LISTENER_DROP_IF_BUSY
|
2019-12-02 05:58:26 +01:00
|
|
|
//%
|
2020-08-19 22:03:58 +02:00
|
|
|
Reentrant = 8, // MESSAGE_BUS_LISTENER_REENTRANT
|
2019-12-02 05:58:26 +01:00
|
|
|
}
|
2016-04-02 02:45:18 +02:00
|
|
|
declare namespace control {
|
|
|
|
}
|
|
|
|
|
2016-04-02 06:26:06 +02:00
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum DisplayMode {
|
2016-04-02 06:52:25 +02:00
|
|
|
//% block="black and white"
|
2019-12-02 05:58:26 +01:00
|
|
|
BlackAndWhite = 0, // DISPLAY_MODE_BLACK_AND_WHITE
|
|
|
|
//% blockHidden=true
|
2016-04-02 06:52:25 +02:00
|
|
|
BackAndWhite = 0, // DISPLAY_MODE_BLACK_AND_WHITE
|
|
|
|
//% block="greyscale"
|
|
|
|
Greyscale = 1, // DISPLAY_MODE_GREYSCALE
|
|
|
|
// TODO DISPLAY_MODE_BLACK_AND_WHITE_LIGHT_SENSE
|
|
|
|
}
|
|
|
|
declare namespace led {
|
2016-10-12 07:58:53 +02:00
|
|
|
}
|
2016-11-03 06:35:00 +01:00
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum MotorCommand {
|
2016-11-03 06:35:00 +01:00
|
|
|
//% block=coast
|
|
|
|
Coast = 0,
|
|
|
|
//% block=break
|
|
|
|
Break = 1,
|
|
|
|
//% block=sleep
|
|
|
|
Sleep = 2,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum Motor {
|
2016-11-03 06:35:00 +01:00
|
|
|
A = 0,
|
|
|
|
B = 1,
|
|
|
|
//% block="A and B"
|
|
|
|
AB = 2,
|
|
|
|
}
|
2016-10-12 07:58:53 +02:00
|
|
|
declare namespace motors {
|
2016-04-02 06:52:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum DigitalPin {
|
2020-08-19 22:03:58 +02:00
|
|
|
P0 = 112, // MICROBIT_ID_IO_P12
|
|
|
|
P1 = 100, // MICROBIT_ID_IO_P0
|
|
|
|
P2 = 101, // MICROBIT_ID_IO_P1
|
|
|
|
P3 = 116, // MICROBIT_ID_IO_P16
|
|
|
|
C4 = 103, // MICROBIT_ID_IO_P3
|
|
|
|
C5 = 104, // MICROBIT_ID_IO_P4
|
|
|
|
C6 = 110, // MICROBIT_ID_IO_P10
|
|
|
|
C7 = 113, // MICROBIT_ID_IO_P13
|
|
|
|
C8 = 114, // MICROBIT_ID_IO_P14
|
|
|
|
C9 = 115, // MICROBIT_ID_IO_P15
|
|
|
|
C10 = 109, // MICROBIT_ID_IO_P9
|
|
|
|
C11 = 107, // MICROBIT_ID_IO_P7
|
|
|
|
C12 = 106, // MICROBIT_ID_IO_P6
|
|
|
|
C16 = 102, // MICROBIT_ID_IO_P2
|
|
|
|
C17 = 108, // MICROBIT_ID_IO_P8
|
|
|
|
C18 = 120, // MICROBIT_ID_IO_P20
|
|
|
|
C19 = 119, // MICROBIT_ID_IO_P19
|
2016-04-02 06:26:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum AnalogPin {
|
2020-08-19 22:03:58 +02:00
|
|
|
P0 = 112, // MICROBIT_ID_IO_P12
|
|
|
|
P1 = 100, // MICROBIT_ID_IO_P0
|
|
|
|
P2 = 101, // MICROBIT_ID_IO_P1
|
|
|
|
P3 = 116, // MICROBIT_ID_IO_P16
|
|
|
|
C4 = 103, // MICROBIT_ID_IO_P3
|
|
|
|
C5 = 104, // MICROBIT_ID_IO_P4
|
|
|
|
C6 = 110, // MICROBIT_ID_IO_P10
|
|
|
|
C16 = 102, // MICROBIT_ID_IO_P2
|
|
|
|
C17 = 108, // MICROBIT_ID_IO_P8
|
|
|
|
MIC = 121, // MICROBIT_ID_IO_P21
|
2016-04-02 06:26:06 +02:00
|
|
|
}
|
2016-05-17 01:24:44 +02:00
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum PulseValue {
|
2019-12-02 05:58:26 +01:00
|
|
|
//% block=high
|
2016-05-17 01:24:44 +02:00
|
|
|
High = 4, // MICROBIT_PIN_EVT_PULSE_HI
|
2019-12-02 05:58:26 +01:00
|
|
|
//% block=low
|
2016-05-17 01:24:44 +02:00
|
|
|
Low = 5, // MICROBIT_PIN_EVT_PULSE_LO
|
|
|
|
}
|
2016-06-04 08:15:51 +02:00
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum PinPullMode {
|
2016-06-04 08:15:51 +02:00
|
|
|
//% block="down"
|
|
|
|
PullDown = 0,
|
|
|
|
//% block="up"
|
|
|
|
PullUp = 1,
|
|
|
|
//% block="none"
|
|
|
|
PullNone = 2,
|
|
|
|
}
|
2016-05-26 20:07:09 +02:00
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum PinEventType {
|
2017-01-30 20:19:54 +01:00
|
|
|
//% block="edge"
|
2020-08-19 22:03:58 +02:00
|
|
|
Edge = 2, // MICROBIT_PIN_EVENT_ON_EDGE
|
2017-01-30 20:19:54 +01:00
|
|
|
//% block="pulse"
|
2020-08-19 22:03:58 +02:00
|
|
|
Pulse = 3, // MICROBIT_PIN_EVENT_ON_PULSE
|
2017-01-30 20:19:54 +01:00
|
|
|
//% block="touch"
|
2020-08-19 22:03:58 +02:00
|
|
|
Touch = 4, // MICROBIT_PIN_EVENT_ON_TOUCH
|
2017-01-30 20:19:54 +01:00
|
|
|
//% block="none"
|
|
|
|
None = 0, // MICROBIT_PIN_EVENT_NONE
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum SerialPin {
|
2020-08-19 22:03:58 +02:00
|
|
|
P0 = 112, // MICROBIT_ID_IO_P12
|
|
|
|
P1 = 100, // MICROBIT_ID_IO_P0
|
|
|
|
P2 = 101, // MICROBIT_ID_IO_P1
|
|
|
|
P3 = 116, // MICROBIT_ID_IO_P16
|
|
|
|
C16 = 102, // MICROBIT_ID_IO_P2
|
|
|
|
C17 = 108, // MICROBIT_ID_IO_P8
|
2019-12-02 05:58:26 +01:00
|
|
|
USB_TX = 1001,
|
|
|
|
USB_RX = 1002,
|
2016-05-26 20:07:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-12 19:55:00 +01:00
|
|
|
declare const enum BaudRate {
|
2016-05-26 20:07:09 +02:00
|
|
|
//% block=115200
|
|
|
|
BaudRate115200 = 115200,
|
2017-02-18 15:32:21 +01:00
|
|
|
//% block=57600
|
2019-12-02 05:58:26 +01:00
|
|
|
BaudRate57600 = 57600,
|
|
|
|
//% block=38400
|
|
|
|
BaudRate38400 = 38400,
|
|
|
|
//% block=31250
|
|
|
|
BaudRate31250 = 31250,
|
|
|
|
//% block=28800
|
|
|
|
BaudRate28800 = 28800,
|
|
|
|
//% block=19200
|
|
|
|
BaudRate19200 = 19200,
|
|
|
|
//% block=14400
|
|
|
|
BaudRate14400 = 14400,
|
2016-05-26 20:07:09 +02:00
|
|
|
//% block=9600
|
|
|
|
BaudRate9600 = 9600,
|
2019-12-02 05:58:26 +01:00
|
|
|
//% block=4800
|
|
|
|
BaudRate4800 = 4800,
|
|
|
|
//% block=2400
|
|
|
|
BaudRate2400 = 2400,
|
|
|
|
//% block=1200
|
|
|
|
BaudRate1200 = 1200,
|
2016-05-26 20:07:09 +02:00
|
|
|
}
|
2016-04-02 07:00:42 +02:00
|
|
|
declare namespace serial {
|
|
|
|
}
|
2016-04-02 06:26:06 +02:00
|
|
|
|
2016-04-02 02:45:18 +02:00
|
|
|
// Auto-generated. Do not edit. Really.
|