1 //------------------------------------------------------------------------------
2 // Copyright 2012 (c) Silicon Laboratories Inc.
3 //
4 // SPDX-License-Identifier: Zlib
5 //
6 // This siHAL software is provided 'as-is', without any express or implied
7 // warranty. In no event will the authors be held liable for any damages
8 // arising from the use of this software.
9 //
10 // Permission is granted to anyone to use this software for any purpose,
11 // including commercial applications, and to alter it and redistribute it
12 // freely, subject to the following restrictions:
13 //
14 // 1. The origin of this software must not be misrepresented; you must not
15 //    claim that you wrote the original software. If you use this software
16 //    in a product, an acknowledgment in the product documentation would be
17 //    appreciated but is not required.
18 // 2. Altered source versions must be plainly marked as such, and must not be
19 //    misrepresented as being the original software.
20 // 3. This notice may not be removed or altered from any source distribution.
21 //------------------------------------------------------------------------------
22 //
23 // Script: 0.57
24 // Version: 1
25 
26 #ifndef __SI32_VREF_A_REGISTERS_H__
27 #define __SI32_VREF_A_REGISTERS_H__
28 
29 #include <stdint.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 struct SI32_VREF_A_CONTROL_Struct
36 {
37    union
38    {
39       struct
40       {
41          // Voltage Reference Doubler
42          volatile uint32_t VREF2X: 1;
43          // Temperature Sensor Enable
44          volatile uint32_t TEMPEN: 1;
45                   uint32_t reserved0: 29;
46          // Voltage Reference Enable
47          volatile uint32_t VREFEN: 1;
48       };
49       volatile uint32_t U32;
50    };
51 };
52 
53 #define SI32_VREF_A_CONTROL_VREF2X_MASK  0x00000001
54 #define SI32_VREF_A_CONTROL_VREF2X_SHIFT  0
55 // VREF output is nominally 1.2 V
56 #define SI32_VREF_A_CONTROL_VREF2X_DISABLED_VALUE  0
57 #define SI32_VREF_A_CONTROL_VREF2X_DISABLED_U32 \
58    (SI32_VREF_A_CONTROL_VREF2X_DISABLED_VALUE << SI32_VREF_A_CONTROL_VREF2X_SHIFT)
59 // VREF output is nominally 2.4 V
60 #define SI32_VREF_A_CONTROL_VREF2X_ENABLED_VALUE  1
61 #define SI32_VREF_A_CONTROL_VREF2X_ENABLED_U32 \
62    (SI32_VREF_A_CONTROL_VREF2X_ENABLED_VALUE << SI32_VREF_A_CONTROL_VREF2X_SHIFT)
63 
64 #define SI32_VREF_A_CONTROL_TEMPEN_MASK  0x00000002
65 #define SI32_VREF_A_CONTROL_TEMPEN_SHIFT  1
66 // Disable the temperature sensor.
67 #define SI32_VREF_A_CONTROL_TEMPEN_DISABLED_VALUE  0
68 #define SI32_VREF_A_CONTROL_TEMPEN_DISABLED_U32 \
69    (SI32_VREF_A_CONTROL_TEMPEN_DISABLED_VALUE << SI32_VREF_A_CONTROL_TEMPEN_SHIFT)
70 // Enable the temperature sensor.
71 #define SI32_VREF_A_CONTROL_TEMPEN_ENABLED_VALUE  1
72 #define SI32_VREF_A_CONTROL_TEMPEN_ENABLED_U32 \
73    (SI32_VREF_A_CONTROL_TEMPEN_ENABLED_VALUE << SI32_VREF_A_CONTROL_TEMPEN_SHIFT)
74 
75 #define SI32_VREF_A_CONTROL_VREFEN_MASK  0x80000000
76 #define SI32_VREF_A_CONTROL_VREFEN_SHIFT  31
77 // Disable the Voltage Reference.
78 #define SI32_VREF_A_CONTROL_VREFEN_DISABLED_VALUE  0U
79 #define SI32_VREF_A_CONTROL_VREFEN_DISABLED_U32 \
80    (SI32_VREF_A_CONTROL_VREFEN_DISABLED_VALUE << SI32_VREF_A_CONTROL_VREFEN_SHIFT)
81 // Enable the Voltage Reference.
82 #define SI32_VREF_A_CONTROL_VREFEN_ENABLED_VALUE  1U
83 #define SI32_VREF_A_CONTROL_VREFEN_ENABLED_U32 \
84    (SI32_VREF_A_CONTROL_VREFEN_ENABLED_VALUE << SI32_VREF_A_CONTROL_VREFEN_SHIFT)
85 
86 
87 
88 typedef struct SI32_VREF_A_Struct
89 {
90    struct SI32_VREF_A_CONTROL_Struct               CONTROL        ; // Base Address + 0x0
91    volatile uint32_t                               CONTROL_SET;
92    volatile uint32_t                               CONTROL_CLR;
93    uint32_t                                        reserved0;
94    uint32_t                                        reserved1[4];
95    uint32_t                                        reserved2[4];
96    uint32_t                                        reserved3[4];
97 } SI32_VREF_A_Type;
98 
99 #ifdef __cplusplus
100 }
101 #endif
102 
103 #endif // __SI32_VREF_A_REGISTERS_H__
104 
105 //-eof--------------------------------------------------------------------------
106 
107