Adding analogWritePin min max
This commit is contained in:
parent
87f1580061
commit
8ceadae0ba
@ -166,6 +166,7 @@ namespace pins {
|
||||
*/
|
||||
//% help=pins/analog-write-pin weight=24
|
||||
//% blockId=device_set_analog_pin block="analog write|pin %name|to %value" blockGap=8
|
||||
//% value.min=0 value.max=1023
|
||||
void analogWritePin(AnalogPin name, int value) {
|
||||
PINOP(setAnalogValue(value));
|
||||
}
|
||||
|
3
libs/core/shims.d.ts
vendored
3
libs/core/shims.d.ts
vendored
@ -551,7 +551,8 @@ declare namespace pins {
|
||||
* @param value value to write to the pin between ``0`` and ``1023``. eg:1023,0
|
||||
*/
|
||||
//% help=pins/analog-write-pin weight=24
|
||||
//% blockId=device_set_analog_pin block="analog write|pin %name|to %value" blockGap=8 shim=pins::analogWritePin
|
||||
//% blockId=device_set_analog_pin block="analog write|pin %name|to %value" blockGap=8
|
||||
//% value.min=0 value.max=1023 shim=pins::analogWritePin
|
||||
function analogWritePin(name: AnalogPin, value: number): void;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user