X-Git-Url: http://git.linex4red.de/pub/USBaspLoader.git/blobdiff_plain/d7ac76b34c7ead103afb231d705976faa5c4beae..8ce9055cc4df6de93528cf3e12a4b69d5fcc1a19:/firmware/main.c diff --git a/firmware/main.c b/firmware/main.c index d08ed23..038368c 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -783,6 +783,21 @@ int __attribute__((__noreturn__)) main(void) #endif usbPoll(); #if BOOTLOADER_CAN_EXIT +#if BOOTLOADER_IGNOREPROGBUTTON + /* + * remove the high nibble as it would be subtracted due to: + * "(!bootLoaderConditionSimple())" + */ +#if USE_EXCESSIVE_ASSEMBLER +asm volatile ( + "andi %[sil], 0x0f\n\t" + : [sil] "+d" (stayinloader) + : +); +#else + stayinloader &= 0x0f; +#endif +#else #if USE_EXCESSIVE_ASSEMBLER asm volatile ( "cpi %[sil], 0x10\n\t" @@ -814,6 +829,7 @@ asm volatile ( } #endif #endif +#endif #if BOOTLOADER_CAN_EXIT }while (stayinloader); /* main event loop, if BOOTLOADER_CAN_EXIT*/