allow analog operations on digital pins (#353)
This commit is contained in:
parent
4a8897c0a4
commit
6f8060a8c7
@ -7,6 +7,19 @@
|
|||||||
"AcceleratorRange.OneG|block": "1g",
|
"AcceleratorRange.OneG|block": "1g",
|
||||||
"AcceleratorRange.TwoG": "The accelerator measures forces up to 2 gravity",
|
"AcceleratorRange.TwoG": "The accelerator measures forces up to 2 gravity",
|
||||||
"AcceleratorRange.TwoG|block": "2g",
|
"AcceleratorRange.TwoG|block": "2g",
|
||||||
|
"AnalogPin.P11|block": "P11 (write only)",
|
||||||
|
"AnalogPin.P12|block": "P12 (write only)",
|
||||||
|
"AnalogPin.P13|block": "P13 (write only)",
|
||||||
|
"AnalogPin.P14|block": "P14 (write only)",
|
||||||
|
"AnalogPin.P15|block": "P15 (write only)",
|
||||||
|
"AnalogPin.P16|block": "P16 (write only)",
|
||||||
|
"AnalogPin.P19|block": "P19 (write only)",
|
||||||
|
"AnalogPin.P20|block": "P20 (write only)",
|
||||||
|
"AnalogPin.P5|block": "P5 (write only)",
|
||||||
|
"AnalogPin.P6|block": "P6 (write only)",
|
||||||
|
"AnalogPin.P7|block": "P5 (write only)",
|
||||||
|
"AnalogPin.P8|block": "P8 (write only)",
|
||||||
|
"AnalogPin.P9|block": "P9 (write only)",
|
||||||
"BaudRate.BaudRate115200|block": "115200",
|
"BaudRate.BaudRate115200|block": "115200",
|
||||||
"BaudRate.BaudRate9600|block": "9600",
|
"BaudRate.BaudRate9600|block": "9600",
|
||||||
"BeatFraction.Breve|block": "4",
|
"BeatFraction.Breve|block": "4",
|
||||||
|
26
libs/core/enums.d.ts
vendored
26
libs/core/enums.d.ts
vendored
@ -280,6 +280,32 @@ declare namespace led {
|
|||||||
P3 = 10, // MICROBIT_ID_IO_P3
|
P3 = 10, // MICROBIT_ID_IO_P3
|
||||||
P4 = 11, // MICROBIT_ID_IO_P4
|
P4 = 11, // MICROBIT_ID_IO_P4
|
||||||
P10 = 17, // MICROBIT_ID_IO_P10
|
P10 = 17, // MICROBIT_ID_IO_P10
|
||||||
|
//% block="P5 (write only)"
|
||||||
|
P5 = 12, // MICROBIT_ID_IO_P5
|
||||||
|
//% block="P6 (write only)"
|
||||||
|
P6 = 13, // MICROBIT_ID_IO_P6
|
||||||
|
//% block="P5 (write only)"
|
||||||
|
P7 = 14, // MICROBIT_ID_IO_P7
|
||||||
|
//% block="P8 (write only)"
|
||||||
|
P8 = 15, // MICROBIT_ID_IO_P8
|
||||||
|
//% block="P9 (write only)"
|
||||||
|
P9 = 16, // MICROBIT_ID_IO_P9
|
||||||
|
//% block="P11 (write only)"
|
||||||
|
P11 = 18, // MICROBIT_ID_IO_P11
|
||||||
|
//% block="P12 (write only)"
|
||||||
|
P12 = 19, // MICROBIT_ID_IO_P12
|
||||||
|
//% block="P13 (write only)"
|
||||||
|
P13 = 20, // MICROBIT_ID_IO_P13
|
||||||
|
//% block="P14 (write only)"
|
||||||
|
P14 = 21, // MICROBIT_ID_IO_P14
|
||||||
|
//% block="P15 (write only)"
|
||||||
|
P15 = 22, // MICROBIT_ID_IO_P15
|
||||||
|
//% block="P16 (write only)"
|
||||||
|
P16 = 23, // MICROBIT_ID_IO_P16
|
||||||
|
//% block="P19 (write only)"
|
||||||
|
P19 = 24, // MICROBIT_ID_IO_P19
|
||||||
|
//% block="P20 (write only)"
|
||||||
|
P20 = 25, // MICROBIT_ID_IO_P20
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,6 +29,32 @@ enum class AnalogPin {
|
|||||||
P3 = MICROBIT_ID_IO_P3,
|
P3 = MICROBIT_ID_IO_P3,
|
||||||
P4 = MICROBIT_ID_IO_P4,
|
P4 = MICROBIT_ID_IO_P4,
|
||||||
P10 = MICROBIT_ID_IO_P10,
|
P10 = MICROBIT_ID_IO_P10,
|
||||||
|
//% block="P5 (write only)"
|
||||||
|
P5 = MICROBIT_ID_IO_P5,
|
||||||
|
//% block="P6 (write only)"
|
||||||
|
P6 = MICROBIT_ID_IO_P6,
|
||||||
|
//% block="P5 (write only)"
|
||||||
|
P7 = MICROBIT_ID_IO_P7,
|
||||||
|
//% block="P8 (write only)"
|
||||||
|
P8 = MICROBIT_ID_IO_P8,
|
||||||
|
//% block="P9 (write only)"
|
||||||
|
P9 = MICROBIT_ID_IO_P9,
|
||||||
|
//% block="P11 (write only)"
|
||||||
|
P11 = MICROBIT_ID_IO_P11,
|
||||||
|
//% block="P12 (write only)"
|
||||||
|
P12 = MICROBIT_ID_IO_P12,
|
||||||
|
//% block="P13 (write only)"
|
||||||
|
P13 = MICROBIT_ID_IO_P13,
|
||||||
|
//% block="P14 (write only)"
|
||||||
|
P14 = MICROBIT_ID_IO_P14,
|
||||||
|
//% block="P15 (write only)"
|
||||||
|
P15 = MICROBIT_ID_IO_P15,
|
||||||
|
//% block="P16 (write only)"
|
||||||
|
P16 = MICROBIT_ID_IO_P16,
|
||||||
|
//% block="P19 (write only)"
|
||||||
|
P19 = MICROBIT_ID_IO_P19,
|
||||||
|
//% block="P20 (write only)"
|
||||||
|
P20 = MICROBIT_ID_IO_P20
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class PulseValue {
|
enum class PulseValue {
|
||||||
|
Loading…
Reference in New Issue
Block a user