Skip to content

Commit 99d31d2

Browse files
committed
remove the use of factory reset
1 parent dad8e10 commit 99d31d2

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

src/main.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ enum { BLE_CONN_CFG_HIGH_BANDWIDTH = 1 };
142142
//--------------------------------------------------------------------+
143143
//
144144
//--------------------------------------------------------------------+
145-
void adafruit_factory_reset(void);
146145
static uint32_t softdev_init(bool init_softdevice);
147146

148147
uint32_t* dbl_reset_mem = ((uint32_t*) DFU_DBL_RESET_MEM );
@@ -272,14 +271,6 @@ int main(void)
272271
}
273272
}
274273

275-
#if 0
276-
// Adafruit Factory reset
277-
if ( !button_pressed(BUTTON_DFU) && button_pressed(BUTTON_FRESET) )
278-
{
279-
adafruit_factory_reset();
280-
}
281-
#endif
282-
283274
// Reset Board
284275
board_teardown();
285276

@@ -306,27 +297,6 @@ int main(void)
306297
NVIC_SystemReset();
307298
}
308299

309-
310-
#if 0
311-
// Perform factory reset to erase Application + Data
312-
void adafruit_factory_reset(void)
313-
{
314-
led_state(STATE_FACTORY_RESET_STARTED);
315-
316-
// clear all App Data if any
317-
if ( DFU_APP_DATA_RESERVED )
318-
{
319-
nrfx_nvmc_page_erase(APPDATA_ADDR_START);
320-
}
321-
322-
// Only need to erase the 1st page of Application code to make it invalid
323-
nrfx_nvmc_page_erase(DFU_BANK_0_REGION_START);
324-
325-
// back to normal
326-
led_state(STATE_FACTORY_RESET_FINISHED);
327-
}
328-
#endif
329-
330300
/**
331301
* Initializes the SotdDevice by following SD specs section
332302
* "Master Boot Record and SoftDevice initializaton procedure"

0 commit comments

Comments
 (0)