#include "lib/stdint.h"
#include "core/system.h"
+#include "core/iap.h"
#include "core/lpc_core.h"
/*******************************************************************************/
/* 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,
* 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