refreshed dal definitions

This commit is contained in:
Peli de Halleux 2017-02-02 03:18:18 -08:00
parent 70dd486320
commit 1d49ba4cf0
4 changed files with 62 additions and 44 deletions

49
libs/core/dal.d.ts vendored
View File

@ -79,12 +79,15 @@ declare const enum DAL {
MICROBIT_BLE_PAIRING_TIMEOUT = 90, MICROBIT_BLE_PAIRING_TIMEOUT = 90,
MICROBIT_BLE_POWER_LEVELS = 8, MICROBIT_BLE_POWER_LEVELS = 8,
MICROBIT_BLE_MAXIMUM_BONDS = 4, MICROBIT_BLE_MAXIMUM_BONDS = 4,
MICROBIT_BLE_EDDYSTONE_URL_ADV_INTERVAL = 400, MICROBIT_BLE_EDDYSTONE_ADV_INTERVAL = 400,
MICROBIT_BLE_EDDYSTONE_DEFAULT_POWER = 0xF0,
MICROBIT_BLE_DISCONNECT_AFTER_PAIRING_DELAY = 500,
// built/yt/yotta_modules/microbit-dal/inc/bluetooth/MicroBitButtonService.h // built/yt/yotta_modules/microbit-dal/inc/bluetooth/MicroBitButtonService.h
// built/yt/yotta_modules/microbit-dal/inc/bluetooth/MicroBitDFUService.h // built/yt/yotta_modules/microbit-dal/inc/bluetooth/MicroBitDFUService.h
MICROBIT_DFU_OPCODE_START_DFU = 1, MICROBIT_DFU_OPCODE_START_DFU = 1,
MICROBIT_DFU_HISTOGRAM_WIDTH = 5, MICROBIT_DFU_HISTOGRAM_WIDTH = 5,
MICROBIT_DFU_HISTOGRAM_HEIGHT = 5, MICROBIT_DFU_HISTOGRAM_HEIGHT = 5,
// built/yt/yotta_modules/microbit-dal/inc/bluetooth/MicroBitEddystone.h
// built/yt/yotta_modules/microbit-dal/inc/bluetooth/MicroBitEventService.h // built/yt/yotta_modules/microbit-dal/inc/bluetooth/MicroBitEventService.h
// built/yt/yotta_modules/microbit-dal/inc/bluetooth/MicroBitIOPinService.h // built/yt/yotta_modules/microbit-dal/inc/bluetooth/MicroBitIOPinService.h
MICROBIT_IO_PIN_SERVICE_PINCOUNT = 19, MICROBIT_IO_PIN_SERVICE_PINCOUNT = 19,
@ -124,7 +127,6 @@ declare const enum DAL {
MICROBIT_ID_ACCELEROMETER = 4, MICROBIT_ID_ACCELEROMETER = 4,
MICROBIT_ID_COMPASS = 5, MICROBIT_ID_COMPASS = 5,
MICROBIT_ID_DISPLAY = 6, MICROBIT_ID_DISPLAY = 6,
MICROBIT_IO_PINS = 20,
MICROBIT_ID_IO_P0 = 7, MICROBIT_ID_IO_P0 = 7,
MICROBIT_ID_IO_P1 = 8, MICROBIT_ID_IO_P1 = 8,
MICROBIT_ID_IO_P2 = 9, MICROBIT_ID_IO_P2 = 9,
@ -133,11 +135,18 @@ declare const enum DAL {
MICROBIT_ID_IO_P5 = 12, MICROBIT_ID_IO_P5 = 12,
MICROBIT_ID_IO_P6 = 13, MICROBIT_ID_IO_P6 = 13,
MICROBIT_ID_IO_P7 = 14, MICROBIT_ID_IO_P7 = 14,
MICROBIT_ID_IO_P8 = 15,
MICROBIT_ID_IO_P9 = 16, MICROBIT_ID_IO_P9 = 16,
MICROBIT_ID_IO_P10 = 17, MICROBIT_ID_IO_P10 = 17,
MICROBIT_ID_IO_P11 = 18, MICROBIT_ID_IO_P11 = 18,
MICROBIT_ID_IO_P12 = 19,
MICROBIT_ID_IO_P13 = 20,
MICROBIT_ID_IO_P14 = 21,
MICROBIT_ID_IO_P15 = 22,
MICROBIT_ID_IO_P16 = 23,
MICROBIT_ID_IO_P19 = 24, MICROBIT_ID_IO_P19 = 24,
MICROBIT_ID_IO_P20 = 25, MICROBIT_ID_IO_P20 = 25,
MICROBIT_ID_IO_P21 = 50,
MICROBIT_ID_BUTTON_AB = 26, MICROBIT_ID_BUTTON_AB = 26,
MICROBIT_ID_GESTURE = 27, MICROBIT_ID_GESTURE = 27,
MICROBIT_ID_THERMOMETER = 28, MICROBIT_ID_THERMOMETER = 28,
@ -145,17 +154,6 @@ declare const enum DAL {
MICROBIT_ID_RADIO_DATA_READY = 30, MICROBIT_ID_RADIO_DATA_READY = 30,
MICROBIT_ID_MULTIBUTTON_ATTACH = 31, MICROBIT_ID_MULTIBUTTON_ATTACH = 31,
MICROBIT_ID_SERIAL = 32, MICROBIT_ID_SERIAL = 32,
CALLIOPE_ID_IO_P3 = 33,
CALLIOPE_ID_IO_P7 = 34,
CALLIOPE_ID_IO_P8 = 35,
CALLIOPE_ID_IO_P9 = 36,
CALLIOPE_ID_IO_P13 = 37,
CALLIOPE_ID_IO_P14 = 38,
CALLIOPE_ID_IO_P15 = 39,
CALLIOPE_ID_IO_P22 = 40,
CALLIOPE_ID_IO_P28 = 41,
CALLIOPE_ID_IO_P29 = 42,
CALLIOPE_ID_IO_P30 = 43,
MICROBIT_ID_MESSAGE_BUS_LISTENER = 1021, MICROBIT_ID_MESSAGE_BUS_LISTENER = 1021,
MICROBIT_ID_NOTIFY_ONE = 1022, MICROBIT_ID_NOTIFY_ONE = 1022,
MICROBIT_ID_NOTIFY = 1023, MICROBIT_ID_NOTIFY = 1023,
@ -513,6 +511,30 @@ declare const enum DAL {
MICROBIT_DISPLAY_ROTATION_90 = 1, MICROBIT_DISPLAY_ROTATION_90 = 1,
MICROBIT_DISPLAY_ROTATION_180 = 2, MICROBIT_DISPLAY_ROTATION_180 = 2,
MICROBIT_DISPLAY_ROTATION_270 = 3, MICROBIT_DISPLAY_ROTATION_270 = 3,
// built/yt/yotta_modules/microbit-dal/inc/drivers/MicroBitFile.h
// built/yt/yotta_modules/microbit-dal/inc/drivers/MicroBitFileSystem.h
MBFS_FILENAME_LENGTH = 16,
MB_READ = 0x01,
MB_WRITE = 0x02,
MB_CREAT = 0x04,
MB_APPEND = 0x08,
MB_SEEK_SET = 0x01,
MB_SEEK_END = 0x02,
MB_SEEK_CUR = 0x04,
MBFS_STATUS_INITIALISED = 0x01,
MBFS_UNUSED = 0xFFFF,
MBFS_EOF = 0xEFFF,
MBFS_DELETED = 0x0000,
MBFS_DIRECTORY_ENTRY_FREE = 0x8000,
MBFS_DIRECTORY_ENTRY_VALID = 0x4000,
MBFS_DIRECTORY_ENTRY_DIRECTORY = 0x2000,
MBFS_DIRECTORY_ENTRY_NEW = 0xffff,
MBFS_DIRECTORY_ENTRY_DELETED = 0x0000,
MBFS_BLOCK_TYPE_FILE = 1,
MBFS_BLOCK_TYPE_DIRECTORY = 2,
MBFS_BLOCK_TYPE_FILETABLE = 3,
// built/yt/yotta_modules/microbit-dal/inc/drivers/MicroBitFlash.h
PAGE_SIZE = 1024,
// built/yt/yotta_modules/microbit-dal/inc/drivers/MicroBitI2C.h // built/yt/yotta_modules/microbit-dal/inc/drivers/MicroBitI2C.h
MICROBIT_I2C_MAX_RETRIES = 9, MICROBIT_I2C_MAX_RETRIES = 9,
// built/yt/yotta_modules/microbit-dal/inc/drivers/MicroBitIO.h // built/yt/yotta_modules/microbit-dal/inc/drivers/MicroBitIO.h
@ -558,7 +580,6 @@ declare const enum DAL {
MICROBIT_PIN_EVT_PULSE_LO = 5, MICROBIT_PIN_EVT_PULSE_LO = 5,
PIN_CAPABILITY_DIGITAL = 0x01, PIN_CAPABILITY_DIGITAL = 0x01,
PIN_CAPABILITY_ANALOG = 0x02, PIN_CAPABILITY_ANALOG = 0x02,
PIN_CAPABILITY_TOUCH = 0x04,
// built/yt/yotta_modules/microbit-dal/inc/drivers/MicroBitRadio.h // built/yt/yotta_modules/microbit-dal/inc/drivers/MicroBitRadio.h
MICROBIT_RADIO_STATUS_INITIALISED = 0x0001, MICROBIT_RADIO_STATUS_INITIALISED = 0x0001,
MICROBIT_RADIO_BASE_ADDRESS = 0x75626974, MICROBIT_RADIO_BASE_ADDRESS = 0x75626974,

50
libs/core/enums.d.ts vendored
View File

@ -34,10 +34,10 @@ declare namespace basic {
declare enum TouchPin { declare enum TouchPin {
P0 = 7, // MICROBIT_ID_IO_P0 P0 = 19, // MICROBIT_ID_IO_P12
P1 = 8, // MICROBIT_ID_IO_P1 P1 = 7, // MICROBIT_ID_IO_P0
P2 = 9, // MICROBIT_ID_IO_P2 P2 = 8, // MICROBIT_ID_IO_P1
P3 = 40, // CALLIOPE_ID_IO_P22 P3 = 23, // MICROBIT_ID_IO_P16
} }
@ -152,17 +152,18 @@ declare namespace input {
MICROBIT_ID_IO_P5 = 12, // MICROBIT_ID_IO_P5 MICROBIT_ID_IO_P5 = 12, // MICROBIT_ID_IO_P5
MICROBIT_ID_IO_P6 = 13, // MICROBIT_ID_IO_P6 MICROBIT_ID_IO_P6 = 13, // MICROBIT_ID_IO_P6
MICROBIT_ID_IO_P7 = 14, // MICROBIT_ID_IO_P7 MICROBIT_ID_IO_P7 = 14, // MICROBIT_ID_IO_P7
//MICROBIT_ID_IO_P8_ = MICROBIT_ID_IO_P8, MICROBIT_ID_IO_P8 = 15, // MICROBIT_ID_IO_P8
MICROBIT_ID_IO_P9 = 16, // MICROBIT_ID_IO_P9 MICROBIT_ID_IO_P9 = 16, // MICROBIT_ID_IO_P9
MICROBIT_ID_IO_P10 = 17, // MICROBIT_ID_IO_P10 MICROBIT_ID_IO_P10 = 17, // MICROBIT_ID_IO_P10
MICROBIT_ID_IO_P11 = 18, // MICROBIT_ID_IO_P11 MICROBIT_ID_IO_P11 = 18, // MICROBIT_ID_IO_P11
//MICROBIT_ID_IO_P12_ = MICROBIT_ID_IO_P12, MICROBIT_ID_IO_P12 = 19, // MICROBIT_ID_IO_P12
//MICROBIT_ID_IO_P13_ = MICROBIT_ID_IO_P13, MICROBIT_ID_IO_P13 = 20, // MICROBIT_ID_IO_P13
//MICROBIT_ID_IO_P14_ = MICROBIT_ID_IO_P14, MICROBIT_ID_IO_P14 = 21, // MICROBIT_ID_IO_P14
//MICROBIT_ID_IO_P15_ = MICROBIT_ID_IO_P15, MICROBIT_ID_IO_P15 = 22, // MICROBIT_ID_IO_P15
//MICROBIT_ID_IO_P16_ = MICROBIT_ID_IO_P16, MICROBIT_ID_IO_P16 = 23, // MICROBIT_ID_IO_P16
MICROBIT_ID_IO_P19 = 24, // MICROBIT_ID_IO_P19 MICROBIT_ID_IO_P19 = 24, // MICROBIT_ID_IO_P19
MICROBIT_ID_IO_P20 = 25, // MICROBIT_ID_IO_P20 MICROBIT_ID_IO_P20 = 25, // MICROBIT_ID_IO_P20
MICROBIT_ID_IO_P21 = 50, // MICROBIT_ID_IO_P21
MES_DEVICE_INFO_ID = 1103, // MES_DEVICE_INFO_ID MES_DEVICE_INFO_ID = 1103, // MES_DEVICE_INFO_ID
MES_SIGNAL_STRENGTH_ID = 1101, // MES_SIGNAL_STRENGTH_ID MES_SIGNAL_STRENGTH_ID = 1101, // MES_SIGNAL_STRENGTH_ID
MES_DPAD_CONTROLLER_ID = 1104, // MES_DPAD_CONTROLLER_ID MES_DPAD_CONTROLLER_ID = 1104, // MES_DPAD_CONTROLLER_ID
@ -263,36 +264,33 @@ declare namespace motors {
declare enum DigitalPin { declare enum DigitalPin {
P0 = 7, // MICROBIT_ID_IO_P0 P0 = 19, // MICROBIT_ID_IO_P12
P1 = 8, // MICROBIT_ID_IO_P1 P1 = 7, // MICROBIT_ID_IO_P0
P2 = 9, // MICROBIT_ID_IO_P2 P2 = 8, // MICROBIT_ID_IO_P1
P3 = 40, // CALLIOPE_ID_IO_P22 P3 = 23, // MICROBIT_ID_IO_P16
C4 = 10, // MICROBIT_ID_IO_P3 C4 = 10, // MICROBIT_ID_IO_P3
C5 = 11, // MICROBIT_ID_IO_P4 C5 = 11, // MICROBIT_ID_IO_P4
C6 = 17, // MICROBIT_ID_IO_P10 C6 = 17, // MICROBIT_ID_IO_P10
C7 = 34, // CALLIOPE_ID_IO_P7 C7 = 20, // MICROBIT_ID_IO_P13
C8 = 35, // CALLIOPE_ID_IO_P8 C8 = 21, // MICROBIT_ID_IO_P14
C9 = 36, // CALLIOPE_ID_IO_P9 C9 = 22, // MICROBIT_ID_IO_P15
C10 = 16, // MICROBIT_ID_IO_P9 C10 = 16, // MICROBIT_ID_IO_P9
C11 = 14, // MICROBIT_ID_IO_P7 C11 = 14, // MICROBIT_ID_IO_P7
C12 = 13, // MICROBIT_ID_IO_P6 C12 = 13, // MICROBIT_ID_IO_P6
C13 = 37, // CALLIOPE_ID_IO_P13 C16 = 9, // MICROBIT_ID_IO_P2
C14 = 38, // CALLIOPE_ID_IO_P14 C17 = 15, // MICROBIT_ID_IO_P8
C15 = 39, // CALLIOPE_ID_IO_P15 C18 = 25, // MICROBIT_ID_IO_P20
//P16 = MICROBIT_ID_IO_P16,
C19 = 24, // MICROBIT_ID_IO_P19 C19 = 24, // MICROBIT_ID_IO_P19
C20 = 25, // MICROBIT_ID_IO_P20
} }
declare enum AnalogPin { declare enum AnalogPin {
//P0 = MICROBIT_ID_IO_P0, -- does not work analogue P1 = 7, // MICROBIT_ID_IO_P0
P1 = 8, // MICROBIT_ID_IO_P1 P2 = 8, // MICROBIT_ID_IO_P1
P2 = 9, // MICROBIT_ID_IO_P2
//P3 = CALLIOPE_ID_IO_P22, -- does not work analogue
C4 = 10, // MICROBIT_ID_IO_P3 C4 = 10, // MICROBIT_ID_IO_P3
C5 = 11, // MICROBIT_ID_IO_P4 C5 = 11, // MICROBIT_ID_IO_P4
C6 = 17, // MICROBIT_ID_IO_P10 C6 = 17, // MICROBIT_ID_IO_P10
MIC = 50, // MICROBIT_ID_IO_P21
} }

View File

@ -43,8 +43,7 @@
"public": true, "public": true,
"dependencies": {}, "dependencies": {},
"yotta": { "yotta": {
"configIsJustDefaults": true, "optionalConfig": {
"config": {
"microbit-dal": { "microbit-dal": {
"bluetooth": { "bluetooth": {
"enabled": 0 "enabled": 0

View File

@ -21,7 +21,7 @@
"githubPackages": true "githubPackages": true
}, },
"compile": { "compile": {
"isNative": false, "isNative": true,
"hasHex": true, "hasHex": true,
"deployDrives": "MINI", "deployDrives": "MINI",
"driveName": "MINI", "driveName": "MINI",
@ -172,7 +172,7 @@
"githubCorePackage": "calliope-mini/microbit", "githubCorePackage": "calliope-mini/microbit",
"gittag": "2.0.0-rc7-calliope-p1", "gittag": "2.0.0-rc7-calliope-p1",
"serviceId": "microbit" "serviceId": "microbit"
}, },
"serial": { "serial": {
"manufacturerFilter": "^mbed$", "manufacturerFilter": "^mbed$",
"nameFilter": "^mbed Serial Port", "nameFilter": "^mbed Serial Port",