18#if BUILD_MICROAPP_SUPPORT == 1
19 FACTORY_RESET_BIT_MICROAPP,
21#if BUILD_MESHING == 1 && MESH_PERSISTENT_STORAGE == 1
22 FACTORY_RESET_BIT_MESH,
26#define FACTORY_RESET_MASK_ALL ((1 << FACTORY_RESET_NUM_BITS) - 1)
Event listener.
Definition: cs_EventListener.h:17
Definition: cs_FactoryReset.h:28
void onClassFactoryResetDone(const FactoryResetClassBit bit)
bool _recoveryEnabled
Definition: cs_FactoryReset.h:71
void handleEvent(event_t &event)
Handle events.
app_timer_id_t _recoveryProcessTimerId
Definition: cs_FactoryReset.h:81
uint32_t _rtcStartTime
Definition: cs_FactoryReset.h:72
uint8_t _successfullyFactoryResetBitmask
Definition: cs_FactoryReset.h:75
void enableRecovery(bool enable)
bool validateResetCode(uint32_t resetCode)
bool recover(uint32_t resetCode)
static void staticTimeout(FactoryReset *ptr)
Definition: cs_FactoryReset.h:51
app_timer_t _recoveryDisableTimerData
Definition: cs_FactoryReset.h:77
bool factoryReset(uint32_t resetCode)
app_timer_id_t _recoveryDisableTimerId
Definition: cs_FactoryReset.h:78
static void staticProcess(FactoryReset *ptr)
Definition: cs_FactoryReset.h:54
app_timer_t _recoveryProcessTimerData
Definition: cs_FactoryReset.h:80
static FactoryReset & getInstance()
Gets a static singleton (no dynamic memory allocation)
Definition: cs_FactoryReset.h:31
void finishFactoryReset(uint8_t deviceType)
bool performFactoryReset()
Author: Crownstone Team Copyright: Crownstone (https://crownstone.rocks) Date: Oct 9,...
Definition: cs_Event.h:26
FactoryResetClassBit
Definition: cs_FactoryReset.h:16
@ FACTORY_RESET_BIT_STATE
Definition: cs_FactoryReset.h:17
@ FACTORY_RESET_NUM_BITS
Definition: cs_FactoryReset.h:24