PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Public Member Functions | |
MPL3115A2_I2C (uint8_t bus) | |
virtual | ~MPL3115A2_I2C ()=default |
virtual int | init () |
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 | _measure (unsigned addr) |
Send a measure command to the MPL3115A2. More... | |
int | reg_read (uint8_t reg, void *data, unsigned count=1) |
int | reg_write (uint8_t reg, uint8_t data) |
int | reset () |
Definition at line 46 of file mpl3115a2_i2c.cpp.
MPL3115A2_I2C::MPL3115A2_I2C | ( | uint8_t | bus | ) |
Definition at line 80 of file mpl3115a2_i2c.cpp.
Referenced by MPL3115A2_i2c_interface().
|
virtualdefault |
|
private |
Send a measure command to the MPL3115A2.
addr | Which address to use for the measure operation. |
Definition at line 186 of file mpl3115a2_i2c.cpp.
References reg_write().
Referenced by ioctl().
|
virtual |
Definition at line 86 of file mpl3115a2_i2c.cpp.
References ToneAlarmInterface::init(), and MPL3115A2_ADDRESS.
|
virtual |
Definition at line 147 of file mpl3115a2_i2c.cpp.
References _measure(), IOCTL_MEASURE, IOCTL_RESET, and reset().
|
protectedvirtual |
Definition at line 168 of file mpl3115a2_i2c.cpp.
References MPL3115A2_REG_WHO_AM_I, MPL3115A2_WHO_AM_I, and reg_read().
|
virtual |
Definition at line 110 of file mpl3115a2_i2c.cpp.
References MPL3115A2_CTRL_REG1, OUT_P_MSB, and reg_read().
|
private |
Definition at line 197 of file mpl3115a2_i2c.cpp.
Referenced by probe(), read(), and reset().
|
private |
Definition at line 204 of file mpl3115a2_i2c.cpp.
Referenced by _measure(), and reset().
|
private |
Definition at line 94 of file mpl3115a2_i2c.cpp.
References CTRL_REG1_RST, math::max(), MPL3115A2_CTRL_REG1, reg_read(), and reg_write().
Referenced by ioctl().