aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/hal/lib/peripherals/flash/hal_flash.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/os/hal/lib/peripherals/flash/hal_flash.h b/os/hal/lib/peripherals/flash/hal_flash.h
index 17ada6e6e..ceddbc00a 100644
--- a/os/hal/lib/peripherals/flash/hal_flash.h
+++ b/os/hal/lib/peripherals/flash/hal_flash.h
@@ -33,7 +33,7 @@
* @name Flash attributes
* @{
*/
-#define FLASH_ATTR_ERASED_ONE 0x00000001
+#define FLASH_ATTR_ERASED_IS_ONE 0x00000001
#define FLASH_ATTR_MEMORY_MAPPED 0x00000002
#define FLASH_ATTR_REWRITABLE 0x00000004
/** @} */
@@ -97,6 +97,16 @@ typedef struct {
} BaseFlash;
/**
+ * @brief Type of a flash error code.
+ */
+typedef enum {
+ FLASH_NO_ERROR = 0,
+ FLASH_PARAMETER_ERROR = 1,
+ FLASH_VERIFY_FAILURE = 2,
+ FLASH_HW_FAILURE = 3
+} flash_error_t;
+
+/**
* @brief Flash sector descriptor.
*/
typedef struct {