56#ifndef _BSP_GR740_THSENS_REGS_H
57#define _BSP_GR740_THSENS_REGS_H
86#define GR740_THSENS_CTRL_DIV_SHIFT 16
87#define GR740_THSENS_CTRL_DIV_MASK 0x3ff0000U
88#define GR740_THSENS_CTRL_DIV_GET( _reg ) \
89 ( ( ( _reg ) & GR740_THSENS_CTRL_DIV_MASK ) >> \
90 GR740_THSENS_CTRL_DIV_SHIFT )
91#define GR740_THSENS_CTRL_DIV_SET( _reg, _val ) \
92 ( ( ( _reg ) & ~GR740_THSENS_CTRL_DIV_MASK ) | \
93 ( ( ( _val ) << GR740_THSENS_CTRL_DIV_SHIFT ) & \
94 GR740_THSENS_CTRL_DIV_MASK ) )
95#define GR740_THSENS_CTRL_DIV( _val ) \
96 ( ( ( _val ) << GR740_THSENS_CTRL_DIV_SHIFT ) & \
97 GR740_THSENS_CTRL_DIV_MASK )
99#define GR740_THSENS_CTRL_ALEN 0x100U
101#define GR740_THSENS_CTRL_PDN 0x80U
103#define GR740_THSENS_CTRL_DCORRECT_SHIFT 2
104#define GR740_THSENS_CTRL_DCORRECT_MASK 0x7cU
105#define GR740_THSENS_CTRL_DCORRECT_GET( _reg ) \
106 ( ( ( _reg ) & GR740_THSENS_CTRL_DCORRECT_MASK ) >> \
107 GR740_THSENS_CTRL_DCORRECT_SHIFT )
108#define GR740_THSENS_CTRL_DCORRECT_SET( _reg, _val ) \
109 ( ( ( _reg ) & ~GR740_THSENS_CTRL_DCORRECT_MASK ) | \
110 ( ( ( _val ) << GR740_THSENS_CTRL_DCORRECT_SHIFT ) & \
111 GR740_THSENS_CTRL_DCORRECT_MASK ) )
112#define GR740_THSENS_CTRL_DCORRECT( _val ) \
113 ( ( ( _val ) << GR740_THSENS_CTRL_DCORRECT_SHIFT ) & \
114 GR740_THSENS_CTRL_DCORRECT_MASK )
116#define GR740_THSENS_CTRL_SRSTN 0x2U
118#define GR740_THSENS_CTRL_CLKEN 0x1U
130#define GR740_THSENS_STATUS_MAX_SHIFT 24
131#define GR740_THSENS_STATUS_MAX_MASK 0x7f000000U
132#define GR740_THSENS_STATUS_MAX_GET( _reg ) \
133 ( ( ( _reg ) & GR740_THSENS_STATUS_MAX_MASK ) >> \
134 GR740_THSENS_STATUS_MAX_SHIFT )
135#define GR740_THSENS_STATUS_MAX_SET( _reg, _val ) \
136 ( ( ( _reg ) & ~GR740_THSENS_STATUS_MAX_MASK ) | \
137 ( ( ( _val ) << GR740_THSENS_STATUS_MAX_SHIFT ) & \
138 GR740_THSENS_STATUS_MAX_MASK ) )
139#define GR740_THSENS_STATUS_MAX( _val ) \
140 ( ( ( _val ) << GR740_THSENS_STATUS_MAX_SHIFT ) & \
141 GR740_THSENS_STATUS_MAX_MASK )
143#define GR740_THSENS_STATUS_MIN_SHIFT 16
144#define GR740_THSENS_STATUS_MIN_MASK 0x7f0000U
145#define GR740_THSENS_STATUS_MIN_GET( _reg ) \
146 ( ( ( _reg ) & GR740_THSENS_STATUS_MIN_MASK ) >> \
147 GR740_THSENS_STATUS_MIN_SHIFT )
148#define GR740_THSENS_STATUS_MIN_SET( _reg, _val ) \
149 ( ( ( _reg ) & ~GR740_THSENS_STATUS_MIN_MASK ) | \
150 ( ( ( _val ) << GR740_THSENS_STATUS_MIN_SHIFT ) & \
151 GR740_THSENS_STATUS_MIN_MASK ) )
152#define GR740_THSENS_STATUS_MIN( _val ) \
153 ( ( ( _val ) << GR740_THSENS_STATUS_MIN_SHIFT ) & \
154 GR740_THSENS_STATUS_MIN_MASK )
156#define GR740_THSENS_STATUS_SCLK 0x8000U
158#define GR740_THSENS_STATUS_WE 0x400U
160#define GR740_THSENS_STATUS_UPD 0x200U
162#define GR740_THSENS_STATUS_ALACT 0x100U
164#define GR740_THSENS_STATUS_DATA_SHIFT 0
165#define GR740_THSENS_STATUS_DATA_MASK 0x7fU
166#define GR740_THSENS_STATUS_DATA_GET( _reg ) \
167 ( ( ( _reg ) & GR740_THSENS_STATUS_DATA_MASK ) >> \
168 GR740_THSENS_STATUS_DATA_SHIFT )
169#define GR740_THSENS_STATUS_DATA_SET( _reg, _val ) \
170 ( ( ( _reg ) & ~GR740_THSENS_STATUS_DATA_MASK ) | \
171 ( ( ( _val ) << GR740_THSENS_STATUS_DATA_SHIFT ) & \
172 GR740_THSENS_STATUS_DATA_MASK ) )
173#define GR740_THSENS_STATUS_DATA( _val ) \
174 ( ( ( _val ) << GR740_THSENS_STATUS_DATA_SHIFT ) & \
175 GR740_THSENS_STATUS_DATA_MASK )
187#define GR740_THSENS_THRES_THRES_SHIFT 0
188#define GR740_THSENS_THRES_THRES_MASK 0x7fU
189#define GR740_THSENS_THRES_THRES_GET( _reg ) \
190 ( ( ( _reg ) & GR740_THSENS_THRES_THRES_MASK ) >> \
191 GR740_THSENS_THRES_THRES_SHIFT )
192#define GR740_THSENS_THRES_THRES_SET( _reg, _val ) \
193 ( ( ( _reg ) & ~GR740_THSENS_THRES_THRES_MASK ) | \
194 ( ( ( _val ) << GR740_THSENS_THRES_THRES_SHIFT ) & \
195 GR740_THSENS_THRES_THRES_MASK ) )
196#define GR740_THSENS_THRES_THRES( _val ) \
197 ( ( ( _val ) << GR740_THSENS_THRES_THRES_SHIFT ) & \
198 GR740_THSENS_THRES_THRES_MASK )
This structure defines the GR740 Temperatur Sensor Controller register block memory map.
Definition: gr740-thsens-regs.h:206
uint32_t ctrl
See Control register (CTRL).
Definition: gr740-thsens-regs.h:210
uint32_t status
See Status register (STATUS).
Definition: gr740-thsens-regs.h:215
uint32_t thres
See Threshold register (THRES).
Definition: gr740-thsens-regs.h:220