Adding analogWritePin min max

This commit is contained in:
Sam El-Husseini 2017-03-03 23:42:36 -08:00
parent 87f1580061
commit 8ceadae0ba
2 changed files with 3 additions and 1 deletions

View File

@ -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));
}

View File

@ -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;
/**