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

Public Member Functions

 MPU9250_SPI (int bus, uint32_t device)
 
 ~MPU9250_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 mpu9250_spi.cpp.

Constructor & Destructor Documentation

◆ MPU9250_SPI()

MPU9250_SPI::MPU9250_SPI ( int  bus,
uint32_t  device 
)

Definition at line 92 of file mpu9250_spi.cpp.

References DRV_ACC_DEVTYPE_MPU9250.

◆ ~MPU9250_SPI()

MPU9250_SPI::~MPU9250_SPI ( )
overridedefault

Member Function Documentation

◆ probe()

int MPU9250_SPI::probe ( )
overrideprotected

Definition at line 163 of file mpu9250_spi.cpp.

References MPU_WHOAMI_6500, MPU_WHOAMI_9250, MPUREG_WHOAMI, OK, and read().

Here is the call graph for this function:

◆ read()

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

Definition at line 127 of file mpu9250_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 MPU9250_SPI::set_bus_frequency ( unsigned &  reg_speed_reg_out)
private

Definition at line 99 of file mpu9250_spi.cpp.

References MPU9250_HIGH_SPI_BUS_SPEED, MPU9250_IS_HIGH_SPEED, MPU9250_LOW_SPI_BUS_SPEED, and MPU9250_REG.

Referenced by read(), and write().

Here is the caller graph for this function:

◆ write()

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

Definition at line 109 of file mpu9250_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: