Skip to content

Commit 4bb035b

Browse files
authored
Merge pull request #28 from sparkfun/NANO_33_BLE_corrections
Changes to allow the code to compile on the Arduino NANO 33 BLE
2 parents 98516df + 4806b51 commit 4bb035b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/ICM_20948.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ ICM_20948_Status_e ICM_20948_write_I2C(uint8_t reg, uint8_t *data, uint32_t len,
908908

909909
_i2c->beginTransmission(addr);
910910
_i2c->write(reg);
911-
_i2c->write(data, len);
911+
_i2c->write(data, (uint8_t)len);
912912
_i2c->endTransmission();
913913

914914
// for( uint32_t indi = 0; indi < len; indi++ ){

src/ICM_20948.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ class ICM_20948
119119
// I2C
120120

121121
// Forward declarations of TwoWire and Wire for board/variant combinations that don't have a default 'SPI'
122-
class TwoWire;
123-
extern TwoWire Wire;
122+
//class TwoWire; // Commented by PaulZC 21/2/8 - this was causing compilation to fail on the Arduino NANO 33 BLE
123+
//extern TwoWire Wire; // Commented by PaulZC 21/2/8 - this was causing compilation to fail on the Arduino NANO 33 BLE
124124

125125
class ICM_20948_I2C : public ICM_20948
126126
{
@@ -144,8 +144,8 @@ class ICM_20948_I2C : public ICM_20948
144144
#define ICM_20948_SPI_DEFAULT_MODE SPI_MODE0
145145

146146
// Forward declarations of SPIClass and SPI for board/variant combinations that don't have a default 'SPI'
147-
class SPIClass;
148-
extern SPIClass SPI;
147+
//class SPIClass; // Commented by PaulZC 21/2/8 - this was causing compilation to fail on the Arduino NANO 33 BLE
148+
//extern SPIClass SPI; // Commented by PaulZC 21/2/8 - this was causing compilation to fail on the Arduino NANO 33 BLE
149149

150150
class ICM_20948_SPI : public ICM_20948
151151
{
@@ -162,4 +162,4 @@ class ICM_20948_SPI : public ICM_20948
162162
ICM_20948_Status_e begin(uint8_t csPin, SPIClass &spiPort = SPI, uint32_t SPIFreq = ICM_20948_SPI_DEFAULT_FREQ);
163163
};
164164

165-
#endif /* _ICM_20948_H_ */
165+
#endif /* _ICM_20948_H_ */

0 commit comments

Comments
 (0)