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

Public Member Functions

 MS5611_I2C (uint8_t bus, ms5611::prom_u &prom_buf)
 
virtual ~MS5611_I2C ()=default
 
virtual int read (unsigned offset, void *data, unsigned count)
 
virtual int ioctl (unsigned operation, unsigned &arg)
 

Protected Member Functions

virtual int probe ()
 

Private Member Functions

int _probe_address (uint8_t address)
 
int _reset ()
 Send a reset command to the MS5611. More...
 
int _measure (unsigned addr)
 Send a measure command to the MS5611. More...
 
int _read_prom ()
 Read the MS5611 PROM. More...
 

Private Attributes

ms5611::prom_u_prom
 

Detailed Description

Definition at line 49 of file ms5611_i2c.cpp.

Constructor & Destructor Documentation

◆ MS5611_I2C()

MS5611_I2C::MS5611_I2C ( uint8_t  bus,
ms5611::prom_u prom_buf 
)

Definition at line 95 of file ms5611_i2c.cpp.

Referenced by MS5611_i2c_interface().

Here is the caller graph for this function:

◆ ~MS5611_I2C()

virtual MS5611_I2C::~MS5611_I2C ( )
virtualdefault

Member Function Documentation

◆ _measure()

int MS5611_I2C::_measure ( unsigned  addr)
private

Send a measure command to the MS5611.

Parameters
addrWhich address to use for the measure operation.

Definition at line 199 of file ms5611_i2c.cpp.

Referenced by ioctl().

Here is the caller graph for this function:

◆ _probe_address()

int MS5611_I2C::_probe_address ( uint8_t  address)
private

Definition at line 165 of file ms5611_i2c.cpp.

References _read_prom(), and _reset().

Referenced by probe().

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

◆ _read_prom()

int MS5611_I2C::_read_prom ( )
private

Read the MS5611 PROM.

Returns
PX4_OK if the PROM reads successfully.

Definition at line 212 of file ms5611_i2c.cpp.

References _prom, ADDR_PROM_SETUP, ms5611::prom_u::c, and ms5611::crc4().

Referenced by _probe_address().

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

◆ _reset()

int MS5611_I2C::_reset ( )
private

Send a reset command to the MS5611.

This is required after any bus reset.

Definition at line 184 of file ms5611_i2c.cpp.

References ADDR_RESET_CMD.

Referenced by _probe_address(), and ioctl().

Here is the caller graph for this function:

◆ ioctl()

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

Definition at line 126 of file ms5611_i2c.cpp.

References _measure(), _reset(), IOCTL_MEASURE, and IOCTL_RESET.

Here is the call graph for this function:

◆ probe()

int MS5611_I2C::probe ( )
protectedvirtual

Definition at line 147 of file ms5611_i2c.cpp.

References _probe_address(), MS5611_ADDRESS_1, and MS5611_ADDRESS_2.

Here is the call graph for this function:

◆ read()

int MS5611_I2C::read ( unsigned  offset,
void *  data,
unsigned  count 
)
virtual

Definition at line 102 of file ms5611_i2c.cpp.

Member Data Documentation

◆ _prom

ms5611::prom_u& MS5611_I2C::_prom
private

Definition at line 62 of file ms5611_i2c.cpp.

Referenced by _read_prom().


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