aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/lib/peripherals/flash/hal_flash.h8
-rw-r--r--release_note_next.txt2
2 files changed, 8 insertions, 2 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
diff --git a/release_note_next.txt b/release_note_next.txt
index fdfd7028c..f4ed390f8 100644
--- a/release_note_next.txt
+++ b/release_note_next.txt
@@ -36,7 +36,7 @@ received a series of important improvements, new features have been added.
*** What's new in OS Library ***
- OS library now has its own test suite.
-- Mailbox API changed by adding "Timeout" to those function that have
+- Mailbox API names changed by adding "Timeout" to those function that have
timeout capability, for consistency with the rest of the system.
- Added an "Objects Factory" to the OS Library, it allows to dynamically
allocate reference-counted kernel objects/buffers or to register