diff options
Diffstat (limited to 'os/hal/lib/peripherals/sensors/hal_thermometer.h')
-rw-r--r-- | os/hal/lib/peripherals/sensors/hal_thermometer.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/os/hal/lib/peripherals/sensors/hal_thermometer.h b/os/hal/lib/peripherals/sensors/hal_thermometer.h index 4620cbd0a..2094d9c0a 100644 --- a/os/hal/lib/peripherals/sensors/hal_thermometer.h +++ b/os/hal/lib/peripherals/sensors/hal_thermometer.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 getBaseThermometer(ip) ((BaseThermometer *)&(ip)->vmt_thermometer)
+
+/**
* @brief Thermometer get channels number.
*
* @param[in] ip pointer to a @p BaseThermometer class.
|