From: asterix Date: Fri, 13 Aug 2010 13:11:08 +0000 (+0000) Subject: Move some defines to lpc header. X-Git-Tag: 2.6.0~203 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=85bb590278d01eed8c1d0448a625cf3e64448cb7;p=bertos.git Move some defines to lpc header. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4187 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/arm/io/lpc23xx.h b/bertos/cpu/arm/io/lpc23xx.h index c0359114..32b87fc4 100644 --- a/bertos/cpu/arm/io/lpc23xx.h +++ b/bertos/cpu/arm/io/lpc23xx.h @@ -40,6 +40,32 @@ #include +#include + + +/* Embedded flash programming defines. */ +#define IAP_ADDRESS 0x7ffffff1 + +typedef enum IapCommands +{ + PREPARE_SECTOR_FOR_WRITE = 50, + COPY_RAM_TO_FLASH = 51, + ERASE_SECTOR = 52, + BLANK_CHECK_SECTOR = 53, + READ_PART_ID = 54, + READ_BOOT_VER = 55, + COMPARE = 56, + REINVOKE_ISP = 57, +} IapCommands; + +#if CPU_ARM_LPC2378 + #define FLASH_MEM_SIZE (504 * 1024L) + #define FLASH_PAGE_SIZE_BYTES 4096 + #define FLASH_PAGE_4K_CNT 14 +#else + #error Unknown CPU +#endif + /* Vectored Interrupt Controller (VIC) */ #define VIC_BASE_ADDR 0xFFFFF000 #define VICIRQStatus (*(reg32_t *)(VIC_BASE_ADDR + 0x000))