diff options
Diffstat (limited to 'progP32.c')
-rw-r--r-- | progP32.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; |