adafruit / tinyuf2

UF2 bootloader based on TinyUSB for embedded devices such as ESP32S2, STM32F4 and iMX RT10xx
MIT License
310 stars 170 forks source link

Add capability to force stay in DFU (and erase app) with button if #294

Open ccrome opened 1 year ago

ccrome commented 1 year ago

Checklist


Description of Change

Add capability to force stay in DFU (and erase app) with button if TINYUF2_DFU_BUTTON is set to 1.

This adds a check to see if a button is pressed. If the board button is pressed, stay if dfu mode.

If TINYUF2_DFU_BUTTON_ERASE is also set to 1, then the app is erased.

Initially opened discussion here. But decided to just go ahead and open a PR. Feel free to close this if you think it's not a feature you want to have integrated.