1 /*
2  * Copyright (c) 2021-2024 HPMicro
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 
9 #ifndef HPM_BGPR_H
10 #define HPM_BGPR_H
11 
12 typedef struct {
13     __RW uint32_t GPR[8];                      /* 0x0 - 0x1C: Generic control */
14 } BGPR_Type;
15 
16 
17 /* Bitfield definition for register array: GPR */
18 /*
19  * DATA (RW)
20  *
21  * Generic control
22  */
23 #define BGPR_GPR_DATA_MASK (0xFFFFFFFFUL)
24 #define BGPR_GPR_DATA_SHIFT (0U)
25 #define BGPR_GPR_DATA_SET(x) (((uint32_t)(x) << BGPR_GPR_DATA_SHIFT) & BGPR_GPR_DATA_MASK)
26 #define BGPR_GPR_DATA_GET(x) (((uint32_t)(x) & BGPR_GPR_DATA_MASK) >> BGPR_GPR_DATA_SHIFT)
27 
28 
29 
30 /* GPR register group index macro definition */
31 #define BGPR_GPR_0 (0UL)
32 #define BGPR_GPR_1 (1UL)
33 #define BGPR_GPR_2 (2UL)
34 #define BGPR_GPR_3 (3UL)
35 #define BGPR_GPR_4 (4UL)
36 #define BGPR_GPR_5 (5UL)
37 #define BGPR_GPR_6 (6UL)
38 #define BGPR_GPR_7 (7UL)
39 
40 
41 #endif /* HPM_BGPR_H */
42