Added pushData over SPI
This commit is contained in:
@@ -6092,13 +6092,14 @@ bool SFE_UBLOX_GNSS::pushRawData(uint8_t *dataBytes, size_t numDataBytes, bool s
|
||||
}
|
||||
else // SPI
|
||||
{
|
||||
#ifndef SFE_UBLOX_REDUCED_PROG_MEM
|
||||
if (_printDebug == true)
|
||||
{
|
||||
_debugSerial->println(F("pushRawData: SPI not currently supported"));
|
||||
}
|
||||
#endif
|
||||
return (false);
|
||||
_spiPort->beginTransaction(SPISettings(_spiSpeed, MSBFIRST, SPI_MODE0));
|
||||
digitalWrite(_csPin, LOW);
|
||||
for (uint16_t i = 0; i < numDataBytes; i++) {
|
||||
spiTransfer(dataBytes[i]);
|
||||
}
|
||||
digitalWrite(_csPin, HIGH);
|
||||
_spiPort->endTransaction();
|
||||
return (true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user