-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
factory_reset.h
executable file
·40 lines (29 loc) · 1 KB
/
factory_reset.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef FACTORY_RESET_H
#define FACTORY_RESET_H
#define FACTORY_RESET_EVT 0x1000
#define FACTORY_BOOTCOUNTER_RESET_EVT 0x2000
#ifndef FACTORY_RESET_HOLD_TIME_LONG
#define FACTORY_RESET_HOLD_TIME_LONG ((uint32)10 * 1000)
#endif
#ifndef FACTORY_RESET_HOLD_TIME_FAST
#define FACTORY_RESET_HOLD_TIME_FAST 1000
#endif
#ifndef FACTORY_RESET_BOOTCOUNTER_MAX_VALUE
#define FACTORY_RESET_BOOTCOUNTER_MAX_VALUE 5
#endif
#ifndef FACTORY_RESET_BOOTCOUNTER_RESET_TIME
#define FACTORY_RESET_BOOTCOUNTER_RESET_TIME 10 * 1000
#endif
#ifndef FACTORY_RESET_BY_LONG_PRESS
#define FACTORY_RESET_BY_LONG_PRESS TRUE
#endif
#ifndef FACTORY_RESET_BY_LONG_PRESS_PORT
#define FACTORY_RESET_BY_LONG_PRESS_PORT 0x00
#endif
#ifndef FACTORY_RESET_BY_BOOT_COUNTER
#define FACTORY_RESET_BY_BOOT_COUNTER TRUE
#endif
extern void zclFactoryResetter_Init(uint8 task_id);
extern uint16 zclFactoryResetter_loop(uint8 task_id, uint16 events);
extern void zclFactoryResetter_HandleKeys(uint8 portAndAction, uint8 keyCode);
#endif