Merge remote-tracking branch 'origin/master'

This commit is contained in:
thinkberg 2017-02-02 19:31:36 +01:00
commit 7730b7c18f
10 changed files with 122 additions and 149 deletions

View File

@ -34,17 +34,18 @@ enum EventBusSource {
MICROBIT_ID_IO_P5_ = MICROBIT_ID_IO_P5, MICROBIT_ID_IO_P5_ = MICROBIT_ID_IO_P5,
MICROBIT_ID_IO_P6_ = MICROBIT_ID_IO_P6, MICROBIT_ID_IO_P6_ = MICROBIT_ID_IO_P6,
MICROBIT_ID_IO_P7_ = MICROBIT_ID_IO_P7, MICROBIT_ID_IO_P7_ = MICROBIT_ID_IO_P7,
//MICROBIT_ID_IO_P8_ = MICROBIT_ID_IO_P8, MICROBIT_ID_IO_P8_ = MICROBIT_ID_IO_P8,
MICROBIT_ID_IO_P9_ = MICROBIT_ID_IO_P9, MICROBIT_ID_IO_P9_ = MICROBIT_ID_IO_P9,
MICROBIT_ID_IO_P10_ = MICROBIT_ID_IO_P10, MICROBIT_ID_IO_P10_ = MICROBIT_ID_IO_P10,
MICROBIT_ID_IO_P11_ = MICROBIT_ID_IO_P11, MICROBIT_ID_IO_P11_ = MICROBIT_ID_IO_P11,
//MICROBIT_ID_IO_P12_ = MICROBIT_ID_IO_P12, MICROBIT_ID_IO_P12_ = MICROBIT_ID_IO_P12,
//MICROBIT_ID_IO_P13_ = MICROBIT_ID_IO_P13, MICROBIT_ID_IO_P13_ = MICROBIT_ID_IO_P13,
//MICROBIT_ID_IO_P14_ = MICROBIT_ID_IO_P14, MICROBIT_ID_IO_P14_ = MICROBIT_ID_IO_P14,
//MICROBIT_ID_IO_P15_ = MICROBIT_ID_IO_P15, MICROBIT_ID_IO_P15_ = MICROBIT_ID_IO_P15,
//MICROBIT_ID_IO_P16_ = MICROBIT_ID_IO_P16, MICROBIT_ID_IO_P16_ = MICROBIT_ID_IO_P16,
MICROBIT_ID_IO_P19_ = MICROBIT_ID_IO_P19, MICROBIT_ID_IO_P19_ = MICROBIT_ID_IO_P19,
MICROBIT_ID_IO_P20_ = MICROBIT_ID_IO_P20, MICROBIT_ID_IO_P20_ = MICROBIT_ID_IO_P20,
MICROBIT_ID_IO_P21_ = MICROBIT_ID_IO_P21,
MES_DEVICE_INFO_ID_ = MES_DEVICE_INFO_ID, MES_DEVICE_INFO_ID_ = MES_DEVICE_INFO_ID,
MES_SIGNAL_STRENGTH_ID_ = MES_SIGNAL_STRENGTH_ID, MES_SIGNAL_STRENGTH_ID_ = MES_SIGNAL_STRENGTH_ID,
MES_DPAD_CONTROLLER_ID_ = MES_DPAD_CONTROLLER_ID, MES_DPAD_CONTROLLER_ID_ = MES_DPAD_CONTROLLER_ID,

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

@ -26,10 +26,10 @@ enum class Rotation {
}; };
enum class TouchPin { enum class TouchPin {
P0 = MICROBIT_ID_IO_P0, P0 = MICROBIT_ID_IO_P12,
P1 = MICROBIT_ID_IO_P1, P1 = MICROBIT_ID_IO_P0,
P2 = MICROBIT_ID_IO_P2, P2 = MICROBIT_ID_IO_P1,
P3 = CALLIOPE_ID_IO_P22 P3 = MICROBIT_ID_IO_P16
}; };
enum class AcceleratorRange { enum class AcceleratorRange {

View File

@ -1,35 +1,32 @@
#include "pxt.h" #include "pxt.h"
enum class DigitalPin { enum class DigitalPin {
P0 = MICROBIT_ID_IO_P0, // edge connector 0 P0 = MICROBIT_ID_IO_P12, // edge connector 0
P1 = MICROBIT_ID_IO_P1, // edge connector 1 P1 = MICROBIT_ID_IO_P0, // edge connector 1
P2 = MICROBIT_ID_IO_P2, // edge connector 2 P2 = MICROBIT_ID_IO_P1, // edge connector 2
P3 = CALLIOPE_ID_IO_P22, // edge connector 3 P3 = MICROBIT_ID_IO_P16, // edge connector 3
C4 = MICROBIT_ID_IO_P3, // LED matrix C1 C4 = MICROBIT_ID_IO_P3, // LED matrix C1
C5 = MICROBIT_ID_IO_P4, // LED matrix C2 C5 = MICROBIT_ID_IO_P4, // LED matrix C2
C6 = MICROBIT_ID_IO_P10, // LED matrix C3 C6 = MICROBIT_ID_IO_P10, // LED matrix C3
C7 = CALLIOPE_ID_IO_P7, // LED matrix C4 C7 = MICROBIT_ID_IO_P13, // LED matrix C4
C8 = CALLIOPE_ID_IO_P8, // LED matrix C5 C8 = MICROBIT_ID_IO_P14, // LED matrix C5
C9 = CALLIOPE_ID_IO_P9, // LED matrix C6 C9 = MICROBIT_ID_IO_P15, // LED matrix C6
C10 = MICROBIT_ID_IO_P9, // LED matrix C7 C10 = MICROBIT_ID_IO_P9, // LED matrix C7
C11 = MICROBIT_ID_IO_P7, // LED matrix C8 C11 = MICROBIT_ID_IO_P7, // LED matrix C8
C12 = MICROBIT_ID_IO_P6, // LED matrix C9 C12 = MICROBIT_ID_IO_P6, // LED matrix C9
C13 = CALLIOPE_ID_IO_P13, // LED matrix R1 C16 = MICROBIT_ID_IO_P2, // RX
C14 = CALLIOPE_ID_IO_P14, // LED matrix R2 C17 = MICROBIT_ID_IO_P8, // TX
C15 = CALLIOPE_ID_IO_P15, // LED matrix R3 C18 = MICROBIT_ID_IO_P20, // SDA
//P16 = MICROBIT_ID_IO_P16, C19 = MICROBIT_ID_IO_P19 // SCL
C19 = MICROBIT_ID_IO_P19, // SCL
C20 = MICROBIT_ID_IO_P20 // SDA
}; };
enum class AnalogPin { enum class AnalogPin {
//P0 = MICROBIT_ID_IO_P0, -- does not work analogue P1 = MICROBIT_ID_IO_P0, // edge connector 1
P1 = MICROBIT_ID_IO_P1, // edge connector 1 P2 = MICROBIT_ID_IO_P1, // edge connector 2
P2 = MICROBIT_ID_IO_P2, // edge connector 2 C4 = MICROBIT_ID_IO_P3, // LED matrix C1
//P3 = CALLIOPE_ID_IO_P22, -- does not work analogue C5 = MICROBIT_ID_IO_P4, // LED matrix C2
C4 = MICROBIT_ID_IO_P3, C6 = MICROBIT_ID_IO_P10, // LED matrix C3
C5 = MICROBIT_ID_IO_P4, MIC = MICROBIT_ID_IO_P21 // microphone
C6 = MICROBIT_ID_IO_P10,
}; };
enum class PulseValue { enum class PulseValue {
@ -56,28 +53,18 @@ MicroBitPin *getPin(int id) {
case MICROBIT_ID_IO_P5: return &uBit.io.P5; case MICROBIT_ID_IO_P5: return &uBit.io.P5;
case MICROBIT_ID_IO_P6: return &uBit.io.P6; case MICROBIT_ID_IO_P6: return &uBit.io.P6;
case MICROBIT_ID_IO_P7: return &uBit.io.P7; case MICROBIT_ID_IO_P7: return &uBit.io.P7;
//case MICROBIT_ID_IO_P8: return &uBit.io.P8; case MICROBIT_ID_IO_P8: return &uBit.io.P8;
case MICROBIT_ID_IO_P9: return &uBit.io.P9; case MICROBIT_ID_IO_P9: return &uBit.io.P9;
case MICROBIT_ID_IO_P10: return &uBit.io.P10; case MICROBIT_ID_IO_P10: return &uBit.io.P10;
case MICROBIT_ID_IO_P11: return &uBit.io.P11; case MICROBIT_ID_IO_P11: return &uBit.io.P11;
//case MICROBIT_ID_IO_P12: return &uBit.io.P12; case MICROBIT_ID_IO_P12: return &uBit.io.P12;
//case MICROBIT_ID_IO_P13: return &uBit.io.P13; case MICROBIT_ID_IO_P13: return &uBit.io.P13;
//case MICROBIT_ID_IO_P14: return &uBit.io.P14; case MICROBIT_ID_IO_P14: return &uBit.io.P14;
//case MICROBIT_ID_IO_P15: return &uBit.io.P15; case MICROBIT_ID_IO_P15: return &uBit.io.P15;
//case MICROBIT_ID_IO_P16: return &uBit.io.P16; case MICROBIT_ID_IO_P16: return &uBit.io.P16;
case MICROBIT_ID_IO_P19: return &uBit.io.P19; case MICROBIT_ID_IO_P19: return &uBit.io.P19;
case MICROBIT_ID_IO_P20: return &uBit.io.P20; case MICROBIT_ID_IO_P20: return &uBit.io.P20;
case CALLIOPE_ID_IO_P3: return &uBit.io.CAL_P3; case MICROBIT_ID_IO_P21: return &uBit.io.P21;
case CALLIOPE_ID_IO_P7: return &uBit.io.CAL_P7;
case CALLIOPE_ID_IO_P8: return &uBit.io.CAL_P8;
case CALLIOPE_ID_IO_P9: return &uBit.io.CAL_P9;
case CALLIOPE_ID_IO_P13: return &uBit.io.CAL_P13;
case CALLIOPE_ID_IO_P14: return &uBit.io.CAL_P14;
case CALLIOPE_ID_IO_P15: return &uBit.io.CAL_P15;
case CALLIOPE_ID_IO_P22: return &uBit.io.CAL_P22;
case CALLIOPE_ID_IO_P28: return &uBit.io.CAL_P28;
case CALLIOPE_ID_IO_P29: return &uBit.io.CAL_P29;
case CALLIOPE_ID_IO_P30: return &uBit.io.CAL_P30;
default: return NULL; default: return NULL;
} }
} }

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

@ -1,6 +1,6 @@
{ {
"name": "pxt-calliope", "name": "pxt-calliope",
"version": "0.8.2", "version": "0.8.3",
"description": "Calliope Mini editor for PXT", "description": "Calliope Mini editor for PXT",
"keywords": [ "keywords": [
"JavaScript", "JavaScript",

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",
@ -116,7 +116,7 @@
"C19": "C_P19", "C19": "C_P19",
"C20": "C_P20", "C20": "C_P20",
"EXT_PWR":"EXT_PWR", "EXT_PWR":"EXT_PWR",
"SPKR":"EXT_PWR", "SPKR":"SPKR",
"BTN_A": "BTN_A", "BTN_A": "BTN_A",
"BTN_B": "BTN_B", "BTN_B": "BTN_B",
"MOTOR1": "M_OUT1", "MOTOR1": "M_OUT1",
@ -170,9 +170,9 @@
"yottaTarget": "bbc-microbit-classic-gcc", "yottaTarget": "bbc-microbit-classic-gcc",
"yottaCorePackage": "microbit", "yottaCorePackage": "microbit",
"githubCorePackage": "calliope-mini/microbit", "githubCorePackage": "calliope-mini/microbit",
"gittag": "v1.0.3-calliope", "gittag": "2.0.0-rc7-calliope-p2",
"serviceId": "microbit" "serviceId": "microbit"
}, },
"serial": { "serial": {
"manufacturerFilter": "^mbed$", "manufacturerFilter": "^mbed$",
"nameFilter": "^mbed Serial Port", "nameFilter": "^mbed Serial Port",

View File

@ -41,25 +41,26 @@ namespace pxsim {
DAL.MICROBIT_ID_IO_P5, DAL.MICROBIT_ID_IO_P5,
DAL.MICROBIT_ID_IO_P6, DAL.MICROBIT_ID_IO_P6,
DAL.MICROBIT_ID_IO_P7, DAL.MICROBIT_ID_IO_P7,
0, //DAL.MICROBIT_ID_IO_P8, DAL.MICROBIT_ID_IO_P8,
DAL.MICROBIT_ID_IO_P9, DAL.MICROBIT_ID_IO_P9,
DAL.MICROBIT_ID_IO_P10, DAL.MICROBIT_ID_IO_P10,
DAL.MICROBIT_ID_IO_P11, DAL.MICROBIT_ID_IO_P11,
0, //DAL.MICROBIT_ID_IO_P12, DAL.MICROBIT_ID_IO_P12,
0, //DAL.MICROBIT_ID_IO_P13, DAL.MICROBIT_ID_IO_P13,
0, //DAL.MICROBIT_ID_IO_P14, DAL.MICROBIT_ID_IO_P14,
0, //DAL.MICROBIT_ID_IO_P15, DAL.MICROBIT_ID_IO_P15,
0, //DAL.MICROBIT_ID_IO_P16, DAL.MICROBIT_ID_IO_P16,
0, 0,
0, 0,
DAL.MICROBIT_ID_IO_P19, DAL.MICROBIT_ID_IO_P19,
DAL.MICROBIT_ID_IO_P20 DAL.MICROBIT_ID_IO_P20,
DAL.MICROBIT_ID_IO_P21
], ],
servos: { servos: {
"P0": DAL.MICROBIT_ID_IO_P0, "P0": DAL.MICROBIT_ID_IO_P12,
"P1": DAL.MICROBIT_ID_IO_P1, "P1": DAL.MICROBIT_ID_IO_P0,
"P2": DAL.MICROBIT_ID_IO_P2, "P2": DAL.MICROBIT_ID_IO_P1,
"P3": DAL.MICROBIT_ID_IO_P3 "P3": DAL.MICROBIT_ID_IO_P16
} }
}); });
this.builtinParts["radio"] = this.radioState = new RadioState(runtime); this.builtinParts["radio"] = this.radioState = new RadioState(runtime);

