From 5f686d5179d6a23a37378550b8c1122453d240c1 Mon Sep 17 00:00:00 2001 From: Attila Veghelyi Date: Tue, 25 Jun 2024 20:25:31 +0200 Subject: Stop the process when device ID is unknown --- progP32.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'progP32.c') 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