diff --git a/libs/core/control.cpp b/libs/core/control.cpp index 3da2d41e..d50def0a 100644 --- a/libs/core/control.cpp +++ b/libs/core/control.cpp @@ -34,17 +34,18 @@ enum EventBusSource { MICROBIT_ID_IO_P5_ = MICROBIT_ID_IO_P5, MICROBIT_ID_IO_P6_ = MICROBIT_ID_IO_P6, 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_P10_ = MICROBIT_ID_IO_P10, MICROBIT_ID_IO_P11_ = MICROBIT_ID_IO_P11, - //MICROBIT_ID_IO_P12_ = MICROBIT_ID_IO_P12, - //MICROBIT_ID_IO_P13_ = MICROBIT_ID_IO_P13, - //MICROBIT_ID_IO_P14_ = MICROBIT_ID_IO_P14, - //MICROBIT_ID_IO_P15_ = MICROBIT_ID_IO_P15, - //MICROBIT_ID_IO_P16_ = MICROBIT_ID_IO_P16, + MICROBIT_ID_IO_P12_ = MICROBIT_ID_IO_P12, + MICROBIT_ID_IO_P13_ = MICROBIT_ID_IO_P13, + MICROBIT_ID_IO_P14_ = MICROBIT_ID_IO_P14, + MICROBIT_ID_IO_P15_ = MICROBIT_ID_IO_P15, + MICROBIT_ID_IO_P16_ = MICROBIT_ID_IO_P16, MICROBIT_ID_IO_P19_ = MICROBIT_ID_IO_P19, 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_SIGNAL_STRENGTH_ID_ = MES_SIGNAL_STRENGTH_ID, MES_DPAD_CONTROLLER_ID_ = MES_DPAD_CONTROLLER_ID, diff --git a/libs/core/input.cpp b/libs/core/input.cpp index aa4d89c6..c9e7d88c 100644 --- a/libs/core/input.cpp +++ b/libs/core/input.cpp @@ -26,10 +26,10 @@ enum class Rotation { }; enum class TouchPin { - P0 = MICROBIT_ID_IO_P0, - P1 = MICROBIT_ID_IO_P1, - P2 = MICROBIT_ID_IO_P2, - P3 = CALLIOPE_ID_IO_P22 + P0 = MICROBIT_ID_IO_P12, + P1 = MICROBIT_ID_IO_P0, + P2 = MICROBIT_ID_IO_P1, + P3 = MICROBIT_ID_IO_P16 }; enum class AcceleratorRange { diff --git a/libs/core/pins.cpp b/libs/core/pins.cpp index 3a67010f..440dbe03 100644 --- a/libs/core/pins.cpp +++ b/libs/core/pins.cpp @@ -1,35 +1,32 @@ #include "pxt.h" enum class DigitalPin { - P0 = MICROBIT_ID_IO_P0, // edge connector 0 - P1 = MICROBIT_ID_IO_P1, // edge connector 1 - P2 = MICROBIT_ID_IO_P2, // edge connector 2 - P3 = CALLIOPE_ID_IO_P22, // edge connector 3 - C4 = MICROBIT_ID_IO_P3, // LED matrix C1 - C5 = MICROBIT_ID_IO_P4, // LED matrix C2 - C6 = MICROBIT_ID_IO_P10, // LED matrix C3 - C7 = CALLIOPE_ID_IO_P7, // LED matrix C4 - C8 = CALLIOPE_ID_IO_P8, // LED matrix C5 - C9 = CALLIOPE_ID_IO_P9, // LED matrix C6 - C10 = MICROBIT_ID_IO_P9, // LED matrix C7 - C11 = MICROBIT_ID_IO_P7, // LED matrix C8 - C12 = MICROBIT_ID_IO_P6, // LED matrix C9 - C13 = CALLIOPE_ID_IO_P13, // LED matrix R1 - C14 = CALLIOPE_ID_IO_P14, // LED matrix R2 - C15 = CALLIOPE_ID_IO_P15, // LED matrix R3 - //P16 = MICROBIT_ID_IO_P16, - C19 = MICROBIT_ID_IO_P19, // SCL - C20 = MICROBIT_ID_IO_P20 // SDA + P0 = MICROBIT_ID_IO_P12, // edge connector 0 + P1 = MICROBIT_ID_IO_P0, // edge connector 1 + P2 = MICROBIT_ID_IO_P1, // edge connector 2 + P3 = MICROBIT_ID_IO_P16, // edge connector 3 + C4 = MICROBIT_ID_IO_P3, // LED matrix C1 + C5 = MICROBIT_ID_IO_P4, // LED matrix C2 + C6 = MICROBIT_ID_IO_P10, // LED matrix C3 + C7 = MICROBIT_ID_IO_P13, // LED matrix C4 + C8 = MICROBIT_ID_IO_P14, // LED matrix C5 + C9 = MICROBIT_ID_IO_P15, // LED matrix C6 + C10 = MICROBIT_ID_IO_P9, // LED matrix C7 + C11 = MICROBIT_ID_IO_P7, // LED matrix C8 + C12 = MICROBIT_ID_IO_P6, // LED matrix C9 + C16 = MICROBIT_ID_IO_P2, // RX + C17 = MICROBIT_ID_IO_P8, // TX + C18 = MICROBIT_ID_IO_P20, // SDA + C19 = MICROBIT_ID_IO_P19 // SCL }; enum class AnalogPin { - //P0 = MICROBIT_ID_IO_P0, -- does not work analogue - P1 = MICROBIT_ID_IO_P1, // edge connector 1 - P2 = MICROBIT_ID_IO_P2, // edge connector 2 - //P3 = CALLIOPE_ID_IO_P22, -- does not work analogue - C4 = MICROBIT_ID_IO_P3, - C5 = MICROBIT_ID_IO_P4, - C6 = MICROBIT_ID_IO_P10, + P1 = MICROBIT_ID_IO_P0, // edge connector 1 + P2 = MICROBIT_ID_IO_P1, // edge connector 2 + C4 = MICROBIT_ID_IO_P3, // LED matrix C1 + C5 = MICROBIT_ID_IO_P4, // LED matrix C2 + C6 = MICROBIT_ID_IO_P10, // LED matrix C3 + MIC = MICROBIT_ID_IO_P21 // microphone }; enum class PulseValue { @@ -56,28 +53,18 @@ MicroBitPin *getPin(int id) { case MICROBIT_ID_IO_P5: return &uBit.io.P5; case MICROBIT_ID_IO_P6: return &uBit.io.P6; 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_P10: return &uBit.io.P10; case MICROBIT_ID_IO_P11: return &uBit.io.P11; - //case MICROBIT_ID_IO_P12: return &uBit.io.P12; - //case MICROBIT_ID_IO_P13: return &uBit.io.P13; - //case MICROBIT_ID_IO_P14: return &uBit.io.P14; - //case MICROBIT_ID_IO_P15: return &uBit.io.P15; - //case MICROBIT_ID_IO_P16: return &uBit.io.P16; + case MICROBIT_ID_IO_P12: return &uBit.io.P12; + case MICROBIT_ID_IO_P13: return &uBit.io.P13; + case MICROBIT_ID_IO_P14: return &uBit.io.P14; + case MICROBIT_ID_IO_P15: return &uBit.io.P15; + case MICROBIT_ID_IO_P16: return &uBit.io.P16; case MICROBIT_ID_IO_P19: return &uBit.io.P19; case MICROBIT_ID_IO_P20: return &uBit.io.P20; - case CALLIOPE_ID_IO_P3: return &uBit.io.CAL_P3; - 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; + case MICROBIT_ID_IO_P21: return &uBit.io.P21; default: return NULL; } } diff --git a/pxtarget.json b/pxtarget.json index ba2ddc7b..be0ca001 100644 --- a/pxtarget.json +++ b/pxtarget.json @@ -136,7 +136,8 @@ "P2", "C4", "C5", - "C6" + "C6", + "MIC" ], "groundPins": [ "EDGE_GND" @@ -170,7 +171,7 @@ "yottaTarget": "bbc-microbit-classic-gcc", "yottaCorePackage": "microbit", "githubCorePackage": "calliope-mini/microbit", - "gittag": "v1.0.3-calliope", + "gittag": "2.0.0-rc7-calliope-p1", "serviceId": "microbit" }, "serial": { @@ -189,7 +190,7 @@ "cardLogo": "./static/icons/apple-touch-icon.png", "appLogo": "./static/icons/apple-touch-icon.png", "homeUrl": "https://calliope.cc/", - "embedUrl": "https://calliope.cc/", + "embedUrl": "https://mini.pxt.io/", "privacyUrl": "https://go.microsoft.com/fwlink/?LinkId=521839", "termsOfUseUrl": "https://go.microsoft.com/fwlink/?LinkID=206977", "githubUrl": "https://github.com/Microsoft/pxt-calliope",