aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/lib/peripherals/sensors/hal_hygrometer.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/lib/peripherals/sensors/hal_hygrometer.h')
-rw-r--r--os/hal/lib/peripherals/sensors/hal_hygrometer.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/os/hal/lib/peripherals/sensors/hal_hygrometer.h b/os/hal/lib/peripherals/sensors/hal_hygrometer.h
index 6cf5eef21..3feace0bc 100644
--- a/os/hal/lib/peripherals/sensors/hal_hygrometer.h
+++ b/os/hal/lib/peripherals/sensors/hal_hygrometer.h
@@ -95,6 +95,13 @@ typedef struct {
* @{
*/
/**
+ * @brief Instance getter.
+ * @details This special method is used to get the instance of this class
+ * object from a derived class.
+ */
+#define getBaseHygrometer(ip) ((BaseHygrometer *)&(ip)->vmt_hygrometer)
+
+/**
* @brief Hygrometer get channels number.
*
* @param[in] ip pointer to a @p BaseHygrometer class.