mirror of
https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX.git
synced 2026-05-26 07:34:40 +00:00
updates per @hathach feedback
This commit is contained in:
@@ -363,12 +363,7 @@ void read_block(uint32_t block_no, uint8_t *data) {
|
||||
bl->targetAddr = addr;
|
||||
bl->payloadSize = UF2_FIRMWARE_BYTES_PER_SECTOR;
|
||||
bl->flags = UF2_FLAG_FAMILYID;
|
||||
|
||||
#if defined(CFG_UF2_BOARD_APP_ID) && CFG_UF2_BOARD_APP_ID
|
||||
bl->familyID = CFG_UF2_BOARD_APP_ID;
|
||||
#else
|
||||
bl->familyID = CFG_UF2_FAMILY_APP_ID;
|
||||
#endif
|
||||
memcpy(bl->data, (void *)addr, bl->payloadSize);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "boards.h"
|
||||
#include "dfu_types.h"
|
||||
|
||||
// Legacy Family ID for updating Application
|
||||
// Family ID for updating generic Application
|
||||
#define CFG_UF2_FAMILY_APP_ID 0xADA52840
|
||||
|
||||
// Family ID for board-specific Application
|
||||
// Board-specific ID for board-specific Application
|
||||
#if defined(USB_DESC_VID) && defined(USB_DESC_UF2_PID) && USB_DESC_VID && USB_DESC_UF2_PID
|
||||
#define CFG_UF2_BOARD_APP_ID ((USB_DESC_VID << 16) | USB_DESC_UF2_PID)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user