1
2
3
8
9
10
11
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* ... */
#ifndef _HARDWARE_STRUCTS_WATCHDOG_H
#define _HARDWARE_STRUCTS_WATCHDOG_H
/* ... */
#include "hardware/address_mapped.h"
#include "hardware/regs/watchdog.h"
typedef struct {
_REG_(WATCHDOG_CTRL_OFFSET)
io_rw_32 ctrl;
_REG_(WATCHDOG_LOAD_OFFSET)
io_wo_32 load;
_REG_(WATCHDOG_REASON_OFFSET)
io_ro_32 reason;
_REG_(WATCHDOG_SCRATCH0_OFFSET)
io_rw_32 scratch[8];
...} watchdog_hw_t;
#define watchdog_hw ((watchdog_hw_t *)WATCHDOG_BASE)
static_assert(sizeof (watchdog_hw_t) == 0x002c, "");
/* ... */
#endif