From e01203129f059f5dd215d87ff0e6b1cbddae8fda Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 4 Feb 2018 14:37:06 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11430 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/lib/peripherals/flash/hal_flash.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'os/hal/lib/peripherals/flash') 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. */ @@ -196,6 +195,13 @@ typedef struct { * @name Macro Functions (BaseFlash) * @{ */ +/** + * @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. * -- cgit v1.2.3