forked from Mindgrove-Technologies/micropython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwdtimer.h
More file actions
34 lines (24 loc) · 619 Bytes
/
Copy pathwdtimer.h
File metadata and controls
34 lines (24 loc) · 619 Bytes
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
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/*extern unsigned int wd_cycles;
extern unsigned short reset_cycles;
extern unsigned short control_reg;
*/
#define WATCHDOG_EN 1<<0
#define RESET_INTERRUPT_MODE 1<<1
#define SOFT_RESET 1<<2
#define INTERRUPT_MODE 1
#define SOFT_RESET_MODE 7
#define RESET_MODE 3
#define WD_CYCLES_REG_ADDR 0x40400
#define CONTROL_REG_ADDR 0x40408
#define RESET_CYCLES_REG_ADDR 0x40410
void wdt_init(void);
void wdtimer_start(uint16_t mode, uint16_t rcycles, uint32_t wcycles);
void wdtimer_disable();
void wdtimer_reset();
#ifdef __cplusplus
}
#endif