aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/lib/peripherals/flash/hal_flash.h
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-02-04 14:37:06 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-02-04 14:37:06 +0000
commite01203129f059f5dd215d87ff0e6b1cbddae8fda (patch)
tree44ed6fde1fe91c88d10e312fe17f6175826755c2 /os/hal/lib/peripherals/flash/hal_flash.h
parentdacb403627fc97dce0bf64b3c4ebecb879f3ce0d (diff)
downloadChibiOS-e01203129f059f5dd215d87ff0e6b1cbddae8fda.tar.gz
ChibiOS-e01203129f059f5dd215d87ff0e6b1cbddae8fda.tar.bz2
ChibiOS-e01203129f059f5dd215d87ff0e6b1cbddae8fda.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11430 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/lib/peripherals/flash/hal_flash.h')
-rw-r--r--os/hal/lib/peripherals/flash/hal_flash.h8
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