diff options
Diffstat (limited to 'os/hal/lib/peripherals')
-rw-r--r-- | os/hal/lib/peripherals/flash/hal_flash.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/os/hal/lib/peripherals/flash/hal_flash.h b/os/hal/lib/peripherals/flash/hal_flash.h index 736fbb201..4c497e508 100644 --- a/os/hal/lib/peripherals/flash/hal_flash.h +++ b/os/hal/lib/peripherals/flash/hal_flash.h @@ -52,6 +52,16 @@ /*===========================================================================*/
/**
+ * @brief Driver state machine possible states.
+ */
+typedef enum {
+ FLASH_UNINIT = 0,
+ FLASH_STOP = 1,
+ FLASH_READY = 2,
+ FLASH_ACTIVE = 3
+} flash_state_t;
+
+/**
* @brief Type of a flash error code.
*/
typedef enum {
@@ -164,7 +174,10 @@ struct BaseFlashVMT { * @note It is empty because @p BaseFlash is only an interface
* without implementation.
*/
-#define _base_flash_data
+#define _base_flash_data \
+ /* Driver state.*/ \
+ flash_state_t state;
+
/**
* @brief Base flash class.
|