PX4 Firmware
PX4 Autopilot Software http://px4.io
ICM20948_SPI Class Reference
Inheritance diagram for ICM20948_SPI:
Collaboration diagram for ICM20948_SPI:

Public Member Functions

 ICM20948_SPI (int bus, uint32_t device)
 
 ~ICM20948_SPI () override=default
 
int read (unsigned address, void *data, unsigned count) override
 
int write (unsigned address, void *data, unsigned count) override
 

Protected Member Functions

int probe () override
 

Private Member Functions

void set_bus_frequency (unsigned &reg_speed_reg_out)
 

Detailed Description

Definition at line 64 of file icm20948_spi.cpp.

Constructor & Destructor Documentation

◆ ICM20948_SPI()

ICM20948_SPI::ICM20948_SPI ( int  bus,
uint32_t  device 
)

Definition at line 92 of file icm20948_spi.cpp.

References DRV_DEVTYPE_ICM20948.

◆ ~ICM20948_SPI()

ICM20948_SPI::~ICM20948_SPI ( )
overridedefault

Member Function Documentation

◆ probe()

int ICM20948_SPI::probe ( )
overrideprotected

Definition at line 163 of file icm20948_spi.cpp.

References ICM_WHOAMI_20948, MPUREG_WHOAMI, OK, and read().

Here is the call graph for this function:

◆ read()

int ICM20948_SPI::read ( unsigned  address,
void *  data,
unsigned  count 
)
override

Definition at line 127 of file icm20948_spi.cpp.

References data, DIR_READ, OK, and set_bus_frequency().

Referenced by probe().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_bus_frequency()

void ICM20948_SPI::set_bus_frequency ( unsigned &  reg_speed_reg_out)
private

Definition at line 99 of file icm20948_spi.cpp.

References ICM20948_HIGH_SPI_BUS_SPEED, ICM20948_IS_HIGH_SPEED, ICM20948_LOW_SPI_BUS_SPEED, and ICM20948_REG.

Referenced by read(), and write().

Here is the caller graph for this function:

◆ write()

int ICM20948_SPI::write ( unsigned  address,
void *  data,
unsigned  count 
)
override

Definition at line 109 of file icm20948_spi.cpp.

References DIR_WRITE, and set_bus_frequency().

Here is the call graph for this function:

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