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.61
24 // Version: 1
25 
26 #ifndef __SI32_VREF_B_REGISTERS_H__
27 #define __SI32_VREF_B_REGISTERS_H__
28 
29 #include <stdint.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 struct SI32_VREF_B_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          // VREF Output Enable
46          volatile uint32_t VREFOUTEN: 1;
47                   uint32_t reserved0: 29;
48       };
49       volatile uint32_t U32;
50    };
51 };
52 
53 #define SI32_VREF_B_CONTROL_VREF2X_MASK  0x00000001
54 #define SI32_VREF_B_CONTROL_VREF2X_SHIFT  0
55 // VREF output is nominally 1.2 V
56 #define SI32_VREF_B_CONTROL_VREF2X_DISABLED_VALUE  0
57 #define SI32_VREF_B_CONTROL_VREF2X_DISABLED_U32 \
58    (SI32_VREF_B_CONTROL_VREF2X_DISABLED_VALUE << SI32_VREF_B_CONTROL_VREF2X_SHIFT)
59 // VREF output is nominally 2.4 V
60 #define SI32_VREF_B_CONTROL_VREF2X_ENABLED_VALUE  1
61 #define SI32_VREF_B_CONTROL_VREF2X_ENABLED_U32 \
62    (SI32_VREF_B_CONTROL_VREF2X_ENABLED_VALUE << SI32_VREF_B_CONTROL_VREF2X_SHIFT)
63 
64 #define SI32_VREF_B_CONTROL_TEMPEN_MASK  0x00000002
65 #define SI32_VREF_B_CONTROL_TEMPEN_SHIFT  1
66 // Disable the temperature sensor.
67 #define SI32_VREF_B_CONTROL_TEMPEN_DISABLED_VALUE  0
68 #define SI32_VREF_B_CONTROL_TEMPEN_DISABLED_U32 \
69    (SI32_VREF_B_CONTROL_TEMPEN_DISABLED_VALUE << SI32_VREF_B_CONTROL_TEMPEN_SHIFT)
70 // Enable the temperature sensor.
71 #define SI32_VREF_B_CONTROL_TEMPEN_ENABLED_VALUE  1
72 #define SI32_VREF_B_CONTROL_TEMPEN_ENABLED_U32 \
73    (SI32_VREF_B_CONTROL_TEMPEN_ENABLED_VALUE << SI32_VREF_B_CONTROL_TEMPEN_SHIFT)
74 
75 #define SI32_VREF_B_CONTROL_VREFOUTEN_MASK  0x00000004
76 #define SI32_VREF_B_CONTROL_VREFOUTEN_SHIFT  2
77 // Internal VREF is not driven on the VREF pin.
78 #define SI32_VREF_B_CONTROL_VREFOUTEN_DISABLED_VALUE  0
79 #define SI32_VREF_B_CONTROL_VREFOUTEN_DISABLED_U32 \
80    (SI32_VREF_B_CONTROL_VREFOUTEN_DISABLED_VALUE << SI32_VREF_B_CONTROL_VREFOUTEN_SHIFT)
81 // Internal VREF is driven out to the VREF pin.
82 #define SI32_VREF_B_CONTROL_VREFOUTEN_ENABLED_VALUE  1
83 #define SI32_VREF_B_CONTROL_VREFOUTEN_ENABLED_U32 \
84    (SI32_VREF_B_CONTROL_VREFOUTEN_ENABLED_VALUE << SI32_VREF_B_CONTROL_VREFOUTEN_SHIFT)
85 
86 
87 
88 typedef struct SI32_VREF_B_Struct
89 {
90    struct SI32_VREF_B_CONTROL_Struct               CONTROL        ; // Base Address + 0x0
91    volatile uint32_t                               CONTROL_SET;
92    volatile uint32_t                               CONTROL_CLR;
93    uint32_t                                        reserved0;
94 } SI32_VREF_B_Type;
95 
96 #ifdef __cplusplus
97 }
98 #endif
99 
100 #endif // __SI32_VREF_B_REGISTERS_H__
101 
102 //-eof--------------------------------------------------------------------------
103 
104