Move enum to header file.
authorNathael Pajani <nathael.pajani@ed3l.fr>
Mon, 5 Sep 2016 10:03:10 +0000 (12:03 +0200)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Fri, 10 Feb 2023 18:02:59 +0000 (19:02 +0100)
core/rom_helpers.c
include/core/iap.h

index dd55c39..82d9358 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "lib/stdint.h"
 #include "core/system.h"
+#include "core/iap.h"
 #include "core/lpc_core.h"
 
 /*******************************************************************************/
@@ -86,20 +87,6 @@ void __aeabi_uidivmod(unsigned numerator, unsigned denominator)
 /*            In Application Programming ROM based routines                    */
 /*******************************************************************************/
 
-enum iap_status {
-       IAP_STATUS_CMD_SUCCESS = 0,
-       IAP_STATUS_INVALID_COMMAND,
-       IAP_STATUS_SRC_ADDR_ERROR,
-       IAP_STATUS_DST_ADDR_ERROR,
-       IAP_STATUS_SRC_ADDR_NOT_MAPPED,
-       IAP_STATUS_DST_ADDR_NOT_MAPPED,
-       IAP_STATUS_COUNT_ERROR,
-       IAP_STATUS_INVALID_SECTOR,
-       IAP_STATUS_SECTOR_NOT_BLANK,
-       IAP_STATUS_SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION,
-       IAP_STATUS_COMPARE_ERROR,
-       IAP_STATUS_BUSY,
-};
 
 enum iap_commands {
        IAP_CMD_PREPARE_SECTORS_FOR_WRITE = 50,
index 69d39c7..c36b3d3 100644 (file)
  *   of the micro-controller (for bootloaders, drivers, loadable RTOS tasks, ....)
  */
 
+/* Return values */
+enum iap_status {
+       IAP_STATUS_CMD_SUCCESS = 0,
+       IAP_STATUS_INVALID_COMMAND,
+       IAP_STATUS_SRC_ADDR_ERROR,
+       IAP_STATUS_DST_ADDR_ERROR,
+       IAP_STATUS_SRC_ADDR_NOT_MAPPED,
+       IAP_STATUS_DST_ADDR_NOT_MAPPED,
+       IAP_STATUS_COUNT_ERROR,
+       IAP_STATUS_INVALID_SECTOR,
+       IAP_STATUS_SECTOR_NOT_BLANK,
+       IAP_STATUS_SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION,
+       IAP_STATUS_COMPARE_ERROR,
+       IAP_STATUS_BUSY,
+};
 
 
 /* Prepare sectors from the programm flash memory for erasing or writting