X-Git-Url: https://git.donarmstrong.com/?p=kiibohd-controller.git;a=blobdiff_plain;f=Output%2FpjrcUSB%2Farm%2Fusb_dev.c;h=37541e488f6856c2a82c17bde0e41fac10024bde;hp=9af914d586391ce4bec3f46e337d72a798920ea8;hb=9c52fb32fa476249c35279ef4fff1be59e3e7eac;hpb=1cbc1755514bb2a012c7b045fc29d20dd3563e77 diff --git a/Output/pjrcUSB/arm/usb_dev.c b/Output/pjrcUSB/arm/usb_dev.c index 9af914d..37541e4 100644 --- a/Output/pjrcUSB/arm/usb_dev.c +++ b/Output/pjrcUSB/arm/usb_dev.c @@ -34,6 +34,7 @@ // Project Includes #include #include +#include // Local Includes #include "usb_dev.h" @@ -872,6 +873,14 @@ void usb_tx( uint32_t endpoint, usb_packet_t *packet ) void usb_device_reload() { + if ( flashModeEnabled_define == 0 ) + { + print( NL ); + warn_print("flashModeEnabled not set, cancelling firmware reload..."); + info_msg("Set flashModeEnabled to 1 in your kll configuration."); + return; + } + // MCHCK #if defined(_mk20dx128vlf5_) @@ -882,7 +891,7 @@ void usb_device_reload() PORTA_PCR3 = PORT_PCR_PFE | PORT_PCR_MUX(1); // Internal pull-up // Check for jumper - if ( GPIOA_PDIR & (1<<3) ) + if ( GPIOA_PDIR & (1<<3) && flashModeEnabled_define != 0 ) { print( NL ); warn_print("Security jumper not present, cancelling firmware reload...");