Class module for MPL3115A2 I2C Barometric Sensor

Dependents:   mDotEVBM2X MTDOT-EVBDemo-DRH MTDOT-BOX-EVB-Factory-Firmware-LIB-108 MTDOT-UDKDemo_Senet ... more

Embed: (wiki syntax)

« Back to documentation index

MPL3115A2_DATA Class Reference

MPL3115A2_DATA Class Reference

Using the MultiTech Systems MTDOT-EVB. More...

#include <MPL3115A2.h>

Public Member Functions

 MPL3115A2_DATA (int32_t baro=0, int16_t temp=0, int32_t minbaro=0, int32_t maxbaro=0, int16_t mintemp=0, int16_t maxtemp=0)
 Create the MPL3115A2_DATA object initialized to the parameter (or 0 if none)
MPL3115A2_DATAoperator= (MPL3115A2_DATA const &rhs)
 Overloaded '=' operator to allow shorthand coding, assigning objects to one another.
bool operator== (MPL3115A2_DATA &rhs)
 Overloaded '=' operator to allow shorthand coding, assigning objects to one another.

Data Fields

volatile int32_t _baro

Detailed Description

Using the MultiTech Systems MTDOT-EVB.

Example:

  #include "mbed.h"
  #include "MPL3115A2.h"


 
  int main() 
  {

  }

API abstraction for the MPL3115A2 barometric pressure IC data

Definition at line 49 of file MPL3115A2.h.


Constructor & Destructor Documentation

MPL3115A2_DATA ( int32_t  baro = 0,
int16_t  temp = 0,
int32_t  minbaro = 0,
int32_t  maxbaro = 0,
int16_t  mintemp = 0,
int16_t  maxtemp = 0 
)

Create the MPL3115A2_DATA object initialized to the parameter (or 0 if none)

Parameters:
baro- the init value of _baro
temp- the init value of _temperature
minbaro- the init value of _minbaro
maxbaro- the init value of _maxbaro
mintemp- the init value of _mintemp
maxtemp- the init value of _maxtemp

Definition at line 68 of file MPL3115A2.h.


Member Function Documentation

MPL3115A2_DATA& operator= ( MPL3115A2_DATA const &  rhs )

Overloaded '=' operator to allow shorthand coding, assigning objects to one another.

Parameters:
rhs- an object of the same type to assign ourself the same values of
Returns:
this

Definition at line 76 of file MPL3115A2.h.

bool operator== ( MPL3115A2_DATA rhs )

Overloaded '=' operator to allow shorthand coding, assigning objects to one another.

Parameters:
val- Assign each data member (_pressure, _temperature) this value
Returns:
this

MPL3115A2_DATA &operator= (uint16_t val) { _baro = _temp = val;

return *this; } Overloaded '==' operator to allow shorthand coding, test objects to one another

Parameters:
rhs- the object to compare against
Returns:
1 if the data members are the same and 0 otherwise

Definition at line 104 of file MPL3115A2.h.


Field Documentation

volatile int32_t _baro

< volatile data variables

Definition at line 53 of file MPL3115A2.h.