RP2040 Enter uf2 DFU mode (#3062)

* Pico enter dfu mode

* Ungaurd pico
pull/3063/head
Ben Meadors 2024-01-06 14:39:27 -06:00 zatwierdzone przez GitHub
rodzic bacc525d0a
commit 674fd32349
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -190,7 +190,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta
}
case meshtastic_AdminMessage_enter_dfu_mode_request_tag: {
LOG_INFO("Client is requesting to enter DFU mode.\n");
#ifdef ARCH_NRF52
#if defined(ARCH_NRF52) || defined(ARCH_RP2040)
enterDfuMode();
#endif
break;

Wyświetl plik

@ -35,4 +35,9 @@ void rp2040Setup()
Taken from CPU cycle counter and ROSC oscillator, so should be pretty random.
*/
randomSeed(rp2040.hwrand32());
}
void enterDfuMode()
{
reset_usb_boot(0, 0);
}