diff --git a/libs/core/pins.cpp b/libs/core/pins.cpp index 48d18960..1ada7a94 100644 --- a/libs/core/pins.cpp +++ b/libs/core/pins.cpp @@ -429,6 +429,12 @@ namespace pins { */ //% help=pins/spi-pins weight=2 advanced=true //% blockId=spi_pins block="spi set pins|MOSI %mosi|MISO %miso|SCK %sck" + //% mosi.fieldEditor="gridpicker" mosi.fieldOptions.columns=4 + //% mosi.fieldOptions.tooltips="false" mosi.fieldOptions.width="300" + //% miso.fieldEditor="gridpicker" miso.fieldOptions.columns=4 + //% miso.fieldOptions.tooltips="false" miso.fieldOptions.width="300" + //% sck.fieldEditor="gridpicker" sck.fieldOptions.columns=4 + //% sck.fieldOptions.tooltips="false" sck.fieldOptions.width="300" void spiPins(DigitalPin mosi, DigitalPin miso, DigitalPin sck) { if (NULL != spi) { delete spi; diff --git a/libs/core/shims.d.ts b/libs/core/shims.d.ts index daa0a2b5..9fc25673 100644 --- a/libs/core/shims.d.ts +++ b/libs/core/shims.d.ts @@ -755,7 +755,13 @@ declare namespace pins { * */ //% help=pins/spi-pins weight=2 advanced=true - //% blockId=spi_pins block="spi set pins|MOSI %mosi|MISO %miso|SCK %sck" shim=pins::spiPins + //% blockId=spi_pins block="spi set pins|MOSI %mosi|MISO %miso|SCK %sck" + //% mosi.fieldEditor="gridpicker" mosi.fieldOptions.columns=4 + //% mosi.fieldOptions.tooltips="false" mosi.fieldOptions.width="300" + //% miso.fieldEditor="gridpicker" miso.fieldOptions.columns=4 + //% miso.fieldOptions.tooltips="false" miso.fieldOptions.width="300" + //% sck.fieldEditor="gridpicker" sck.fieldOptions.columns=4 + //% sck.fieldOptions.tooltips="false" sck.fieldOptions.width="300" shim=pins::spiPins function spiPins(mosi: DigitalPin, miso: DigitalPin, sck: DigitalPin): void; }