summaryrefslogtreecommitdiffstats
path: root/progP32.c
diff options
context:
space:
mode:
Diffstat (limited to 'progP32.c')
-rw-r--r--progP32.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/progP32.c b/progP32.c
index 9416eed..7c68287 100644
--- a/progP32.c
+++ b/progP32.c
@@ -298,7 +298,7 @@ struct ID32{
{0x06201053,"PIC32MK1024MCF100"},
};
-void PIC32_ID(int id)
+static bool PIC32_ID(int id)
{
char s[64];
int i;
@@ -307,10 +307,11 @@ void PIC32_ID(int id)
strcpy(s,PIC32LIST[i].device);
strcat(s,"\r\n");
PrintMessage(s);
- return;
+ return true;
}
}
PrintMessage(strings[S_nodev]); //"Unknown device\r\n");
+ return false;
}
/*#ifdef _MSC_VER
@@ -540,7 +541,7 @@ void Read32x(int dim,int options){
for(z=0;bufferI[z]!=JTAG_XFER_DATA&&z<DIMBUF;z++);
if(z<DIMBUF-4) w0=(bufferI[z+1]<<24)+(bufferI[z+2]<<16)+(bufferI[z+3]<<8)+bufferI[z+4];
PrintMessage1("IDCODE=0x%08X\r\n",w0);
- PIC32_ID(w0);
+ if(!PIC32_ID(w0)) return;
//enable serial execution mode
bufferU[j++]=JTAG_SEND_CMD;
bufferU[j++]=MTAP_SW_MTAP;