From: Stephan Baerwolf Date: Tue, 31 Jul 2012 12:06:21 +0000 (+0200) Subject: improve exit logik by debouncing both: press and release of JUMPER X-Git-Tag: 2010-07-27-stephan-201207311515~1 X-Git-Url: http://git.linex4red.de/pub/USBaspLoader.git/commitdiff_plain/e54519e85b06a8c570abbed178f94be093e0d910?ds=inline improve exit logik by debouncing both: press and release of JUMPER Signed-off-by: Stephan Baerwolf --- diff --git a/firmware/main.c b/firmware/main.c index 1b70c71..a029169 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -374,13 +374,13 @@ int __attribute__((noreturn)) main(void) } } #endif - if (stayinloader > 0x04) { + if (stayinloader > 0x10) { if (!bootLoaderCondition()) { - stayinloader-=0x04; + stayinloader-=0x10; } } else { if (bootLoaderCondition()) { - stayinloader &= 0x01; + if (stayinloader > 1) stayinloader-=2; } }