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 --- progAVR.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'progAVR.c') diff --git a/progAVR.c b/progAVR.c index 47fdcc4..839e1f6 100644 --- a/progAVR.c +++ b/progAVR.c @@ -81,13 +81,13 @@ struct AVRID{ {0x9706,"ATmega1284"}, }; -void AtmelID(BYTE id[]) +static bool AtmelID(BYTE id[]) { char str[128]=""; int i,idw=(id[1]<<8)+id[2]; if(id[0]==0&&id[1]==1&&id[2]==2){ PrintMessage(strings[S_Protected]); //"Device protected" - return; + return false; } if(id[0]==0x1E) strcat(str,"Atmel "); for(i=0;i