View File

@ -51,36 +51,18 @@
Blockly Blockly
*******************************/ *******************************/
.blocklyTreeRow { div.blocklyTreeRow {
border-radius:5px; border-radius:8px;
}
/* Specifying top and bottom rounded toolbox borders. */
.blocklyTreeRow.blocklyTreeRowTop {
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.blocklyTreeRow.blocklyTreeRowBottom {
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
.blocklyTreeRow:hover {
background: @invertedBackground !important;
} }
/* This removes any padding at the top of the toolbox */ /* This removes any padding at the top of the toolbox */
.blocklyTreeRoot { div.blocklyTreeRoot {
padding: 0px !important; padding: 0px !important;
} }
/* Blockly Text */ /* Blockly Text */
.blocklyTreeLabel { div.blocklyTreeLabel {
font-family: @pageFont !important; font-family: @pageFont !important;
}
.blocklyTreeLabel {
font-size:1rem !important; font-size:1rem !important;
} }
@ -89,25 +71,9 @@
} }
.blocklyToolboxDiv { .blocklyToolboxDiv {
/*left:30px !important;*/
padding:7px; padding:7px;
} }
/* Blockly Toolbox Buttons */
.blocklyToolboxButtons .blocklyAddPackageButton {
&:extend(.ui.button all);
&:extend(.circular all);
background-color: rgba(0, 0, 0, 0.3);
color: white;
}
.blocklyToolboxButtons .blocklyUndoButton {
&:extend(.ui.button all);
&:extend(.circular all);
background-color: rgba(0, 0, 0, 0.3);
color: white;
}
.organization { .organization {
top: 1.6em; top: 1.6em;
} }