libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
daisy::Icm20948I2CTransport Class Reference

Detailed Description

I2C Transport for Icm20948

#include <icm20948.h>

Classes

struct  Config
 

Public Member Functions

 Icm20948I2CTransport ()
 
 ~Icm20948I2CTransport ()
 
void Init (Config config)
 
void Write (uint8_t *data, uint16_t size)
 
void Read (uint8_t *data, uint16_t size)
 
void Write8 (uint8_t reg, uint8_t value)
 
void Write16 (uint8_t reg, uint16_t value)
 
void ReadReg (uint8_t reg, uint8_t *buff, uint8_t size)
 
uint8_t Read8 (uint8_t reg)
 
bool GetError ()
 

Constructor & Destructor Documentation

◆ Icm20948I2CTransport()

daisy::Icm20948I2CTransport::Icm20948I2CTransport ( )
inline

◆ ~Icm20948I2CTransport()

daisy::Icm20948I2CTransport::~Icm20948I2CTransport ( )
inline

Member Function Documentation

◆ GetError()

bool daisy::Icm20948I2CTransport::GetError ( )
inline

◆ Init()

void daisy::Icm20948I2CTransport::Init ( Config  config)
inline

◆ Read()

void daisy::Icm20948I2CTransport::Read ( uint8_t data,
uint16_t  size 
)
inline

◆ Read8()

uint8_t daisy::Icm20948I2CTransport::Read8 ( uint8_t  reg)
inline

Reads an 8 bit value

Parameters
regthe register address to read from
Returns
the 16 bit data value read from the device

◆ ReadReg()

void daisy::Icm20948I2CTransport::ReadReg ( uint8_t  reg,
uint8_t buff,
uint8_t  size 
)
inline

Read from a reg address a defined number of bytes

◆ Write()

void daisy::Icm20948I2CTransport::Write ( uint8_t data,
uint16_t  size 
)
inline

◆ Write16()

void daisy::Icm20948I2CTransport::Write16 ( uint8_t  reg,
uint16_t  value 
)
inline

Writes a 16 bit value MSB first

Parameters
regthe register address to write to
valuethe value to write to the register

◆ Write8()

void daisy::Icm20948I2CTransport::Write8 ( uint8_t  reg,
uint8_t  value 
)
inline

Writes an 8 bit value

Parameters
regthe register address to write to
valuethe value to write to the register

The documentation for this class was generated from the following file: