RTEMS 6.1-rc2
Loading...
Searching...
No Matches
gr740-thsens-regs.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
12/*
13 * Copyright (C) 2021, 2023 embedded brains GmbH & Co. KG
14 *
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions
17 * are met:
18 * 1. Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 * POSSIBILITY OF SUCH DAMAGE.
35 */
36
37/*
38 * This file is part of the RTEMS quality process and was automatically
39 * generated. If you find something that needs to be fixed or
40 * worded better please post a report or patch to an RTEMS mailing list
41 * or raise a bug report:
42 *
43 * https://www.rtems.org/bugs.html
44 *
45 * For information on updating and regenerating please refer to the How-To
46 * section in the Software Requirements Engineering chapter of the
47 * RTEMS Software Engineering manual. The manual is provided as a part of
48 * a release. For development sources please refer to the online
49 * documentation at:
50 *
51 * https://docs.rtems.org
52 */
53
54/* Generated from spec:/bsp/sparc/leon3/if/gr740-thsens-header */
55
56#ifndef _BSP_GR740_THSENS_REGS_H
57#define _BSP_GR740_THSENS_REGS_H
58
59#include <stdint.h>
60
61#ifdef __cplusplus
62extern "C" {
63#endif
64
65/* Generated from spec:/bsp/sparc/leon3/if/gr740-thsens */
66
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 )
98
99#define GR740_THSENS_CTRL_ALEN 0x100U
100
101#define GR740_THSENS_CTRL_PDN 0x80U
102
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 )
115
116#define GR740_THSENS_CTRL_SRSTN 0x2U
117
118#define GR740_THSENS_CTRL_CLKEN 0x1U
119
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 )
142
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 )
155
156#define GR740_THSENS_STATUS_SCLK 0x8000U
157
158#define GR740_THSENS_STATUS_WE 0x400U
159
160#define GR740_THSENS_STATUS_UPD 0x200U
161
162#define GR740_THSENS_STATUS_ALACT 0x100U
163
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 )
176
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 )
199
206typedef struct gr740_thsens {
210 uint32_t ctrl;
211
215 uint32_t status;
216
220 uint32_t thres;
222
225#ifdef __cplusplus
226}
227#endif
228
229#endif /* _BSP_GR740_THSENS_REGS_H */
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