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

Public Member Functions

 HMC5883_I2C (int bus)
 
virtual ~HMC5883_I2C ()=default
 
virtual int read (unsigned address, void *data, unsigned count)
 
virtual int write (unsigned address, void *data, unsigned count)
 
virtual int ioctl (unsigned operation, unsigned &arg)
 

Protected Member Functions

virtual int probe ()
 

Detailed Description

Definition at line 51 of file hmc5883_i2c.cpp.

Constructor & Destructor Documentation

◆ HMC5883_I2C()

HMC5883_I2C::HMC5883_I2C ( int  bus)

Definition at line 73 of file hmc5883_i2c.cpp.

References DRV_MAG_DEVTYPE_HMC5883.

Referenced by HMC5883_I2C_interface().

Here is the caller graph for this function:

◆ ~HMC5883_I2C()

virtual HMC5883_I2C::~HMC5883_I2C ( )
virtualdefault

Member Function Documentation

◆ ioctl()

int HMC5883_I2C::ioctl ( unsigned  operation,
unsigned &  arg 
)
virtual

Definition at line 80 of file hmc5883_i2c.cpp.

References MAGIOCGEXTERNAL.

◆ probe()

int HMC5883_I2C::probe ( )
protectedvirtual

Definition at line 100 of file hmc5883_i2c.cpp.

References ADDR_ID_A, ADDR_ID_B, ADDR_ID_C, data, DEVICE_DEBUG, ID_A_WHO_AM_I, ID_B_WHO_AM_I, ID_C_WHO_AM_I, OK, and read().

Here is the call graph for this function:

◆ read()

int HMC5883_I2C::read ( unsigned  address,
void *  data,
unsigned  count 
)
virtual

Definition at line 141 of file hmc5883_i2c.cpp.

Referenced by probe().

Here is the caller graph for this function:

◆ write()

int HMC5883_I2C::write ( unsigned  address,
void *  data,
unsigned  count 
)
virtual

Definition at line 126 of file hmc5883_i2c.cpp.


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