From: Nathael Pajani Date: Tue, 27 Sep 2016 21:05:00 +0000 (+0200) Subject: Move IAP status definitions to IAP header file X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=056699b906d46dfbee7857ac5f28990a5b659c94;p=soft%2Flpc122x%2Fcore Move IAP status definitions to IAP header file --- diff --git a/core/rom_helpers.c b/core/rom_helpers.c index 6a3ad86..0e27a67 100644 --- a/core/rom_helpers.c +++ b/core/rom_helpers.c @@ -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, diff --git a/include/core/iap.h b/include/core/iap.h index 40f3542..5c6fa8f 100644 --- a/include/core/iap.h +++ b/include/core/iap.h @@ -33,6 +33,24 @@ * 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 */