Commit 71a69a90 authored by carlosperate's avatar carlosperate

Fix SPI pin warnings.

parent 7d1f2c17
...@@ -66,11 +66,10 @@ Blockly.Arduino['spi_transfer'] = function(block) { ...@@ -66,11 +66,10 @@ Blockly.Arduino['spi_transfer'] = function(block) {
Blockly.Arduino.addSetup('spi_begin', spiId + '.begin();', false); Blockly.Arduino.addSetup('spi_begin', spiId + '.begin();', false);
// Reserve SPI pins MOSI, MISO, and SCK // Reserve SPI pins MOSI, MISO, and SCK
for (var i = 0; i < Blockly.Arduino.Boards.selected.spiPins.length; i++) { var spiPins = Blockly.Arduino.Boards.selected.spiPins[spiId];
Blockly.Arduino.reservePin(block, for (var i = 0; i < spiPins.length; i++) {
Blockly.Arduino.Boards.selected.spiPins[i][1], Blockly.Arduino.reservePin(block, spiPins[i][1],
Blockly.Arduino.PinTypes.SPI, Blockly.Arduino.PinTypes.SPI, 'SPI ' + spiPins[i][0]);
'SPI ' + Blockly.Arduino.Boards.selected.spiPins[i][0]);
} }
// Configure the Slave Select as a normal output if a pin is used // Configure the Slave Select as a normal output if a pin is used
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment