diff --git a/libs/core/_locales/core-strings.json b/libs/core/_locales/core-strings.json index e10c5bc0..6031242d 100644 --- a/libs/core/_locales/core-strings.json +++ b/libs/core/_locales/core-strings.json @@ -73,6 +73,8 @@ "PinPullMode.PullDown|block": "down", "PinPullMode.PullNone|block": "none", "PinPullMode.PullUp|block": "up", + "PulseValue.High|block": "high", + "PulseValue.Low|block": "low", "Rotation.Pitch|block": "pitch", "Rotation.Roll|block": "roll", "String.charAt|block": "char from %this|at %pos", diff --git a/libs/core/enums.d.ts b/libs/core/enums.d.ts index 7910c33f..17ec2b2b 100644 --- a/libs/core/enums.d.ts +++ b/libs/core/enums.d.ts @@ -275,7 +275,9 @@ declare namespace led { declare enum PulseValue { + //% block=high High = 4, // MICROBIT_PIN_EVT_PULSE_HI + //% block=low Low = 5, // MICROBIT_PIN_EVT_PULSE_LO } diff --git a/libs/core/pins.cpp b/libs/core/pins.cpp index 74c41332..0d5a46cf 100644 --- a/libs/core/pins.cpp +++ b/libs/core/pins.cpp @@ -32,7 +32,9 @@ enum class AnalogPin { }; enum class PulseValue { + //% block=high High = MICROBIT_PIN_EVT_PULSE_HI, + //% block=low Low = MICROBIT_PIN_EVT_PULSE_LO };