]>
git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K22F/device/MK22F51212/MK22F51212_rng.h
2 ** ###################################################################
3 ** Compilers: Keil ARM C/C++ Compiler
4 ** Freescale C/C++ for Embedded ARM
6 ** IAR ANSI C/C++ Compiler for ARM
8 ** Reference manual: K22P121M120SF7RM, Rev. 1, March 24, 2014
9 ** Version: rev. 2.5, 2014-05-06
13 ** Extension to the CMSIS register access layer header.
15 ** Copyright (c) 2014 Freescale Semiconductor, Inc.
16 ** All rights reserved.
18 ** Redistribution and use in source and binary forms, with or without modification,
19 ** are permitted provided that the following conditions are met:
21 ** o Redistributions of source code must retain the above copyright notice, this list
22 ** of conditions and the following disclaimer.
24 ** o Redistributions in binary form must reproduce the above copyright notice, this
25 ** list of conditions and the following disclaimer in the documentation and/or
26 ** other materials provided with the distribution.
28 ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its
29 ** contributors may be used to endorse or promote products derived from this
30 ** software without specific prior written permission.
32 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
33 ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34 ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35 ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
36 ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
37 ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
38 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
39 ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43 ** http: www.freescale.com
44 ** mail: support@freescale.com
47 ** - rev. 1.0 (2013-07-23)
49 ** - rev. 1.1 (2013-09-17)
50 ** RM rev. 0.4 update.
51 ** - rev. 2.0 (2013-10-29)
52 ** Register accessor macros added to the memory map.
53 ** Symbols for Processor Expert memory map compatibility added to the memory map.
54 ** Startup file for gcc has been updated according to CMSIS 3.2.
55 ** System initialization updated.
56 ** - rev. 2.1 (2013-10-30)
57 ** Definition of BITBAND macros updated to support peripherals with 32-bit acces disabled.
58 ** - rev. 2.2 (2013-12-20)
59 ** Update according to reference manual rev. 0.6,
60 ** - rev. 2.3 (2014-01-13)
61 ** Update according to reference manual rev. 0.61,
62 ** - rev. 2.4 (2014-02-10)
63 ** The declaration of clock configurations has been moved to separate header file system_MK22F51212.h
64 ** - rev. 2.5 (2014-05-06)
65 ** Update according to reference manual rev. 1.0,
66 ** Update of system and startup files.
67 ** Module access macro module_BASES replaced by module_BASE_PTRS.
69 ** ###################################################################
73 * WARNING! DO NOT EDIT THIS FILE DIRECTLY!
75 * This file was generated automatically and any changes may be lost.
77 #ifndef __HW_RNG_REGISTERS_H__
78 #define __HW_RNG_REGISTERS_H__
80 #include "MK22F51212.h"
81 #include "fsl_bitaccess.h"
86 * Random Number Generator Accelerator
88 * Registers defined in this header file:
89 * - HW_RNG_CR - RNGA Control Register
90 * - HW_RNG_SR - RNGA Status Register
91 * - HW_RNG_ER - RNGA Entropy Register
92 * - HW_RNG_OR - RNGA Output Register
94 * - hw_rng_t - Struct containing all module registers.
97 #define HW_RNG_INSTANCE_COUNT (1U) /*!< Number of instances of the RNG module. */
99 /*******************************************************************************
100 * HW_RNG_CR - RNGA Control Register
101 ******************************************************************************/
104 * @brief HW_RNG_CR - RNGA Control Register (RW)
106 * Reset value: 0x00000000U
108 * Controls the operation of RNGA.
110 typedef union _hw_rng_cr
113 struct _hw_rng_cr_bitfields
115 uint32_t GO
: 1; /*!< [0] Go */
116 uint32_t HA
: 1; /*!< [1] High Assurance */
117 uint32_t INTM
: 1; /*!< [2] Interrupt Mask */
118 uint32_t CLRI
: 1; /*!< [3] Clear Interrupt */
119 uint32_t SLP
: 1; /*!< [4] Sleep */
120 uint32_t RESERVED0
: 27; /*!< [31:5] */
125 * @name Constants and macros for entire RNG_CR register
128 #define HW_RNG_CR_ADDR(x) ((x) + 0x0U)
130 #define HW_RNG_CR(x) (*(__IO hw_rng_cr_t *) HW_RNG_CR_ADDR(x))
131 #define HW_RNG_CR_RD(x) (HW_RNG_CR(x).U)
132 #define HW_RNG_CR_WR(x, v) (HW_RNG_CR(x).U = (v))
133 #define HW_RNG_CR_SET(x, v) (HW_RNG_CR_WR(x, HW_RNG_CR_RD(x) | (v)))
134 #define HW_RNG_CR_CLR(x, v) (HW_RNG_CR_WR(x, HW_RNG_CR_RD(x) & ~(v)))
135 #define HW_RNG_CR_TOG(x, v) (HW_RNG_CR_WR(x, HW_RNG_CR_RD(x) ^ (v)))
139 * Constants & macros for individual RNG_CR bitfields
143 * @name Register RNG_CR, field GO[0] (RW)
145 * Specifies whether random-data generation and loading (into OR[RANDOUT]) is
146 * enabled.This field is sticky. You must reset RNGA to stop RNGA from loading
147 * OR[RANDOUT] with data.
154 #define BP_RNG_CR_GO (0U) /*!< Bit position for RNG_CR_GO. */
155 #define BM_RNG_CR_GO (0x00000001U) /*!< Bit mask for RNG_CR_GO. */
156 #define BS_RNG_CR_GO (1U) /*!< Bit field size in bits for RNG_CR_GO. */
158 /*! @brief Read current value of the RNG_CR_GO field. */
159 #define BR_RNG_CR_GO(x) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_GO))
161 /*! @brief Format value for bitfield RNG_CR_GO. */
162 #define BF_RNG_CR_GO(v) ((uint32_t)((uint32_t)(v) << BP_RNG_CR_GO) & BM_RNG_CR_GO)
164 /*! @brief Set the GO field to a new value. */
165 #define BW_RNG_CR_GO(x, v) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_GO) = (v))
169 * @name Register RNG_CR, field HA[1] (RW)
171 * Enables notification of security violations (via SR[SECV]). A security
172 * violation occurs when you read OR[RANDOUT] and SR[OREG_LVL]=0. This field is sticky.
173 * After enabling notification of security violations, you must reset RNGA to
174 * disable them again.
181 #define BP_RNG_CR_HA (1U) /*!< Bit position for RNG_CR_HA. */
182 #define BM_RNG_CR_HA (0x00000002U) /*!< Bit mask for RNG_CR_HA. */
183 #define BS_RNG_CR_HA (1U) /*!< Bit field size in bits for RNG_CR_HA. */
185 /*! @brief Read current value of the RNG_CR_HA field. */
186 #define BR_RNG_CR_HA(x) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_HA))
188 /*! @brief Format value for bitfield RNG_CR_HA. */
189 #define BF_RNG_CR_HA(v) ((uint32_t)((uint32_t)(v) << BP_RNG_CR_HA) & BM_RNG_CR_HA)
191 /*! @brief Set the HA field to a new value. */
192 #define BW_RNG_CR_HA(x, v) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_HA) = (v))
196 * @name Register RNG_CR, field INTM[2] (RW)
198 * Masks the triggering of an error interrupt to the interrupt controller when
199 * an OR underflow condition occurs. An OR underflow condition occurs when you
200 * read OR[RANDOUT] and SR[OREG_LVL]=0. See the Output Register (OR) description.
207 #define BP_RNG_CR_INTM (2U) /*!< Bit position for RNG_CR_INTM. */
208 #define BM_RNG_CR_INTM (0x00000004U) /*!< Bit mask for RNG_CR_INTM. */
209 #define BS_RNG_CR_INTM (1U) /*!< Bit field size in bits for RNG_CR_INTM. */
211 /*! @brief Read current value of the RNG_CR_INTM field. */
212 #define BR_RNG_CR_INTM(x) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_INTM))
214 /*! @brief Format value for bitfield RNG_CR_INTM. */
215 #define BF_RNG_CR_INTM(v) ((uint32_t)((uint32_t)(v) << BP_RNG_CR_INTM) & BM_RNG_CR_INTM)
217 /*! @brief Set the INTM field to a new value. */
218 #define BW_RNG_CR_INTM(x, v) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_INTM) = (v))
222 * @name Register RNG_CR, field CLRI[3] (WORZ)
224 * Clears the interrupt by resetting the error-interrupt indicator (SR[ERRI]).
227 * - 0 - Do not clear the interrupt.
228 * - 1 - Clear the interrupt. When you write 1 to this field, RNGA then resets
229 * the error-interrupt indicator (SR[ERRI]). This bit always reads as 0.
232 #define BP_RNG_CR_CLRI (3U) /*!< Bit position for RNG_CR_CLRI. */
233 #define BM_RNG_CR_CLRI (0x00000008U) /*!< Bit mask for RNG_CR_CLRI. */
234 #define BS_RNG_CR_CLRI (1U) /*!< Bit field size in bits for RNG_CR_CLRI. */
236 /*! @brief Format value for bitfield RNG_CR_CLRI. */
237 #define BF_RNG_CR_CLRI(v) ((uint32_t)((uint32_t)(v) << BP_RNG_CR_CLRI) & BM_RNG_CR_CLRI)
239 /*! @brief Set the CLRI field to a new value. */
240 #define BW_RNG_CR_CLRI(x, v) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_CLRI) = (v))
244 * @name Register RNG_CR, field SLP[4] (RW)
246 * Specifies whether RNGA is in Sleep or Normal mode. You can also enter Sleep
247 * mode by asserting the DOZE signal.
251 * - 1 - Sleep (low-power) mode
254 #define BP_RNG_CR_SLP (4U) /*!< Bit position for RNG_CR_SLP. */
255 #define BM_RNG_CR_SLP (0x00000010U) /*!< Bit mask for RNG_CR_SLP. */
256 #define BS_RNG_CR_SLP (1U) /*!< Bit field size in bits for RNG_CR_SLP. */
258 /*! @brief Read current value of the RNG_CR_SLP field. */
259 #define BR_RNG_CR_SLP(x) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_SLP))
261 /*! @brief Format value for bitfield RNG_CR_SLP. */
262 #define BF_RNG_CR_SLP(v) ((uint32_t)((uint32_t)(v) << BP_RNG_CR_SLP) & BM_RNG_CR_SLP)
264 /*! @brief Set the SLP field to a new value. */
265 #define BW_RNG_CR_SLP(x, v) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_SLP) = (v))
268 /*******************************************************************************
269 * HW_RNG_SR - RNGA Status Register
270 ******************************************************************************/
273 * @brief HW_RNG_SR - RNGA Status Register (RO)
275 * Reset value: 0x00010000U
277 * Indicates the status of RNGA. This register is read-only.
279 typedef union _hw_rng_sr
282 struct _hw_rng_sr_bitfields
284 uint32_t SECV
: 1; /*!< [0] Security Violation */
285 uint32_t LRS
: 1; /*!< [1] Last Read Status */
286 uint32_t ORU
: 1; /*!< [2] Output Register Underflow */
287 uint32_t ERRI
: 1; /*!< [3] Error Interrupt */
288 uint32_t SLP
: 1; /*!< [4] Sleep */
289 uint32_t RESERVED0
: 3; /*!< [7:5] */
290 uint32_t OREG_LVL
: 8; /*!< [15:8] Output Register Level */
291 uint32_t OREG_SIZE
: 8; /*!< [23:16] Output Register Size */
292 uint32_t RESERVED1
: 8; /*!< [31:24] */
297 * @name Constants and macros for entire RNG_SR register
300 #define HW_RNG_SR_ADDR(x) ((x) + 0x4U)
302 #define HW_RNG_SR(x) (*(__I hw_rng_sr_t *) HW_RNG_SR_ADDR(x))
303 #define HW_RNG_SR_RD(x) (HW_RNG_SR(x).U)
307 * Constants & macros for individual RNG_SR bitfields
311 * @name Register RNG_SR, field SECV[0] (RO)
313 * Used only when high assurance is enabled (CR[HA]). Indicates that a security
314 * violation has occurred.This field is sticky. To clear SR[SECV], you must reset
318 * - 0 - No security violation
319 * - 1 - Security violation
322 #define BP_RNG_SR_SECV (0U) /*!< Bit position for RNG_SR_SECV. */
323 #define BM_RNG_SR_SECV (0x00000001U) /*!< Bit mask for RNG_SR_SECV. */
324 #define BS_RNG_SR_SECV (1U) /*!< Bit field size in bits for RNG_SR_SECV. */
326 /*! @brief Read current value of the RNG_SR_SECV field. */
327 #define BR_RNG_SR_SECV(x) (BITBAND_ACCESS32(HW_RNG_SR_ADDR(x), BP_RNG_SR_SECV))
331 * @name Register RNG_SR, field LRS[1] (RO)
333 * Indicates whether the most recent read of OR[RANDOUT] caused an OR underflow
334 * condition, regardless of whether the error interrupt is masked (CR[INTM]). An
335 * OR underflow condition occurs when you read OR[RANDOUT] and SR[OREG_LVL]=0.
336 * After you read this register, RNGA writes 0 to this field.
343 #define BP_RNG_SR_LRS (1U) /*!< Bit position for RNG_SR_LRS. */
344 #define BM_RNG_SR_LRS (0x00000002U) /*!< Bit mask for RNG_SR_LRS. */
345 #define BS_RNG_SR_LRS (1U) /*!< Bit field size in bits for RNG_SR_LRS. */
347 /*! @brief Read current value of the RNG_SR_LRS field. */
348 #define BR_RNG_SR_LRS(x) (BITBAND_ACCESS32(HW_RNG_SR_ADDR(x), BP_RNG_SR_LRS))
352 * @name Register RNG_SR, field ORU[2] (RO)
354 * Indicates whether an OR underflow condition has occurred since you last read
355 * this register (SR) or RNGA was reset, regardless of whether the error
356 * interrupt is masked (CR[INTM]). An OR underflow condition occurs when you read
357 * OR[RANDOUT] and SR[OREG_LVL]=0. After you read this register, RNGA writes 0 to this
365 #define BP_RNG_SR_ORU (2U) /*!< Bit position for RNG_SR_ORU. */
366 #define BM_RNG_SR_ORU (0x00000004U) /*!< Bit mask for RNG_SR_ORU. */
367 #define BS_RNG_SR_ORU (1U) /*!< Bit field size in bits for RNG_SR_ORU. */
369 /*! @brief Read current value of the RNG_SR_ORU field. */
370 #define BR_RNG_SR_ORU(x) (BITBAND_ACCESS32(HW_RNG_SR_ADDR(x), BP_RNG_SR_ORU))
374 * @name Register RNG_SR, field ERRI[3] (RO)
376 * Indicates whether an OR underflow condition has occurred since you last
377 * cleared the error interrupt (CR[CLRI]) or RNGA was reset, regardless of whether the
378 * error interrupt is masked (CR[INTM]). An OR underflow condition occurs when
379 * you read OR[RANDOUT] and SR[OREG_LVL]=0. After you reset the error-interrupt
380 * indicator (via CR[CLRI]), RNGA writes 0 to this field.
387 #define BP_RNG_SR_ERRI (3U) /*!< Bit position for RNG_SR_ERRI. */
388 #define BM_RNG_SR_ERRI (0x00000008U) /*!< Bit mask for RNG_SR_ERRI. */
389 #define BS_RNG_SR_ERRI (1U) /*!< Bit field size in bits for RNG_SR_ERRI. */
391 /*! @brief Read current value of the RNG_SR_ERRI field. */
392 #define BR_RNG_SR_ERRI(x) (BITBAND_ACCESS32(HW_RNG_SR_ADDR(x), BP_RNG_SR_ERRI))
396 * @name Register RNG_SR, field SLP[4] (RO)
398 * Specifies whether RNGA is in Sleep or Normal mode. You can also enter Sleep
399 * mode by asserting the DOZE signal.
403 * - 1 - Sleep (low-power) mode
406 #define BP_RNG_SR_SLP (4U) /*!< Bit position for RNG_SR_SLP. */
407 #define BM_RNG_SR_SLP (0x00000010U) /*!< Bit mask for RNG_SR_SLP. */
408 #define BS_RNG_SR_SLP (1U) /*!< Bit field size in bits for RNG_SR_SLP. */
410 /*! @brief Read current value of the RNG_SR_SLP field. */
411 #define BR_RNG_SR_SLP(x) (BITBAND_ACCESS32(HW_RNG_SR_ADDR(x), BP_RNG_SR_SLP))
415 * @name Register RNG_SR, field OREG_LVL[15:8] (RO)
417 * Indicates the number of random-data words that are in OR[RANDOUT], which
418 * indicates whether OR[RANDOUT] is valid.If you read OR[RANDOUT] when SR[OREG_LVL]
419 * is not 0, then the contents of a random number contained in OR[RANDOUT] are
420 * returned, and RNGA writes 0 to both OR[RANDOUT] and SR[OREG_LVL].
423 * - 0 - No words (empty)
424 * - 1 - One word (valid)
427 #define BP_RNG_SR_OREG_LVL (8U) /*!< Bit position for RNG_SR_OREG_LVL. */
428 #define BM_RNG_SR_OREG_LVL (0x0000FF00U) /*!< Bit mask for RNG_SR_OREG_LVL. */
429 #define BS_RNG_SR_OREG_LVL (8U) /*!< Bit field size in bits for RNG_SR_OREG_LVL. */
431 /*! @brief Read current value of the RNG_SR_OREG_LVL field. */
432 #define BR_RNG_SR_OREG_LVL(x) (HW_RNG_SR(x).B.OREG_LVL)
436 * @name Register RNG_SR, field OREG_SIZE[23:16] (RO)
438 * Indicates the size of the Output (OR) register in terms of the number of
439 * 32-bit random-data words it can hold.
442 * - 1 - One word (this value is fixed)
445 #define BP_RNG_SR_OREG_SIZE (16U) /*!< Bit position for RNG_SR_OREG_SIZE. */
446 #define BM_RNG_SR_OREG_SIZE (0x00FF0000U) /*!< Bit mask for RNG_SR_OREG_SIZE. */
447 #define BS_RNG_SR_OREG_SIZE (8U) /*!< Bit field size in bits for RNG_SR_OREG_SIZE. */
449 /*! @brief Read current value of the RNG_SR_OREG_SIZE field. */
450 #define BR_RNG_SR_OREG_SIZE(x) (HW_RNG_SR(x).B.OREG_SIZE)
453 /*******************************************************************************
454 * HW_RNG_ER - RNGA Entropy Register
455 ******************************************************************************/
458 * @brief HW_RNG_ER - RNGA Entropy Register (WORZ)
460 * Reset value: 0x00000000U
462 * Specifies an entropy value that RNGA uses in addition to its ring oscillators
463 * to seed its pseudorandom algorithm. This is a write-only register; reads
466 typedef union _hw_rng_er
469 struct _hw_rng_er_bitfields
471 uint32_t EXT_ENT
: 32; /*!< [31:0] External Entropy */
476 * @name Constants and macros for entire RNG_ER register
479 #define HW_RNG_ER_ADDR(x) ((x) + 0x8U)
481 #define HW_RNG_ER(x) (*(__O hw_rng_er_t *) HW_RNG_ER_ADDR(x))
482 #define HW_RNG_ER_RD(x) (HW_RNG_ER(x).U)
483 #define HW_RNG_ER_WR(x, v) (HW_RNG_ER(x).U = (v))
487 * Constants & macros for individual RNG_ER bitfields
491 * @name Register RNG_ER, field EXT_ENT[31:0] (WORZ)
493 * Specifies an entropy value that RNGA uses in addition to its ring oscillators
494 * to seed its pseudorandom algorithm.Specifying a value for this field is
495 * optional but recommended. You can write to this field at any time during operation.
498 #define BP_RNG_ER_EXT_ENT (0U) /*!< Bit position for RNG_ER_EXT_ENT. */
499 #define BM_RNG_ER_EXT_ENT (0xFFFFFFFFU) /*!< Bit mask for RNG_ER_EXT_ENT. */
500 #define BS_RNG_ER_EXT_ENT (32U) /*!< Bit field size in bits for RNG_ER_EXT_ENT. */
502 /*! @brief Format value for bitfield RNG_ER_EXT_ENT. */
503 #define BF_RNG_ER_EXT_ENT(v) ((uint32_t)((uint32_t)(v) << BP_RNG_ER_EXT_ENT) & BM_RNG_ER_EXT_ENT)
505 /*! @brief Set the EXT_ENT field to a new value. */
506 #define BW_RNG_ER_EXT_ENT(x, v) (HW_RNG_ER_WR(x, v))
509 /*******************************************************************************
510 * HW_RNG_OR - RNGA Output Register
511 ******************************************************************************/
514 * @brief HW_RNG_OR - RNGA Output Register (RO)
516 * Reset value: 0x00000000U
518 * Stores a random-data word generated by RNGA.
520 typedef union _hw_rng_or
523 struct _hw_rng_or_bitfields
525 uint32_t RANDOUT
: 32; /*!< [31:0] Random Output */
530 * @name Constants and macros for entire RNG_OR register
533 #define HW_RNG_OR_ADDR(x) ((x) + 0xCU)
535 #define HW_RNG_OR(x) (*(__I hw_rng_or_t *) HW_RNG_OR_ADDR(x))
536 #define HW_RNG_OR_RD(x) (HW_RNG_OR(x).U)
540 * Constants & macros for individual RNG_OR bitfields
544 * @name Register RNG_OR, field RANDOUT[31:0] (RO)
546 * Stores a random-data word generated by RNGA. This is a read-only field.Before
547 * reading RANDOUT, be sure it is valid (SR[OREG_LVL]=1).
550 * - 0 - Invalid data (if you read this field when it is 0 and SR[OREG_LVL] is
551 * 0, RNGA then writes 1 to SR[ERRI], SR[ORU], and SR[LRS]; when the error
552 * interrupt is not masked (CR[INTM]=0), RNGA also asserts an error interrupt
553 * request to the interrupt controller).
556 #define BP_RNG_OR_RANDOUT (0U) /*!< Bit position for RNG_OR_RANDOUT. */
557 #define BM_RNG_OR_RANDOUT (0xFFFFFFFFU) /*!< Bit mask for RNG_OR_RANDOUT. */
558 #define BS_RNG_OR_RANDOUT (32U) /*!< Bit field size in bits for RNG_OR_RANDOUT. */
560 /*! @brief Read current value of the RNG_OR_RANDOUT field. */
561 #define BR_RNG_OR_RANDOUT(x) (HW_RNG_OR(x).U)
564 /*******************************************************************************
565 * hw_rng_t - module struct
566 ******************************************************************************/
568 * @brief All RNG module registers.
571 typedef struct _hw_rng
573 __IO hw_rng_cr_t CR
; /*!< [0x0] RNGA Control Register */
574 __I hw_rng_sr_t SR
; /*!< [0x4] RNGA Status Register */
575 __O hw_rng_er_t ER
; /*!< [0x8] RNGA Entropy Register */
576 __I hw_rng_or_t OR
; /*!< [0xC] RNGA Output Register */
580 /*! @brief Macro to access all RNG registers. */
581 /*! @param x RNG module instance base address. */
582 /*! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
583 * use the '&' operator, like <code>&HW_RNG(RNG_BASE)</code>. */
584 #define HW_RNG(x) (*(hw_rng_t *)(x))
586 #endif /* __HW_RNG_REGISTERS_H__ */