From a38f7b1c4b65bd7d5f7f26f37c9b286cdcc012fd Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Mon, 5 Sep 2016 12:03:10 +0200 Subject: [PATCH] Move enum to header file. --- core/rom_helpers.c | 15 +-------------- include/core/iap.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/core/rom_helpers.c b/core/rom_helpers.c index dd55c39..82d9358 100644 --- a/core/rom_helpers.c +++ b/core/rom_helpers.c @@ -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, diff --git a/include/core/iap.h b/include/core/iap.h index 69d39c7..c36b3d3 100644 --- a/include/core/iap.h +++ b/include/core/iap.h @@ -33,6 +33,21 @@ * 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 -- 2.43.0