⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lpc_iap.h

📁 给大家提供一个在inram/exram中调试的示例,在周公的lpc2200上调试过.
💻 H
字号:
#ifndef __LPC_IAP_H
#define __LPC_IAP_H

/***********************************************************************
 *         BU MMS China, Philips Semiconductor Software Support
 *         Embest info&Tech Co. Software Support
 *---------------------------------------------------------------------------
 * The software is delivered "AS IS" without warranty or condition of any
 * kind, either express, implied or statutory.  Everybody can use it as 
 * it is opened and without copyright. We will not take any law responsibility
 * for any problem produced by using this software.
 *---------------------------------------------------------------------------
 *    File name: 	LPC_IAP.h                                                         
 *    Description: 	Define IAP micro
 *
 *    History:
 *    1. Date: 		Nov 20, 2004
 *       Author: 	Shawn Zhang
 *       Description: Create
 *
 *	$Revision: 1.0 $
 **********************************************************************/

#include "LPC_Base.h"
#include "LPC_Type.h"

#include "LPC_Syscontrol.h"

/* IAP Command */
#define IAP_CMD_PrepareSec 	50
#define IAP_CMD_CopyRAMToFlash	51
#define IAP_CMD_EraseSec 	52
#define IAP_CMD_BlankChkSec	53
#define IAP_CMD_ReadParID		54
#define IAP_CMD_ReadBootVer		55
#define IAP_CMD_Compare 	56

/* IAP Status Codes */
#define IAP_STA_CMD_SUCCESS 	0
#define IAP_STA_INVALID_COMMAND 	1
#define IAP_STA_SRC_ADDR_ERROR 	2
#define IAP_STA_DST_ADDR_ERROR 	3
#define IAP_STA_SRC_ADDR_NOT_MAPPED 	4
#define IAP_STA_DST_ADDR_NOT_MAPPED 	5
#define IAP_STA_COUNT_ERROR 	6
#define IAP_STA_INVALID_SECTOR 	7
#define IAP_STA_SECTOR_NOT_BLANK	8
#define IAP_STA_SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION 	9
#define IAP_STA_COMPARE_ERROR 	10
#define IAP_STA_BUSY 	11

#define IAP_STA_INVALD_PARAM 	12

/* Declare functions */
unsigned long IAP_PrepareSec (unsigned long StartSecNum,  unsigned long EndSecNum);
unsigned long IAP_CopyRAMToFlash (unsigned long dst,  unsigned long src, 
	unsigned long number);
unsigned long IAP_EraseSec (unsigned long StartSecNum,  unsigned long EndSecNum);
unsigned long IAP_BlankChkSec (unsigned long StartSecNum,  unsigned long EndSecNum,
					unsigned long * pResult);
unsigned long IAP_ReadParID (unsigned long * PartID);
unsigned long IAP_ReadBootVer (unsigned long * MajorVer, unsigned long * MinorVer);
unsigned long IAP_Compare (unsigned long dst,  unsigned long src, 
	unsigned long number, unsigned long *offset);


#endif //__LPC_IAP_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -