Apply gridpicker to "spi set pins" block. (#552)
Just forgot to include in the pull request https://github.com/Microsoft/pxt-microbit/pull/550
This commit is contained in:
parent
f5087f2b96
commit
51a42f7380
@ -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;
|
||||
|
8
libs/core/shims.d.ts
vendored
8
libs/core/shims.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user