![]()  | 
  
    Sensorian
    1.0
    
   C API Reference Guide Library 
   | 
 
Functions | |
| void | MPL3115A2_Initialize (void) | 
| Initialize the sensor and enable interrupts.  More... | |
| unsigned char | MPL3115A2_ID (void) | 
| Returns the Factory Chip ID.  More... | |
| unsigned char | MPL3115A2_GetMode (void) | 
| Return a bool value indicating wheather the sensor is in Active or Standby mode.  More... | |
| void | MPL3115A2_StandbyMode (void) | 
| Puts the sensor in standby mode, the user must do this in order to modify the major control registers.  More... | |
| void | MPL3115A2_ActiveMode (void) | 
| Puts the sensor in active mode, needed is the sensor is in standby mode.  More... | |
| void | MPL3115A2_AltimeterMode (void) | 
| Sets the mode to Altimeter.  More... | |
| float | MPL3115A2_ReadAltitude (void) | 
| Returns the number of meters above sea level,Returns -1 if no new data is available.  More... | |
| void | MPL3115A2_SetAltimeterOffset (unsigned char H_Offset) | 
| Set the altimeter offset correction.  More... | |
| void | MPL3115A2_BarometerMode (void) | 
| Configure the sensor in Barometer mode.  More... | |
| void | MPL3115A2_SetPressureOffset (unsigned char P_Offset) | 
| Set the pressure offset correction.  More... | |
| float | MPL3115A2_GetMinimumPressure (void) | 
| Get minimum stored pressure.  More... | |
| float | MPL3115A2_GetMaximumPressure (void) | 
| Get maximum stored pressure.  More... | |
| unsigned int | MPL3115A2_ReadBarometicPressureInput (void) | 
| Returns barometric pressure input used for calculating altitude.  More... | |
| float | MPL3115A2_ReadBarometricPressure (void) | 
| Reads the current pressure in Pa.  More... | |
| float | MPL3115A2_ReadPressure (unitsType units) | 
| Get a barometric pressure reading.  More... | |
| void | MPL3115A2_SetPressureAlarmThreshold (unsigned int thresh) | 
| Configure alarm threshold.  More... | |
| void | MPL3115A2_SetPressureTargetWindow (unsigned int target, unsigned int window) | 
| Configure alarm target and window.  More... | |
| float | MPL3115A2_ReadTemperature (void) | 
| Get a temperature reading from the sensor.  More... | |
| float | MPL3115A2_GetMinimumTemperature (void) | 
| Get minimum recorded temperature reading.  More... | |
| float | MPL3115A2_GetMaximumTemperature (void) | 
| Get maximum recorded temperature reading.  More... | |
| void | MPL3115A2_SetTempTargetWindow (unsigned int target, unsigned int window) | 
| Configures the temperature target and window for the interrupts.  More... | |
| void | MPL3115A2_SetTemperatureThreshold (unsigned char thresh) | 
| Configure the temeperature threshold.  More... | |
| void | MPL3115A2_SetTempOffset (char T_Offset) | 
| Used to correct the measured sensor temeperature by a particular offset.  More... | |
| void | MPL3115A2_OutputSampleRate (unsigned char sampleRate) | 
| Configures the output sample rate.The higher the oversample rate the greater the time between data samples.  More... | |
| void | MPL3115A2_SetAcquisitionTimeStep (unsigned char ST_Value) | 
| Set the acquisition time step in seconds.  More... | |
| void | MPL3115A2_EnableEventFlags (void) | 
| Enables the pressure and temp measurement event flags so that we can test against them. This is recommended during setup.  More... | |
| void | MPL3115A2_ToggleOneShot (void) | 
| Causes the sensor to immediately take another reading , needed to sample faster than 1Hz.  More... | |
| void | MPL3115A2_ConfigureInterruptPin (unsigned char intrrpt, unsigned char pin) | 
| Configure Interrupt pins.  More... | |
| void | MPL3115A2_ConfigurePressureInterrupt (void) | 
| Configure Pressure Interrupt.  More... | |
| void | MPL3115A2_ConfigureAltitudeInterrupt (void) | 
| Configure altitude interrupt pin.  More... | |
| void | MPL3115A2_ClearInterrupts (void) | 
| Clear any existing interrupts.  More... | |
These functions let you communicate with the MPL3115A2 Barometer/Altimeter/Temperature sensor
| void MPL3115A2_ActiveMode | ( | void | ) | 
Puts the sensor in active mode, needed is the sensor is in standby mode.
Definition at line 82 of file MPL3115A2.c.
| void MPL3115A2_AltimeterMode | ( | void | ) | 
| void MPL3115A2_BarometerMode | ( | void | ) | 
| void MPL3115A2_ClearInterrupts | ( | void | ) | 
| void MPL3115A2_ConfigureAltitudeInterrupt | ( | void | ) | 
| void MPL3115A2_ConfigureInterruptPin | ( | unsigned char | intrrpt, | 
| unsigned char | pin | ||
| ) | 
Configure Interrupt pins.
| intrrpt | Register to read value form | 
| pin | One of the two pins. | 
Definition at line 423 of file MPL3115A2.c.
| void MPL3115A2_ConfigurePressureInterrupt | ( | void | ) | 
| void MPL3115A2_EnableEventFlags | ( | void | ) | 
Enables the pressure and temp measurement event flags so that we can test against them. This is recommended during setup.
Definition at line 398 of file MPL3115A2.c.
| float MPL3115A2_GetMaximumPressure | ( | void | ) | 
Get maximum stored pressure.
Definition at line 178 of file MPL3115A2.c.
| float MPL3115A2_GetMaximumTemperature | ( | void | ) | 
Get maximum recorded temperature reading.
Definition at line 312 of file MPL3115A2.c.
| float MPL3115A2_GetMinimumPressure | ( | void | ) | 
Get minimum stored pressure.
Definition at line 162 of file MPL3115A2.c.
| float MPL3115A2_GetMinimumTemperature | ( | void | ) | 
Get minimum recorded temperature reading.
Definition at line 297 of file MPL3115A2.c.
| unsigned char MPL3115A2_GetMode | ( | void | ) | 
Return a bool value indicating wheather the sensor is in Active or Standby mode.
Definition at line 61 of file MPL3115A2.c.
| unsigned char MPL3115A2_ID | ( | void | ) | 
| void MPL3115A2_Initialize | ( | void | ) | 
| void MPL3115A2_OutputSampleRate | ( | unsigned char | sampleRate | ) | 
Configures the output sample rate.The higher the oversample rate the greater the time between data samples.
| sampleRate | Constant that determines the sample rate | 
Definition at line 361 of file MPL3115A2.c.
| float MPL3115A2_ReadAltitude | ( | void | ) | 
Returns the number of meters above sea level,Returns -1 if no new data is available.
Definition at line 107 of file MPL3115A2.c.
| unsigned int MPL3115A2_ReadBarometicPressureInput | ( | void | ) | 
Returns barometric pressure input used for calculating altitude.
Definition at line 193 of file MPL3115A2.c.
| float MPL3115A2_ReadBarometricPressure | ( | void | ) | 
Reads the current pressure in Pa.
Definition at line 205 of file MPL3115A2.c.
| float MPL3115A2_ReadPressure | ( | unitsType | units | ) | 
Get a barometric pressure reading.
| units | One of the unitsType | 
Definition at line 230 of file MPL3115A2.c.
| float MPL3115A2_ReadTemperature | ( | void | ) | 
Get a temperature reading from the sensor.
Definition at line 282 of file MPL3115A2.c.
| void MPL3115A2_SetAcquisitionTimeStep | ( | unsigned char | ST_Value | ) | 
Set the acquisition time step in seconds.
| ST_Value | timeStep is set from 0x1 - 0xF corresponding steps 1 - 32,768 seconds. | 
Definition at line 380 of file MPL3115A2.c.
| void MPL3115A2_SetAltimeterOffset | ( | unsigned char | H_Offset | ) | 
Set the altimeter offset correction.
| H_Offset | Altitude in meters ,range varies from -128 to +127 meters | 
Definition at line 123 of file MPL3115A2.c.
| void MPL3115A2_SetPressureAlarmThreshold | ( | unsigned int | thresh | ) | 
Configure alarm threshold.
| thresh | reister to read value form | 
Definition at line 251 of file MPL3115A2.c.
| void MPL3115A2_SetPressureOffset | ( | unsigned char | P_Offset | ) | 
Set the pressure offset correction.
| P_Offset | Offset varies from -128 to +128 Pa, 4 Pa per LSB | 
Definition at line 150 of file MPL3115A2.c.
| void MPL3115A2_SetPressureTargetWindow | ( | unsigned int | target, | 
| unsigned int | window | ||
| ) | 
Configure alarm target and window.
| target | Contents of target register. | 
| window | Contents of window register that activates the interrupt | 
Definition at line 265 of file MPL3115A2.c.
| void MPL3115A2_SetTemperatureThreshold | ( | unsigned char | thresh | ) | 
Configure the temeperature threshold.
| thresh | Temperature threshold. | 
Definition at line 340 of file MPL3115A2.c.
| void MPL3115A2_SetTempOffset | ( | char | T_Offset | ) | 
Used to correct the measured sensor temeperature by a particular offset.
| T_Offset | The temperature offset as a two's complement number. | 
Definition at line 351 of file MPL3115A2.c.
| void MPL3115A2_SetTempTargetWindow | ( | unsigned int | target, | 
| unsigned int | window | ||
| ) | 
Configures the temperature target and window for the interrupts.
| target | The target temeprature | 
| window | Temperature window around the target. | 
Definition at line 329 of file MPL3115A2.c.
| void MPL3115A2_StandbyMode | ( | void | ) | 
Puts the sensor in standby mode, the user must do this in order to modify the major control registers.
Definition at line 71 of file MPL3115A2.c.
| void MPL3115A2_ToggleOneShot | ( | void | ) | 
Causes the sensor to immediately take another reading , needed to sample faster than 1Hz.
Definition at line 407 of file MPL3115A2.c.