Skip to content

Commit

Permalink
Disable DFU_BTN check.
Browse files Browse the repository at this point in the history
This removes the ability to enter the DFU bootloader manually, you must jump to it from the user program
  • Loading branch information
Arksine committed Nov 12, 2019
1 parent 5f98918 commit 01aedcc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ void setleds(int leds)
GPIO_write(LED5, leds & 16);
}

int dfu_btn_pressed(void)
/*int dfu_btn_pressed(void)
{
return GPIO_get(DFU_BTN);
}
}*/

void start_dfu(void)
{
Expand Down Expand Up @@ -185,7 +185,7 @@ int main(void)
{
WDT_Feed();

GPIO_init(DFU_BTN); GPIO_input(DFU_BTN);
//GPIO_init(DFU_BTN); GPIO_input(DFU_BTN);

GPIO_init(LED1); GPIO_output(LED1);
GPIO_init(LED2); GPIO_output(LED2);
Expand Down Expand Up @@ -213,12 +213,12 @@ int main(void)
check_sd_firmware();

int dfu = 0;
if (dfu_btn_pressed() == 0)
/*if (dfu_btn_pressed() == 0)
{
printf("ISP button pressed, entering DFU mode\n");
dfu = 1;
}
else if (WDT_ReadTimeOutFlag()) {
}*/
if (WDT_ReadTimeOutFlag()) {
WDT_ClrTimeOutFlag();
printf("WATCHDOG reset, entering DFU mode\n");
dfu = 1;
Expand Down

0 comments on commit 01aedcc

Please sign in to comment.