Official interfaces for ST components.
Dependents: X_NUCLEO_IKS01A1 mDot_X_NUCLEO_IKS01A1 53L0A1 X_NUCLEO_IKS01A1 ... more
Fork of ST_INTERFACES by
This library contains all abstract classes which together constitute the common API to which all existing and future ST components will adhere to.
Diff: Sensors/PressureSensor.h
- Revision:
- 3:b1bb477e115e
- Parent:
- 1:a7810e7acf8d
--- a/Sensors/PressureSensor.h Tue Nov 29 17:43:48 2016 +0000
+++ b/Sensors/PressureSensor.h Fri Mar 10 10:50:53 2017 +0100
@@ -36,25 +36,37 @@
******************************************************************************
*/
+
/* Define to prevent from recursive inclusion --------------------------------*/
+
#ifndef __PRESSURE_SENSOR_CLASS_H
#define __PRESSURE_SENSOR_CLASS_H
+
/* Includes ------------------------------------------------------------------*/
-#include <ComponentObject.h>
+
+#include <Component.h>
+
/* Classes ------------------------------------------------------------------*/
-/** An abstract class for a Pressure Sensor
+
+/**
+ * An abstract class for a Pressure Sensor
*/
-class PressureSensor : public ComponentObject
-{
- public:
+class PressureSensor : public Component {
+public:
+
/**
* @brief Get current pressure [mbar]
- * @param[out] pfData Pointer to where to store pressure to
+ * @param[out] pf_data Pointer to where to store pressure to
* @return 0 in case of success, an error code otherwise
*/
- virtual int GetPressure(float *pfData) = 0;
+ virtual int get_pressure(float *pf_data) = 0;
+
+ /**
+ * @brief Destructor.
+ */
+ virtual ~PressureSensor() {};
};
#endif /* __PRESSURE_SENSOR_CLASS_H */
