Dependencies:   mbed

Committer:
daugihao
Date:
Thu Sep 29 11:32:52 2011 +0000
Revision:
1:0872c208795f
Parent:
0:15536fa79743
Child:
3:eb6d9211592d
Now no need to update main.cpp. Will load the first .lpc file it finds on the local filesystem.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
daugihao 0:15536fa79743 1 #include "mbed.h"
daugihao 0:15536fa79743 2 #include "LPC.h"
daugihao 0:15536fa79743 3 //Function to document the relevant information on LPC chips to load onto
daugihao 0:15536fa79743 4 int SerialBuffered::IDCheck(int idcode) {
daugihao 0:15536fa79743 5 switch (idcode) {
daugihao 0:15536fa79743 6 //Cortex M3 - LPC17xx
daugihao 0:15536fa79743 7 case 637615927:
daugihao 1:0872c208795f 8 strcpy(strChipType, "LPC1768 - Cortex M3"); //Chip name
daugihao 1:0872c208795f 9 lastSector = 29; //Last available sector in Flash
daugihao 1:0872c208795f 10 RAM = 268435968; //First RAM address
daugihao 0:15536fa79743 11 break;
daugihao 1:0872c208795f 12 //ARM7
daugihao 1:0872c208795f 13 case 117702437:
daugihao 1:0872c208795f 14 strcpy(strChipType, "LPC2387 - ARM7");
daugihao 1:0872c208795f 15 lastSector = 27;
daugihao 1:0872c208795f 16 RAM = 0x40000200;
daugihao 0:15536fa79743 17 break;
daugihao 0:15536fa79743 18
daugihao 0:15536fa79743 19 default:
daugihao 0:15536fa79743 20 strcpy(strChipType, "\n\rUnrecognised chip! Please add into the \"CheckTargetPresent\" function the chip's relevant information.\r\n\n");
daugihao 1:0872c208795f 21 return(2);
daugihao 0:15536fa79743 22 }
daugihao 0:15536fa79743 23 return 0;
daugihao 0:15536fa79743 24 }