diff options
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/lib/peripherals/flash/hal_flash.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/os/hal/lib/peripherals/flash/hal_flash.h b/os/hal/lib/peripherals/flash/hal_flash.h index 5e5c8c82d..e2421b5df 100644 --- a/os/hal/lib/peripherals/flash/hal_flash.h +++ b/os/hal/lib/peripherals/flash/hal_flash.h @@ -178,7 +178,6 @@ struct BaseFlashVMT { /* Driver state.*/ \
flash_state_t state;
-
/**
* @brief Base flash class.
*/
@@ -197,6 +196,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 getBaseFlash(ip) ((BaseFlash *)&(ip)->vmt)
+
+/**
* @brief Sensors get axes number.
*
* @param[in] ip pointer to a @p BaseFlash or derived class
|