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/LightSensor.h
- Revision:
- 3:b1bb477e115e
- Parent:
- 2:e2bf4d06a8fc
- Child:
- 4:8f70f7159316
--- a/Sensors/LightSensor.h Tue Nov 29 17:43:48 2016 +0000
+++ b/Sensors/LightSensor.h Fri Mar 10 10:50:53 2017 +0100
@@ -36,25 +36,37 @@
******************************************************************************
*/
+
/* Define to prevent from recursive inclusion --------------------------------*/
+
#ifndef __LIGHT_SENSOR_CLASS_H
#define __LIGHT_SENSOR_CLASS_H
+
/* Includes ------------------------------------------------------------------*/
-#include <ComponentObject.h>
+
+#include <Component.h>
+
/* Classes ------------------------------------------------------------------*/
-/** An abstract class for ambient light sensors
+
+/**
+ * An abstract class for ambient light sensors
*/
-class LightSensor : public ComponentObject
-{
- public:
+class LightSensor : public Component {
+public:
+
/**
* @brief Get current light [lux]
* @param[out] piData Pointer to where to store light to
* @return 0 in case of success, an error code otherwise
*/
- virtual int GetLux(uint32_t *piData) = 0;
+ virtual int get_lux(uint32_t *piData) = 0;
+
+ /**
+ * @brief Destructor.
+ */
+ virtual ~LightSensor() {};
};
#endif /* __LIGHT_SENSOR_CLASS_H */
