Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ICM_20948.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ ICM_20948_Status_e ICM_20948_write_I2C(uint8_t reg, uint8_t *data, uint32_t len,

_i2c->beginTransmission(addr);
_i2c->write(reg);
_i2c->write(data, len);
_i2c->write(data, (uint8_t)len);
_i2c->endTransmission();

// for( uint32_t indi = 0; indi < len; indi++ ){
Expand Down
10 changes: 5 additions & 5 deletions src/ICM_20948.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ class ICM_20948
// I2C

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

class ICM_20948_I2C : public ICM_20948
{
Expand All @@ -144,8 +144,8 @@ class ICM_20948_I2C : public ICM_20948
#define ICM_20948_SPI_DEFAULT_MODE SPI_MODE0

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

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

#endif /* _ICM_20948_H_ */
#endif /* _ICM_20948_H_ */