X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/cc1afb21bdc089426652f21769164645cae062fd..243fec4450d3a3246f3f0d92751a95daef7c1503:/embedded/arch/arm/mach-lpc21xx/libs/iap/iap.c diff --git a/embedded/arch/arm/mach-lpc21xx/libs/iap/iap.c b/embedded/arch/arm/mach-lpc21xx/libs/iap/iap.c index cc39097..23f7bc0 100644 --- a/embedded/arch/arm/mach-lpc21xx/libs/iap/iap.c +++ b/embedded/arch/arm/mach-lpc21xx/libs/iap/iap.c @@ -2,8 +2,6 @@ #include #include -#define IAP_PLL_FULL_SPEED 1 - #define CMD_SUCCESS 0 #define BUSY 11 @@ -12,8 +10,8 @@ #define IAP_CMD_ERASE 52 #define IAP_CMD_READ_PARTID 54 -uint32_t command[5]; -uint32_t result[2]; +unsigned int command[5]; +unsigned int result[2]; extern void iap_asm_entry (unsigned int *,unsigned int *); #define iap_entry iap_asm_entry @@ -46,7 +44,7 @@ int lpcisp_prepare_sectors(unsigned char start, unsigned char end) command[0] = IAP_CMD_PREPARE; command[1] = start; command[2] = end; - command[3] = FOSC/1000; + command[3] = system_frequency/1000; iap_entry(command, result); @@ -58,7 +56,7 @@ int lpcisp_erase_sectors(unsigned char start, unsigned char end) command[0] = IAP_CMD_ERASE; command[1] = start; command[2] = end; - command[3] = FOSC/1000; + command[3] = system_frequency/1000; iap_entry(command, result); @@ -76,18 +74,12 @@ int lpcisp_erase(void *addr, int len) if (end