HPM SDK
HPMicro Software Development Kit
hpm_mono_regs.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021-2023 HPMicro
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 
9 #ifndef HPM_MONO_H
10 #define HPM_MONO_H
11 
12 typedef struct {
13  __RW uint32_t MONOL; /* 0x0: Low part of monotonic counter */
14  __RW uint32_t MONOH; /* 0x4: High part of monotonic counter */
15 } MONO_Type;
16 
17 
18 /* Bitfield definition for register: MONO */
19 /*
20  * COUNTER (RW)
21  *
22  * 32 bits of monotonica counter, write to this counter will cause counter increase by 1
23  */
24 #define MONO_COUNTER_MASK (0xFFFFFFFFUL)
25 #define MONO_COUNTER_SHIFT (0U)
26 #define MONO_COUNTER_SET(x) (((uint32_t)(x) << MONO_COUNTER_SHIFT) & MONO_COUNTER_MASK)
27 #define MONO_COUNTER_GET(x) (((uint32_t)(x) & MONO_COUNTER_MASK) >> MONO_COUNTER_SHIFT)
28 
29 
30 #endif /* HPM_MONO_H */
Definition: hpm_mono_regs.h:12