Skip to content

Commit fe2a5a8

Browse files
offset for wordSize parameter
1 parent 967a3f7 commit fe2a5a8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

utility/SPIFirmata.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
1010
See file LICENSE.txt for further informations on licensing terms.
1111
12-
Last updated January 8th, 2017
12+
Last updated January 15th, 2017
1313
*/
1414

1515
#include "SPIFirmata.h"
@@ -68,12 +68,14 @@ bool SPIFirmata::handleSysex(uint8_t command, uint8_t argc, uint8_t *argv)
6868
uint32_t clockSpeed = (uint32_t)argv[3] | ((uint32_t)argv[4] << 7) |
6969
((uint32_t)argv[5] << 14) | ((uint32_t)argv[6] << 21) | ((uint32_t)argv[7] << 28);
7070

71-
if (argc > 8) {
72-
mCsPin = argv[8];
71+
// argv[8] = wordSize, but not currently used since SPI.transfer only uses 8-bit words
72+
73+
if (argc > 9) {
74+
mCsPin = argv[9];
7375
pinMode(mCsPin, OUTPUT);
7476

75-
if (argv[9] != END_SYSEX) {
76-
mCsActiveState = argv[9];
77+
if (argv[10] != END_SYSEX) {
78+
mCsActiveState = argv[10];
7779
} else {
7880
// set default
7981
mCsActiveState = SPI_CS_ACTIVE_LOW;

0 commit comments

Comments
 (0)