]>
git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_MCU_K64F/device/device/MK64F12/MK64F12_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: K64P144M120SF5RM, Rev.2, January 2014
9 ** Version: rev. 2.5, 2014-02-10
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-08-12)
49 ** - rev. 2.0 (2013-10-29)
50 ** Register accessor macros added to the memory map.
51 ** Symbols for Processor Expert memory map compatibility added to the memory map.
52 ** Startup file for gcc has been updated according to CMSIS 3.2.
53 ** System initialization updated.
54 ** MCG - registers updated.
55 ** PORTA, PORTB, PORTC, PORTE - registers for digital filter removed.
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-09)
59 ** DMA - EARS register removed.
60 ** AIPS0, AIPS1 - MPRA register updated.
61 ** - rev. 2.3 (2014-01-24)
62 ** Update according to reference manual rev. 2
63 ** ENET, MCG, MCM, SIM, USB - registers updated
64 ** - rev. 2.4 (2014-02-10)
65 ** The declaration of clock configurations has been moved to separate header file system_MK64F12.h
66 ** Update of SystemInit() and SystemCoreClockUpdate() functions.
67 ** - rev. 2.5 (2014-02-10)
68 ** The declaration of clock configurations has been moved to separate header file system_MK64F12.h
69 ** Update of SystemInit() and SystemCoreClockUpdate() functions.
70 ** Module access macro module_BASES replaced by module_BASE_PTRS.
72 ** ###################################################################
76 * WARNING! DO NOT EDIT THIS FILE DIRECTLY!
78 * This file was generated automatically and any changes may be lost.
80 #ifndef __HW_RNG_REGISTERS_H__
81 #define __HW_RNG_REGISTERS_H__
84 #include "fsl_bitaccess.h"
89 * Random Number Generator Accelerator
91 * Registers defined in this header file:
92 * - HW_RNG_CR - RNGA Control Register
93 * - HW_RNG_SR - RNGA Status Register
94 * - HW_RNG_ER - RNGA Entropy Register
95 * - HW_RNG_OR - RNGA Output Register
97 * - hw_rng_t - Struct containing all module registers.
100 #define HW_RNG_INSTANCE_COUNT (1U) /*!< Number of instances of the RNG module. */
102 /*******************************************************************************
103 * HW_RNG_CR - RNGA Control Register
104 ******************************************************************************/
107 * @brief HW_RNG_CR - RNGA Control Register (RW)
109 * Reset value: 0x00000000U
111 * Controls the operation of RNGA.
113 typedef union _hw_rng_cr
116 struct _hw_rng_cr_bitfields
118 uint32_t GO
: 1; /*!< [0] Go */
119 uint32_t HA
: 1; /*!< [1] High Assurance */
120 uint32_t INTM
: 1; /*!< [2] Interrupt Mask */
121 uint32_t CLRI
: 1; /*!< [3] Clear Interrupt */
122 uint32_t SLP
: 1; /*!< [4] Sleep */
123 uint32_t RESERVED0
: 27; /*!< [31:5] */
128 * @name Constants and macros for entire RNG_CR register
131 #define HW_RNG_CR_ADDR(x) ((x) + 0x0U)
133 #define HW_RNG_CR(x) (*(__IO hw_rng_cr_t *) HW_RNG_CR_ADDR(x))
134 #define HW_RNG_CR_RD(x) (HW_RNG_CR(x).U)
135 #define HW_RNG_CR_WR(x, v) (HW_RNG_CR(x).U = (v))
136 #define HW_RNG_CR_SET(x, v) (HW_RNG_CR_WR(x, HW_RNG_CR_RD(x) | (v)))
137 #define HW_RNG_CR_CLR(x, v) (HW_RNG_CR_WR(x, HW_RNG_CR_RD(x) & ~(v)))
138 #define HW_RNG_CR_TOG(x, v) (HW_RNG_CR_WR(x, HW_RNG_CR_RD(x) ^ (v)))
142 * Constants & macros for individual RNG_CR bitfields
146 * @name Register RNG_CR, field GO[0] (RW)
148 * Specifies whether random-data generation and loading (into OR[RANDOUT]) is
149 * enabled.This field is sticky. You must reset RNGA to stop RNGA from loading
150 * OR[RANDOUT] with data.
157 #define BP_RNG_CR_GO (0U) /*!< Bit position for RNG_CR_GO. */
158 #define BM_RNG_CR_GO (0x00000001U) /*!< Bit mask for RNG_CR_GO. */
159 #define BS_RNG_CR_GO (1U) /*!< Bit field size in bits for RNG_CR_GO. */
161 /*! @brief Read current value of the RNG_CR_GO field. */
162 #define BR_RNG_CR_GO(x) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_GO))
164 /*! @brief Format value for bitfield RNG_CR_GO. */
165 #define BF_RNG_CR_GO(v) ((uint32_t)((uint32_t)(v) << BP_RNG_CR_GO) & BM_RNG_CR_GO)
167 /*! @brief Set the GO field to a new value. */
168 #define BW_RNG_CR_GO(x, v) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_GO) = (v))
172 * @name Register RNG_CR, field HA[1] (RW)
174 * Enables notification of security violations (via SR[SECV]). A security
175 * violation occurs when you read OR[RANDOUT] and SR[OREG_LVL]=0. This field is sticky.
176 * After enabling notification of security violations, you must reset RNGA to
177 * disable them again.
184 #define BP_RNG_CR_HA (1U) /*!< Bit position for RNG_CR_HA. */
185 #define BM_RNG_CR_HA (0x00000002U) /*!< Bit mask for RNG_CR_HA. */
186 #define BS_RNG_CR_HA (1U) /*!< Bit field size in bits for RNG_CR_HA. */
188 /*! @brief Read current value of the RNG_CR_HA field. */
189 #define BR_RNG_CR_HA(x) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_HA))
191 /*! @brief Format value for bitfield RNG_CR_HA. */
192 #define BF_RNG_CR_HA(v) ((uint32_t)((uint32_t)(v) << BP_RNG_CR_HA) & BM_RNG_CR_HA)
194 /*! @brief Set the HA field to a new value. */
195 #define BW_RNG_CR_HA(x, v) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_HA) = (v))
199 * @name Register RNG_CR, field INTM[2] (RW)
201 * Masks the triggering of an error interrupt to the interrupt controller when
202 * an OR underflow condition occurs. An OR underflow condition occurs when you
203 * read OR[RANDOUT] and SR[OREG_LVL]=0. See the Output Register (OR) description.
210 #define BP_RNG_CR_INTM (2U) /*!< Bit position for RNG_CR_INTM. */
211 #define BM_RNG_CR_INTM (0x00000004U) /*!< Bit mask for RNG_CR_INTM. */
212 #define BS_RNG_CR_INTM (1U) /*!< Bit field size in bits for RNG_CR_INTM. */
214 /*! @brief Read current value of the RNG_CR_INTM field. */
215 #define BR_RNG_CR_INTM(x) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_INTM))
217 /*! @brief Format value for bitfield RNG_CR_INTM. */
218 #define BF_RNG_CR_INTM(v) ((uint32_t)((uint32_t)(v) << BP_RNG_CR_INTM) & BM_RNG_CR_INTM)
220 /*! @brief Set the INTM field to a new value. */
221 #define BW_RNG_CR_INTM(x, v) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_INTM) = (v))
225 * @name Register RNG_CR, field CLRI[3] (WORZ)
227 * Clears the interrupt by resetting the error-interrupt indicator (SR[ERRI]).
230 * - 0 - Do not clear the interrupt.
231 * - 1 - Clear the interrupt. When you write 1 to this field, RNGA then resets
232 * the error-interrupt indicator (SR[ERRI]). This bit always reads as 0.
235 #define BP_RNG_CR_CLRI (3U) /*!< Bit position for RNG_CR_CLRI. */
236 #define BM_RNG_CR_CLRI (0x00000008U) /*!< Bit mask for RNG_CR_CLRI. */
237 #define BS_RNG_CR_CLRI (1U) /*!< Bit field size in bits for RNG_CR_CLRI. */
239 /*! @brief Format value for bitfield RNG_CR_CLRI. */
240 #define BF_RNG_CR_CLRI(v) ((uint32_t)((uint32_t)(v) << BP_RNG_CR_CLRI) & BM_RNG_CR_CLRI)
242 /*! @brief Set the CLRI field to a new value. */
243 #define BW_RNG_CR_CLRI(x, v) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_CLRI) = (v))
247 * @name Register RNG_CR, field SLP[4] (RW)
249 * Specifies whether RNGA is in Sleep or Normal mode. You can also enter Sleep
250 * mode by asserting the DOZE signal.
254 * - 1 - Sleep (low-power) mode
257 #define BP_RNG_CR_SLP (4U) /*!< Bit position for RNG_CR_SLP. */
258 #define BM_RNG_CR_SLP (0x00000010U) /*!< Bit mask for RNG_CR_SLP. */
259 #define BS_RNG_CR_SLP (1U) /*!< Bit field size in bits for RNG_CR_SLP. */
261 /*! @brief Read current value of the RNG_CR_SLP field. */
262 #define BR_RNG_CR_SLP(x) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_SLP))
264 /*! @brief Format value for bitfield RNG_CR_SLP. */
265 #define BF_RNG_CR_SLP(v) ((uint32_t)((uint32_t)(v) << BP_RNG_CR_SLP) & BM_RNG_CR_SLP)
267 /*! @brief Set the SLP field to a new value. */
268 #define BW_RNG_CR_SLP(x, v) (BITBAND_ACCESS32(HW_RNG_CR_ADDR(x), BP_RNG_CR_SLP) = (v))
271 /*******************************************************************************
272 * HW_RNG_SR - RNGA Status Register
273 ******************************************************************************/
276 * @brief HW_RNG_SR - RNGA Status Register (RO)
278 * Reset value: 0x00010000U
280 * Indicates the status of RNGA. This register is read-only.
282 typedef union _hw_rng_sr
285 struct _hw_rng_sr_bitfields
287 uint32_t SECV
: 1; /*!< [0] Security Violation */
288 uint32_t LRS
: 1; /*!< [1] Last Read Status */
289 uint32_t ORU
: 1; /*!< [2] Output Register Underflow */
290 uint32_t ERRI
: 1; /*!< [3] Error Interrupt */
291 uint32_t SLP
: 1; /*!< [4] Sleep */
292 uint32_t RESERVED0
: 3; /*!< [7:5] */
293 uint32_t OREG_LVL
: 8; /*!< [15:8] Output Register Level */
294 uint32_t OREG_SIZE
: 8; /*!< [23:16] Output Register Size */
295 uint32_t RESERVED1
: 8; /*!< [31:24] */
300 * @name Constants and macros for entire RNG_SR register
303 #define HW_RNG_SR_ADDR(x) ((x) + 0x4U)
305 #define HW_RNG_SR(x) (*(__I hw_rng_sr_t *) HW_RNG_SR_ADDR(x))
306 #define HW_RNG_SR_RD(x) (HW_RNG_SR(x).U)
310 * Constants & macros for individual RNG_SR bitfields
314 * @name Register RNG_SR, field SECV[0] (RO)
316 * Used only when high assurance is enabled (CR[HA]). Indicates that a security
317 * violation has occurred.This field is sticky. To clear SR[SECV], you must reset
321 * - 0 - No security violation
322 * - 1 - Security violation
325 #define BP_RNG_SR_SECV (0U) /*!< Bit position for RNG_SR_SECV. */
326 #define BM_RNG_SR_SECV (0x00000001U) /*!< Bit mask for RNG_SR_SECV. */
327 #define BS_RNG_SR_SECV (1U) /*!< Bit field size in bits for RNG_SR_SECV. */
329 /*! @brief Read current value of the RNG_SR_SECV field. */
330 #define BR_RNG_SR_SECV(x) (BITBAND_ACCESS32(HW_RNG_SR_ADDR(x), BP_RNG_SR_SECV))
334 * @name Register RNG_SR, field LRS[1] (RO)
336 * Indicates whether the most recent read of OR[RANDOUT] caused an OR underflow
337 * condition, regardless of whether the error interrupt is masked (CR[INTM]). An
338 * OR underflow condition occurs when you read OR[RANDOUT] and SR[OREG_LVL]=0.
339 * After you read this register, RNGA writes 0 to this field.
346 #define BP_RNG_SR_LRS (1U) /*!< Bit position for RNG_SR_LRS. */
347 #define BM_RNG_SR_LRS (0x00000002U) /*!< Bit mask for RNG_SR_LRS. */
348 #define BS_RNG_SR_LRS (1U) /*!< Bit field size in bits for RNG_SR_LRS. */
350 /*! @brief Read current value of the RNG_SR_LRS field. */
351 #define BR_RNG_SR_LRS(x) (BITBAND_ACCESS32(HW_RNG_SR_ADDR(x), BP_RNG_SR_LRS))
355 * @name Register RNG_SR, field ORU[2] (RO)
357 * Indicates whether an OR underflow condition has occurred since you last read
358 * this register (SR) or RNGA was reset, regardless of whether the error
359 * interrupt is masked (CR[INTM]). An OR underflow condition occurs when you read
360 * OR[RANDOUT] and SR[OREG_LVL]=0. After you read this register, RNGA writes 0 to this
368 #define BP_RNG_SR_ORU (2U) /*!< Bit position for RNG_SR_ORU. */
369 #define BM_RNG_SR_ORU (0x00000004U) /*!< Bit mask for RNG_SR_ORU. */
370 #define BS_RNG_SR_ORU (1U) /*!< Bit field size in bits for RNG_SR_ORU. */
372 /*! @brief Read current value of the RNG_SR_ORU field. */
373 #define BR_RNG_SR_ORU(x) (BITBAND_ACCESS32(HW_RNG_SR_ADDR(x), BP_RNG_SR_ORU))
377 * @name Register RNG_SR, field ERRI[3] (RO)
379 * Indicates whether an OR underflow condition has occurred since you last
380 * cleared the error interrupt (CR[CLRI]) or RNGA was reset, regardless of whether the
381 * error interrupt is masked (CR[INTM]). An OR underflow condition occurs when
382 * you read OR[RANDOUT] and SR[OREG_LVL]=0. After you reset the error-interrupt
383 * indicator (via CR[CLRI]), RNGA writes 0 to this field.
390 #define BP_RNG_SR_ERRI (3U) /*!< Bit position for RNG_SR_ERRI. */
391 #define BM_RNG_SR_ERRI (0x00000008U) /*!< Bit mask for RNG_SR_ERRI. */
392 #define BS_RNG_SR_ERRI (1U) /*!< Bit field size in bits for RNG_SR_ERRI. */
394 /*! @brief Read current value of the RNG_SR_ERRI field. */
395 #define BR_RNG_SR_ERRI(x) (BITBAND_ACCESS32(HW_RNG_SR_ADDR(x), BP_RNG_SR_ERRI))
399 * @name Register RNG_SR, field SLP[4] (RO)
401 * Specifies whether RNGA is in Sleep or Normal mode. You can also enter Sleep
402 * mode by asserting the DOZE signal.
406 * - 1 - Sleep (low-power) mode
409 #define BP_RNG_SR_SLP (4U) /*!< Bit position for RNG_SR_SLP. */
410 #define BM_RNG_SR_SLP (0x00000010U) /*!< Bit mask for RNG_SR_SLP. */
411 #define BS_RNG_SR_SLP (1U) /*!< Bit field size in bits for RNG_SR_SLP. */
413 /*! @brief Read current value of the RNG_SR_SLP field. */
414 #define BR_RNG_SR_SLP(x) (BITBAND_ACCESS32(HW_RNG_SR_ADDR(x), BP_RNG_SR_SLP))
418 * @name Register RNG_SR, field OREG_LVL[15:8] (RO)
420 * Indicates the number of random-data words that are in OR[RANDOUT], which
421 * indicates whether OR[RANDOUT] is valid.If you read OR[RANDOUT] when SR[OREG_LVL]
422 * is not 0, then the contents of a random number contained in OR[RANDOUT] are
423 * returned, and RNGA writes 0 to both OR[RANDOUT] and SR[OREG_LVL].
426 * - 0 - No words (empty)
427 * - 1 - One word (valid)
430 #define BP_RNG_SR_OREG_LVL (8U) /*!< Bit position for RNG_SR_OREG_LVL. */
431 #define BM_RNG_SR_OREG_LVL (0x0000FF00U) /*!< Bit mask for RNG_SR_OREG_LVL. */
432 #define BS_RNG_SR_OREG_LVL (8U) /*!< Bit field size in bits for RNG_SR_OREG_LVL. */
434 /*! @brief Read current value of the RNG_SR_OREG_LVL field. */
435 #define BR_RNG_SR_OREG_LVL(x) (HW_RNG_SR(x).B.OREG_LVL)
439 * @name Register RNG_SR, field OREG_SIZE[23:16] (RO)
441 * Indicates the size of the Output (OR) register in terms of the number of
442 * 32-bit random-data words it can hold.
445 * - 1 - One word (this value is fixed)
448 #define BP_RNG_SR_OREG_SIZE (16U) /*!< Bit position for RNG_SR_OREG_SIZE. */
449 #define BM_RNG_SR_OREG_SIZE (0x00FF0000U) /*!< Bit mask for RNG_SR_OREG_SIZE. */
450 #define BS_RNG_SR_OREG_SIZE (8U) /*!< Bit field size in bits for RNG_SR_OREG_SIZE. */
452 /*! @brief Read current value of the RNG_SR_OREG_SIZE field. */
453 #define BR_RNG_SR_OREG_SIZE(x) (HW_RNG_SR(x).B.OREG_SIZE)
456 /*******************************************************************************
457 * HW_RNG_ER - RNGA Entropy Register
458 ******************************************************************************/
461 * @brief HW_RNG_ER - RNGA Entropy Register (WORZ)
463 * Reset value: 0x00000000U
465 * Specifies an entropy value that RNGA uses in addition to its ring oscillators
466 * to seed its pseudorandom algorithm. This is a write-only register; reads
469 typedef union _hw_rng_er
472 struct _hw_rng_er_bitfields
474 uint32_t EXT_ENT
: 32; /*!< [31:0] External Entropy */
479 * @name Constants and macros for entire RNG_ER register
482 #define HW_RNG_ER_ADDR(x) ((x) + 0x8U)
484 #define HW_RNG_ER(x) (*(__O hw_rng_er_t *) HW_RNG_ER_ADDR(x))
485 #define HW_RNG_ER_RD(x) (HW_RNG_ER(x).U)
486 #define HW_RNG_ER_WR(x, v) (HW_RNG_ER(x).U = (v))
490 * Constants & macros for individual RNG_ER bitfields
494 * @name Register RNG_ER, field EXT_ENT[31:0] (WORZ)
496 * Specifies an entropy value that RNGA uses in addition to its ring oscillators
497 * to seed its pseudorandom algorithm.Specifying a value for this field is
498 * optional but recommended. You can write to this field at any time during operation.
501 #define BP_RNG_ER_EXT_ENT (0U) /*!< Bit position for RNG_ER_EXT_ENT. */
502 #define BM_RNG_ER_EXT_ENT (0xFFFFFFFFU) /*!< Bit mask for RNG_ER_EXT_ENT. */
503 #define BS_RNG_ER_EXT_ENT (32U) /*!< Bit field size in bits for RNG_ER_EXT_ENT. */
505 /*! @brief Format value for bitfield RNG_ER_EXT_ENT. */
506 #define BF_RNG_ER_EXT_ENT(v) ((uint32_t)((uint32_t)(v) << BP_RNG_ER_EXT_ENT) & BM_RNG_ER_EXT_ENT)
508 /*! @brief Set the EXT_ENT field to a new value. */
509 #define BW_RNG_ER_EXT_ENT(x, v) (HW_RNG_ER_WR(x, v))
512 /*******************************************************************************
513 * HW_RNG_OR - RNGA Output Register
514 ******************************************************************************/
517 * @brief HW_RNG_OR - RNGA Output Register (RO)
519 * Reset value: 0x00000000U
521 * Stores a random-data word generated by RNGA.
523 typedef union _hw_rng_or
526 struct _hw_rng_or_bitfields
528 uint32_t RANDOUT
: 32; /*!< [31:0] Random Output */
533 * @name Constants and macros for entire RNG_OR register
536 #define HW_RNG_OR_ADDR(x) ((x) + 0xCU)
538 #define HW_RNG_OR(x) (*(__I hw_rng_or_t *) HW_RNG_OR_ADDR(x))
539 #define HW_RNG_OR_RD(x) (HW_RNG_OR(x).U)
543 * Constants & macros for individual RNG_OR bitfields
547 * @name Register RNG_OR, field RANDOUT[31:0] (RO)
549 * Stores a random-data word generated by RNGA. This is a read-only field.Before
550 * reading RANDOUT, be sure it is valid (SR[OREG_LVL]=1).
553 * - 0 - Invalid data (if you read this field when it is 0 and SR[OREG_LVL] is
554 * 0, RNGA then writes 1 to SR[ERRI], SR[ORU], and SR[LRS]; when the error
555 * interrupt is not masked (CR[INTM]=0), RNGA also asserts an error interrupt
556 * request to the interrupt controller).
559 #define BP_RNG_OR_RANDOUT (0U) /*!< Bit position for RNG_OR_RANDOUT. */
560 #define BM_RNG_OR_RANDOUT (0xFFFFFFFFU) /*!< Bit mask for RNG_OR_RANDOUT. */
561 #define BS_RNG_OR_RANDOUT (32U) /*!< Bit field size in bits for RNG_OR_RANDOUT. */
563 /*! @brief Read current value of the RNG_OR_RANDOUT field. */
564 #define BR_RNG_OR_RANDOUT(x) (HW_RNG_OR(x).U)
567 /*******************************************************************************
568 * hw_rng_t - module struct
569 ******************************************************************************/
571 * @brief All RNG module registers.
574 typedef struct _hw_rng
576 __IO hw_rng_cr_t CR
; /*!< [0x0] RNGA Control Register */
577 __I hw_rng_sr_t SR
; /*!< [0x4] RNGA Status Register */
578 __O hw_rng_er_t ER
; /*!< [0x8] RNGA Entropy Register */
579 __I hw_rng_or_t OR
; /*!< [0xC] RNGA Output Register */
583 /*! @brief Macro to access all RNG registers. */
584 /*! @param x RNG module instance base address. */
585 /*! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
586 * use the '&' operator, like <code>&HW_RNG(RNG_BASE)</code>. */
587 #define HW_RNG(x) (*(hw_rng_t *)(x))
589 #endif /* __HW_RNG_REGISTERS_H__ */