This commit is contained in:
hathach 2018-09-30 23:42:40 +07:00
parent 232bc3ab19
commit 59999d30d2
2 changed files with 3 additions and 5 deletions

View File

@ -40,9 +40,8 @@
#include "nrf_sdm.h"
#define FLASH_PAGE_SIZE 4096
#define FLASH_CACHE_INVALID_ADDR 0xffffffff
#define FLASH_PAGE_SIZE 4096
#define FLASH_CACHE_INVALID_ADDR 0xffffffff
static uint32_t _fl_addr = FLASH_CACHE_INVALID_ADDR;
static uint8_t _fl_buf[FLASH_PAGE_SIZE] __attribute__((aligned(4)));

View File

@ -111,7 +111,7 @@ void usb_teardown(void);
enum { BLE_CONN_CFG_HIGH_BANDWIDTH = 1 };
// Adafruit for factory reset
#define APPDATA_ADDR_START (BOOTLOADER_REGION_START-DFU_APP_DATA_RESERVED)
#define APPDATA_ADDR_START (BOOTLOADER_REGION_START-DFU_APP_DATA_RESERVED)
#ifdef NRF52840_XXAA
STATIC_ASSERT( APPDATA_ADDR_START == 0xED000);
@ -181,7 +181,6 @@ int main(void)
// DFU + FRESET are pressed --> OTA
_ota_dfu = _ota_dfu || ( button_pressed(BUTTON_DFU) && button_pressed(BUTTON_FRESET) ) ;
bool const valid_app = bootloader_app_is_valid(DFU_BANK_0_REGION_START);
// App mode: register 1st reset and DFU startup (nrf52832)