Official interfaces for ST components.

Dependents:   X_NUCLEO_IKS01A1 mDot_X_NUCLEO_IKS01A1 53L0A1 X_NUCLEO_IKS01A1 ... more

Fork of ST_INTERFACES by Davide Aliprandi

Embed: (wiki syntax)

« Back to documentation index

PressureSensor Class Reference

PressureSensor Class Reference

An abstract class for a Pressure Sensor. More...

#include <PressureSensor.h>

Inherits Component.

Public Member Functions

virtual int get_pressure (float *pf_data)=0
 Get current pressure [mbar].
virtual ~PressureSensor ()
 Destructor.
virtual int init (void *init)=0
 Initializing the component.
virtual int read_id (uint8_t *id)=0
 Getting the ID of the component.

Detailed Description

An abstract class for a Pressure Sensor.

Definition at line 56 of file PressureSensor.h.


Constructor & Destructor Documentation

virtual ~PressureSensor (  ) [virtual]

Destructor.

Definition at line 69 of file PressureSensor.h.


Member Function Documentation

virtual int get_pressure ( float *  pf_data ) [pure virtual]

Get current pressure [mbar].

Parameters:
[out]pf_dataPointer to where to store pressure to
Returns:
0 in case of success, an error code otherwise
virtual int init ( void *  init ) [pure virtual, inherited]

Initializing the component.

Parameters:
[in]initpointer to device specific initalization structure.
Return values:
0in case of success, an error code otherwise.
virtual int read_id ( uint8_t *  id ) [pure virtual, inherited]

Getting the ID of the component.

Parameters:
[out]idpointer to an allocated variable to store the ID into.
Return values:
0in case of success, an error code otherwise.