summaryrefslogtreecommitdiff
path: root/include/flash.h
diff options
context:
space:
mode:
authorJerome Forissier <jerome.forissier@linaro.org>2024-09-11 11:58:15 +0200
committerTom Rini <trini@konsulko.com>2024-09-24 13:41:20 -0600
commit9aa7e531f6808579c9fa77b6407409da80a1e9ab (patch)
tree1d8f70a7c02b1e448b33a45e70340d3ab12d38f7 /include/flash.h
parent0c2d7ad3e0635a52d291035d9044922ef7b19e7a (diff)
flash: prefix error codes with FL_
Prefix the flash status codes (ERR_*) with FL_ in order to avoid clashes with third-party libraries. Case in point: including the lwIP library header file <lwip/err.h> which defines err_enum_t as an enum with values being ERR_*. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Diffstat (limited to 'include/flash.h')
-rw-r--r--include/flash.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/flash.h b/include/flash.h
index 60babe8a805..32bc65e7b60 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -127,16 +127,16 @@ void flash_perror(int err);
/*-----------------------------------------------------------------------
* return codes from flash_write():
*/
-#define ERR_OK 0
-#define ERR_TIMEOUT 1
-#define ERR_NOT_ERASED 2
-#define ERR_PROTECTED 4
-#define ERR_INVAL 8
-#define ERR_ALIGN 16
-#define ERR_UNKNOWN_FLASH_VENDOR 32
-#define ERR_UNKNOWN_FLASH_TYPE 64
-#define ERR_PROG_ERROR 128
-#define ERR_ABORTED 256
+#define FL_ERR_OK 0
+#define FL_ERR_TIMEOUT 1
+#define FL_ERR_NOT_ERASED 2
+#define FL_ERR_PROTECTED 4
+#define FL_ERR_INVAL 8
+#define FL_ERR_ALIGN 16
+#define FL_ERR_UNKNOWN_FLASH_VENDOR 32
+#define FL_ERR_UNKNOWN_FLASH_TYPE 64
+#define FL_ERR_PROG_ERROR 128
+#define FL_ERR_ABORTED 256
/*-----------------------------------------------------------------------
* Protection Flags for flash_protect():