Move IAP status definitions to IAP header file
authorNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 27 Sep 2016 21:05:00 +0000 (23:05 +0200)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 8 Nov 2022 16:03:05 +0000 (17:03 +0100)
core/rom_helpers.c
include/core/iap.h

index 6a3ad86..0e27a67 100644 (file)
@@ -26,6 +26,7 @@
  */
 
 #include "core/system.h"
+#include "core/iap.h"
 
 /*******************************************************************************/
 /*            Integer division using ROM based division routines               */
@@ -84,21 +85,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,
        IAP_CMD_COPY_RAM_TO_FLASH = 51,
index 40f3542..5c6fa8f 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,
+};
+
 /*******************************************************************************/
 /* Direct access to IAP function */