diff --git a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp index 5b45143..2d17bff 100644 --- a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp +++ b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp @@ -857,8 +857,7 @@ boolean SFE_UBLOX_GNSS::checkUbloxSpi(ubxPacket *incomingUBX, uint8_t requestedC //Note to future self: maybe we need the equivalent of "if (millis() - lastCheck >= i2cPollingWait)" here? //At the moment the code will pound the SPI bus while waiting for data... - SPISettings settingsA(_spiSpeed, MSBFIRST, SPI_MODE0); - _spiPort->beginTransaction(settingsA); + _spiPort->beginTransaction(SPISettings(_spiSpeed, MSBFIRST, SPI_MODE0)); digitalWrite(_csPin, LOW); uint8_t byteReturned = _spiPort->transfer(0xFF); // Note to future self: I think the 0xFF check will cause problems when attempting to process (e.g.) RAWX data @@ -2933,8 +2932,7 @@ void SFE_UBLOX_GNSS::sendSpiCommand(ubxPacket *outgoingUBX) // Start at the beginning of the SPI buffer spiBufferIndex = 0; - SPISettings settingsA(_spiSpeed, MSBFIRST, SPI_MODE0); - _spiPort->beginTransaction(settingsA); + _spiPort->beginTransaction(SPISettings(_spiSpeed, MSBFIRST, SPI_MODE0)); digitalWrite(_csPin, LOW); //Write header bytes spiTransfer(UBX_SYNCH_1); //μ - oh ublox, you're funny. I will call you micro-blox from now on. diff --git a/src/SparkFun_u-blox_GNSS_Arduino_Library.h b/src/SparkFun_u-blox_GNSS_Arduino_Library.h index e42abd2..b274320 100644 --- a/src/SparkFun_u-blox_GNSS_Arduino_Library.h +++ b/src/SparkFun_u-blox_GNSS_Arduino_Library.h @@ -1303,7 +1303,7 @@ private: SPIClass *_spiPort; //The instance of SPIClass uint8_t _csPin; //The chip select pin - int _spiSpeed; //The speed to use for SPI (Hz) + uint32_t _spiSpeed; //The speed to use for SPI (Hz) uint8_t _gpsI2Caddress = 0x42; //Default 7-bit unshifted address of the ublox 6/7/8/M8/F9 series //This can be changed using the ublox configuration software