Move some defines to lpc header.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 13 Aug 2010 13:11:08 +0000 (13:11 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 13 Aug 2010 13:11:08 +0000 (13:11 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4187 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/arm/io/lpc23xx.h

index c0359114985b0d5303b26146495130387dca8ce6..32b87fc4d0deeac1e43904c5126cd4274fe9cf98 100644 (file)
 
 #include <cfg/compiler.h>
 
+#include <cpu/detect.h>
+
+
+/* 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))