//! Locks the chip.
void cc_lockchip(){
- register i;
+ register int i;
debugstr("Locking chip.");
cc_wr_config(1);//Select Info Flash
cmddata[1]=0xc7;
cmddata[2]=0x51;
cc_debug_instr(3);
- //debugstr("Loaded bank info.");
+ debugstr("Loaded bank info.");
cc_set_pc(0xf000+FLASHPAGE_SIZE);//execute code fragment
cc_resume();
- //debugstr("Executing.");
+ debugstr("Executing.");
while(!(cc_read_status()&CC_STATUS_CPUHALTED)){
}
- //debugstr("Done flashing.");
+ debugstr("Done flashing.");
P1OUT&=~1;//clear LED
}
unsigned char cc_peekdatabyte(unsigned int adr){
unsigned char
hb=(adr&0xFF00)>>8,
- lb=adr&0xFF,
- toret;
+ lb=adr&0xFF;
//MOV DPTR, adr
cc_debug(3, 0x90, hb, lb);