diff options
Diffstat (limited to 'os/hal/lib/peripherals/sensors/hal_gyroscope.h')
-rw-r--r-- | os/hal/lib/peripherals/sensors/hal_gyroscope.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/os/hal/lib/peripherals/sensors/hal_gyroscope.h b/os/hal/lib/peripherals/sensors/hal_gyroscope.h index 00786607e..47b3708c8 100644 --- a/os/hal/lib/peripherals/sensors/hal_gyroscope.h +++ b/os/hal/lib/peripherals/sensors/hal_gyroscope.h @@ -98,6 +98,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 getBaseGyroscope(ip) ((BaseGyroscope *)&(ip)->vmt_gyroscope)
+
+/**
* @brief Gyroscope get axes number.
*
* @param[in] ip pointer to a @p BaseGyroscope class.
|