mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Thu Sep 18 14:00:17 2014 +0100
Revision:
324:406fd2029f23
Synchronized with git revision a73f28e6fbca9559fbed2726410eeb4c0534a4a5

Full URL: https://github.com/mbedmicro/mbed/commit/a73f28e6fbca9559fbed2726410eeb4c0534a4a5/

Extended #476, which does not break ethernet for K64F

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 324:406fd2029f23 1 /*
mbed_official 324:406fd2029f23 2 ** ###################################################################
mbed_official 324:406fd2029f23 3 ** Compilers: Keil ARM C/C++ Compiler
mbed_official 324:406fd2029f23 4 ** Freescale C/C++ for Embedded ARM
mbed_official 324:406fd2029f23 5 ** GNU C Compiler
mbed_official 324:406fd2029f23 6 ** IAR ANSI C/C++ Compiler for ARM
mbed_official 324:406fd2029f23 7 **
mbed_official 324:406fd2029f23 8 ** Reference manual: K22P121M120SF7RM, Rev. 1, March 24, 2014
mbed_official 324:406fd2029f23 9 ** Version: rev. 2.5, 2014-05-06
mbed_official 324:406fd2029f23 10 ** Build: b140604
mbed_official 324:406fd2029f23 11 **
mbed_official 324:406fd2029f23 12 ** Abstract:
mbed_official 324:406fd2029f23 13 ** Extension to the CMSIS register access layer header.
mbed_official 324:406fd2029f23 14 **
mbed_official 324:406fd2029f23 15 ** Copyright (c) 2014 Freescale Semiconductor, Inc.
mbed_official 324:406fd2029f23 16 ** All rights reserved.
mbed_official 324:406fd2029f23 17 **
mbed_official 324:406fd2029f23 18 ** Redistribution and use in source and binary forms, with or without modification,
mbed_official 324:406fd2029f23 19 ** are permitted provided that the following conditions are met:
mbed_official 324:406fd2029f23 20 **
mbed_official 324:406fd2029f23 21 ** o Redistributions of source code must retain the above copyright notice, this list
mbed_official 324:406fd2029f23 22 ** of conditions and the following disclaimer.
mbed_official 324:406fd2029f23 23 **
mbed_official 324:406fd2029f23 24 ** o Redistributions in binary form must reproduce the above copyright notice, this
mbed_official 324:406fd2029f23 25 ** list of conditions and the following disclaimer in the documentation and/or
mbed_official 324:406fd2029f23 26 ** other materials provided with the distribution.
mbed_official 324:406fd2029f23 27 **
mbed_official 324:406fd2029f23 28 ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its
mbed_official 324:406fd2029f23 29 ** contributors may be used to endorse or promote products derived from this
mbed_official 324:406fd2029f23 30 ** software without specific prior written permission.
mbed_official 324:406fd2029f23 31 **
mbed_official 324:406fd2029f23 32 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
mbed_official 324:406fd2029f23 33 ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
mbed_official 324:406fd2029f23 34 ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 324:406fd2029f23 35 ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
mbed_official 324:406fd2029f23 36 ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
mbed_official 324:406fd2029f23 37 ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
mbed_official 324:406fd2029f23 38 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
mbed_official 324:406fd2029f23 39 ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
mbed_official 324:406fd2029f23 40 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
mbed_official 324:406fd2029f23 41 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 324:406fd2029f23 42 **
mbed_official 324:406fd2029f23 43 ** http: www.freescale.com
mbed_official 324:406fd2029f23 44 ** mail: support@freescale.com
mbed_official 324:406fd2029f23 45 **
mbed_official 324:406fd2029f23 46 ** Revisions:
mbed_official 324:406fd2029f23 47 ** - rev. 1.0 (2013-07-23)
mbed_official 324:406fd2029f23 48 ** Initial version.
mbed_official 324:406fd2029f23 49 ** - rev. 1.1 (2013-09-17)
mbed_official 324:406fd2029f23 50 ** RM rev. 0.4 update.
mbed_official 324:406fd2029f23 51 ** - rev. 2.0 (2013-10-29)
mbed_official 324:406fd2029f23 52 ** Register accessor macros added to the memory map.
mbed_official 324:406fd2029f23 53 ** Symbols for Processor Expert memory map compatibility added to the memory map.
mbed_official 324:406fd2029f23 54 ** Startup file for gcc has been updated according to CMSIS 3.2.
mbed_official 324:406fd2029f23 55 ** System initialization updated.
mbed_official 324:406fd2029f23 56 ** - rev. 2.1 (2013-10-30)
mbed_official 324:406fd2029f23 57 ** Definition of BITBAND macros updated to support peripherals with 32-bit acces disabled.
mbed_official 324:406fd2029f23 58 ** - rev. 2.2 (2013-12-20)
mbed_official 324:406fd2029f23 59 ** Update according to reference manual rev. 0.6,
mbed_official 324:406fd2029f23 60 ** - rev. 2.3 (2014-01-13)
mbed_official 324:406fd2029f23 61 ** Update according to reference manual rev. 0.61,
mbed_official 324:406fd2029f23 62 ** - rev. 2.4 (2014-02-10)
mbed_official 324:406fd2029f23 63 ** The declaration of clock configurations has been moved to separate header file system_MK22F51212.h
mbed_official 324:406fd2029f23 64 ** - rev. 2.5 (2014-05-06)
mbed_official 324:406fd2029f23 65 ** Update according to reference manual rev. 1.0,
mbed_official 324:406fd2029f23 66 ** Update of system and startup files.
mbed_official 324:406fd2029f23 67 ** Module access macro module_BASES replaced by module_BASE_PTRS.
mbed_official 324:406fd2029f23 68 **
mbed_official 324:406fd2029f23 69 ** ###################################################################
mbed_official 324:406fd2029f23 70 */
mbed_official 324:406fd2029f23 71
mbed_official 324:406fd2029f23 72 /*
mbed_official 324:406fd2029f23 73 * WARNING! DO NOT EDIT THIS FILE DIRECTLY!
mbed_official 324:406fd2029f23 74 *
mbed_official 324:406fd2029f23 75 * This file was generated automatically and any changes may be lost.
mbed_official 324:406fd2029f23 76 */
mbed_official 324:406fd2029f23 77 #ifndef __HW_CRC_REGISTERS_H__
mbed_official 324:406fd2029f23 78 #define __HW_CRC_REGISTERS_H__
mbed_official 324:406fd2029f23 79
mbed_official 324:406fd2029f23 80 #include "MK22F51212.h"
mbed_official 324:406fd2029f23 81 #include "fsl_bitaccess.h"
mbed_official 324:406fd2029f23 82
mbed_official 324:406fd2029f23 83 /*
mbed_official 324:406fd2029f23 84 * MK22F51212 CRC
mbed_official 324:406fd2029f23 85 *
mbed_official 324:406fd2029f23 86 * Cyclic Redundancy Check
mbed_official 324:406fd2029f23 87 *
mbed_official 324:406fd2029f23 88 * Registers defined in this header file:
mbed_official 324:406fd2029f23 89 * - HW_CRC_DATAL - CRC_DATAL register.
mbed_official 324:406fd2029f23 90 * - HW_CRC_DATAH - CRC_DATAH register.
mbed_official 324:406fd2029f23 91 * - HW_CRC_DATALL - CRC_DATALL register.
mbed_official 324:406fd2029f23 92 * - HW_CRC_DATALU - CRC_DATALU register.
mbed_official 324:406fd2029f23 93 * - HW_CRC_DATAHL - CRC_DATAHL register.
mbed_official 324:406fd2029f23 94 * - HW_CRC_DATAHU - CRC_DATAHU register.
mbed_official 324:406fd2029f23 95 * - HW_CRC_DATA - CRC Data register
mbed_official 324:406fd2029f23 96 * - HW_CRC_GPOLY - CRC Polynomial register
mbed_official 324:406fd2029f23 97 * - HW_CRC_GPOLYL - CRC_GPOLYL register.
mbed_official 324:406fd2029f23 98 * - HW_CRC_GPOLYH - CRC_GPOLYH register.
mbed_official 324:406fd2029f23 99 * - HW_CRC_GPOLYLL - CRC_GPOLYLL register.
mbed_official 324:406fd2029f23 100 * - HW_CRC_GPOLYLU - CRC_GPOLYLU register.
mbed_official 324:406fd2029f23 101 * - HW_CRC_GPOLYHL - CRC_GPOLYHL register.
mbed_official 324:406fd2029f23 102 * - HW_CRC_GPOLYHU - CRC_GPOLYHU register.
mbed_official 324:406fd2029f23 103 * - HW_CRC_CTRL - CRC Control register
mbed_official 324:406fd2029f23 104 * - HW_CRC_CTRLHU - CRC_CTRLHU register.
mbed_official 324:406fd2029f23 105 *
mbed_official 324:406fd2029f23 106 * - hw_crc_t - Struct containing all module registers.
mbed_official 324:406fd2029f23 107 */
mbed_official 324:406fd2029f23 108
mbed_official 324:406fd2029f23 109 #define HW_CRC_INSTANCE_COUNT (1U) /*!< Number of instances of the CRC module. */
mbed_official 324:406fd2029f23 110
mbed_official 324:406fd2029f23 111 /*******************************************************************************
mbed_official 324:406fd2029f23 112 * HW_CRC_DATAL - CRC_DATAL register.
mbed_official 324:406fd2029f23 113 ******************************************************************************/
mbed_official 324:406fd2029f23 114
mbed_official 324:406fd2029f23 115 /*!
mbed_official 324:406fd2029f23 116 * @brief HW_CRC_DATAL - CRC_DATAL register. (RW)
mbed_official 324:406fd2029f23 117 *
mbed_official 324:406fd2029f23 118 * Reset value: 0xFFFFU
mbed_official 324:406fd2029f23 119 */
mbed_official 324:406fd2029f23 120 typedef union _hw_crc_datal
mbed_official 324:406fd2029f23 121 {
mbed_official 324:406fd2029f23 122 uint16_t U;
mbed_official 324:406fd2029f23 123 struct _hw_crc_datal_bitfields
mbed_official 324:406fd2029f23 124 {
mbed_official 324:406fd2029f23 125 uint16_t DATAL : 16; /*!< [15:0] DATAL stores the lower 16 bits of
mbed_official 324:406fd2029f23 126 * the 16/32 bit CRC */
mbed_official 324:406fd2029f23 127 } B;
mbed_official 324:406fd2029f23 128 } hw_crc_datal_t;
mbed_official 324:406fd2029f23 129
mbed_official 324:406fd2029f23 130 /*!
mbed_official 324:406fd2029f23 131 * @name Constants and macros for entire CRC_DATAL register
mbed_official 324:406fd2029f23 132 */
mbed_official 324:406fd2029f23 133 /*@{*/
mbed_official 324:406fd2029f23 134 #define HW_CRC_DATAL_ADDR(x) ((x) + 0x0U)
mbed_official 324:406fd2029f23 135
mbed_official 324:406fd2029f23 136 #define HW_CRC_DATAL(x) (*(__IO hw_crc_datal_t *) HW_CRC_DATAL_ADDR(x))
mbed_official 324:406fd2029f23 137 #define HW_CRC_DATAL_RD(x) (HW_CRC_DATAL(x).U)
mbed_official 324:406fd2029f23 138 #define HW_CRC_DATAL_WR(x, v) (HW_CRC_DATAL(x).U = (v))
mbed_official 324:406fd2029f23 139 #define HW_CRC_DATAL_SET(x, v) (HW_CRC_DATAL_WR(x, HW_CRC_DATAL_RD(x) | (v)))
mbed_official 324:406fd2029f23 140 #define HW_CRC_DATAL_CLR(x, v) (HW_CRC_DATAL_WR(x, HW_CRC_DATAL_RD(x) & ~(v)))
mbed_official 324:406fd2029f23 141 #define HW_CRC_DATAL_TOG(x, v) (HW_CRC_DATAL_WR(x, HW_CRC_DATAL_RD(x) ^ (v)))
mbed_official 324:406fd2029f23 142 /*@}*/
mbed_official 324:406fd2029f23 143
mbed_official 324:406fd2029f23 144 /*
mbed_official 324:406fd2029f23 145 * Constants & macros for individual CRC_DATAL bitfields
mbed_official 324:406fd2029f23 146 */
mbed_official 324:406fd2029f23 147
mbed_official 324:406fd2029f23 148 /*!
mbed_official 324:406fd2029f23 149 * @name Register CRC_DATAL, field DATAL[15:0] (RW)
mbed_official 324:406fd2029f23 150 */
mbed_official 324:406fd2029f23 151 /*@{*/
mbed_official 324:406fd2029f23 152 #define BP_CRC_DATAL_DATAL (0U) /*!< Bit position for CRC_DATAL_DATAL. */
mbed_official 324:406fd2029f23 153 #define BM_CRC_DATAL_DATAL (0xFFFFU) /*!< Bit mask for CRC_DATAL_DATAL. */
mbed_official 324:406fd2029f23 154 #define BS_CRC_DATAL_DATAL (16U) /*!< Bit field size in bits for CRC_DATAL_DATAL. */
mbed_official 324:406fd2029f23 155
mbed_official 324:406fd2029f23 156 /*! @brief Read current value of the CRC_DATAL_DATAL field. */
mbed_official 324:406fd2029f23 157 #define BR_CRC_DATAL_DATAL(x) (HW_CRC_DATAL(x).U)
mbed_official 324:406fd2029f23 158
mbed_official 324:406fd2029f23 159 /*! @brief Format value for bitfield CRC_DATAL_DATAL. */
mbed_official 324:406fd2029f23 160 #define BF_CRC_DATAL_DATAL(v) ((uint16_t)((uint16_t)(v) << BP_CRC_DATAL_DATAL) & BM_CRC_DATAL_DATAL)
mbed_official 324:406fd2029f23 161
mbed_official 324:406fd2029f23 162 /*! @brief Set the DATAL field to a new value. */
mbed_official 324:406fd2029f23 163 #define BW_CRC_DATAL_DATAL(x, v) (HW_CRC_DATAL_WR(x, v))
mbed_official 324:406fd2029f23 164 /*@}*/
mbed_official 324:406fd2029f23 165 /*******************************************************************************
mbed_official 324:406fd2029f23 166 * HW_CRC_DATAH - CRC_DATAH register.
mbed_official 324:406fd2029f23 167 ******************************************************************************/
mbed_official 324:406fd2029f23 168
mbed_official 324:406fd2029f23 169 /*!
mbed_official 324:406fd2029f23 170 * @brief HW_CRC_DATAH - CRC_DATAH register. (RW)
mbed_official 324:406fd2029f23 171 *
mbed_official 324:406fd2029f23 172 * Reset value: 0xFFFFU
mbed_official 324:406fd2029f23 173 */
mbed_official 324:406fd2029f23 174 typedef union _hw_crc_datah
mbed_official 324:406fd2029f23 175 {
mbed_official 324:406fd2029f23 176 uint16_t U;
mbed_official 324:406fd2029f23 177 struct _hw_crc_datah_bitfields
mbed_official 324:406fd2029f23 178 {
mbed_official 324:406fd2029f23 179 uint16_t DATAH : 16; /*!< [15:0] DATAH stores the high 16 bits of the
mbed_official 324:406fd2029f23 180 * 16/32 bit CRC */
mbed_official 324:406fd2029f23 181 } B;
mbed_official 324:406fd2029f23 182 } hw_crc_datah_t;
mbed_official 324:406fd2029f23 183
mbed_official 324:406fd2029f23 184 /*!
mbed_official 324:406fd2029f23 185 * @name Constants and macros for entire CRC_DATAH register
mbed_official 324:406fd2029f23 186 */
mbed_official 324:406fd2029f23 187 /*@{*/
mbed_official 324:406fd2029f23 188 #define HW_CRC_DATAH_ADDR(x) ((x) + 0x2U)
mbed_official 324:406fd2029f23 189
mbed_official 324:406fd2029f23 190 #define HW_CRC_DATAH(x) (*(__IO hw_crc_datah_t *) HW_CRC_DATAH_ADDR(x))
mbed_official 324:406fd2029f23 191 #define HW_CRC_DATAH_RD(x) (HW_CRC_DATAH(x).U)
mbed_official 324:406fd2029f23 192 #define HW_CRC_DATAH_WR(x, v) (HW_CRC_DATAH(x).U = (v))
mbed_official 324:406fd2029f23 193 #define HW_CRC_DATAH_SET(x, v) (HW_CRC_DATAH_WR(x, HW_CRC_DATAH_RD(x) | (v)))
mbed_official 324:406fd2029f23 194 #define HW_CRC_DATAH_CLR(x, v) (HW_CRC_DATAH_WR(x, HW_CRC_DATAH_RD(x) & ~(v)))
mbed_official 324:406fd2029f23 195 #define HW_CRC_DATAH_TOG(x, v) (HW_CRC_DATAH_WR(x, HW_CRC_DATAH_RD(x) ^ (v)))
mbed_official 324:406fd2029f23 196 /*@}*/
mbed_official 324:406fd2029f23 197
mbed_official 324:406fd2029f23 198 /*
mbed_official 324:406fd2029f23 199 * Constants & macros for individual CRC_DATAH bitfields
mbed_official 324:406fd2029f23 200 */
mbed_official 324:406fd2029f23 201
mbed_official 324:406fd2029f23 202 /*!
mbed_official 324:406fd2029f23 203 * @name Register CRC_DATAH, field DATAH[15:0] (RW)
mbed_official 324:406fd2029f23 204 */
mbed_official 324:406fd2029f23 205 /*@{*/
mbed_official 324:406fd2029f23 206 #define BP_CRC_DATAH_DATAH (0U) /*!< Bit position for CRC_DATAH_DATAH. */
mbed_official 324:406fd2029f23 207 #define BM_CRC_DATAH_DATAH (0xFFFFU) /*!< Bit mask for CRC_DATAH_DATAH. */
mbed_official 324:406fd2029f23 208 #define BS_CRC_DATAH_DATAH (16U) /*!< Bit field size in bits for CRC_DATAH_DATAH. */
mbed_official 324:406fd2029f23 209
mbed_official 324:406fd2029f23 210 /*! @brief Read current value of the CRC_DATAH_DATAH field. */
mbed_official 324:406fd2029f23 211 #define BR_CRC_DATAH_DATAH(x) (HW_CRC_DATAH(x).U)
mbed_official 324:406fd2029f23 212
mbed_official 324:406fd2029f23 213 /*! @brief Format value for bitfield CRC_DATAH_DATAH. */
mbed_official 324:406fd2029f23 214 #define BF_CRC_DATAH_DATAH(v) ((uint16_t)((uint16_t)(v) << BP_CRC_DATAH_DATAH) & BM_CRC_DATAH_DATAH)
mbed_official 324:406fd2029f23 215
mbed_official 324:406fd2029f23 216 /*! @brief Set the DATAH field to a new value. */
mbed_official 324:406fd2029f23 217 #define BW_CRC_DATAH_DATAH(x, v) (HW_CRC_DATAH_WR(x, v))
mbed_official 324:406fd2029f23 218 /*@}*/
mbed_official 324:406fd2029f23 219 /*******************************************************************************
mbed_official 324:406fd2029f23 220 * HW_CRC_DATALL - CRC_DATALL register.
mbed_official 324:406fd2029f23 221 ******************************************************************************/
mbed_official 324:406fd2029f23 222
mbed_official 324:406fd2029f23 223 /*!
mbed_official 324:406fd2029f23 224 * @brief HW_CRC_DATALL - CRC_DATALL register. (RW)
mbed_official 324:406fd2029f23 225 *
mbed_official 324:406fd2029f23 226 * Reset value: 0xFFU
mbed_official 324:406fd2029f23 227 */
mbed_official 324:406fd2029f23 228 typedef union _hw_crc_datall
mbed_official 324:406fd2029f23 229 {
mbed_official 324:406fd2029f23 230 uint8_t U;
mbed_official 324:406fd2029f23 231 struct _hw_crc_datall_bitfields
mbed_official 324:406fd2029f23 232 {
mbed_official 324:406fd2029f23 233 uint8_t DATALL : 8; /*!< [7:0] CRCLL stores the first 8 bits of the
mbed_official 324:406fd2029f23 234 * 32 bit DATA */
mbed_official 324:406fd2029f23 235 } B;
mbed_official 324:406fd2029f23 236 } hw_crc_datall_t;
mbed_official 324:406fd2029f23 237
mbed_official 324:406fd2029f23 238 /*!
mbed_official 324:406fd2029f23 239 * @name Constants and macros for entire CRC_DATALL register
mbed_official 324:406fd2029f23 240 */
mbed_official 324:406fd2029f23 241 /*@{*/
mbed_official 324:406fd2029f23 242 #define HW_CRC_DATALL_ADDR(x) ((x) + 0x0U)
mbed_official 324:406fd2029f23 243
mbed_official 324:406fd2029f23 244 #define HW_CRC_DATALL(x) (*(__IO hw_crc_datall_t *) HW_CRC_DATALL_ADDR(x))
mbed_official 324:406fd2029f23 245 #define HW_CRC_DATALL_RD(x) (HW_CRC_DATALL(x).U)
mbed_official 324:406fd2029f23 246 #define HW_CRC_DATALL_WR(x, v) (HW_CRC_DATALL(x).U = (v))
mbed_official 324:406fd2029f23 247 #define HW_CRC_DATALL_SET(x, v) (HW_CRC_DATALL_WR(x, HW_CRC_DATALL_RD(x) | (v)))
mbed_official 324:406fd2029f23 248 #define HW_CRC_DATALL_CLR(x, v) (HW_CRC_DATALL_WR(x, HW_CRC_DATALL_RD(x) & ~(v)))
mbed_official 324:406fd2029f23 249 #define HW_CRC_DATALL_TOG(x, v) (HW_CRC_DATALL_WR(x, HW_CRC_DATALL_RD(x) ^ (v)))
mbed_official 324:406fd2029f23 250 /*@}*/
mbed_official 324:406fd2029f23 251
mbed_official 324:406fd2029f23 252 /*
mbed_official 324:406fd2029f23 253 * Constants & macros for individual CRC_DATALL bitfields
mbed_official 324:406fd2029f23 254 */
mbed_official 324:406fd2029f23 255
mbed_official 324:406fd2029f23 256 /*!
mbed_official 324:406fd2029f23 257 * @name Register CRC_DATALL, field DATALL[7:0] (RW)
mbed_official 324:406fd2029f23 258 */
mbed_official 324:406fd2029f23 259 /*@{*/
mbed_official 324:406fd2029f23 260 #define BP_CRC_DATALL_DATALL (0U) /*!< Bit position for CRC_DATALL_DATALL. */
mbed_official 324:406fd2029f23 261 #define BM_CRC_DATALL_DATALL (0xFFU) /*!< Bit mask for CRC_DATALL_DATALL. */
mbed_official 324:406fd2029f23 262 #define BS_CRC_DATALL_DATALL (8U) /*!< Bit field size in bits for CRC_DATALL_DATALL. */
mbed_official 324:406fd2029f23 263
mbed_official 324:406fd2029f23 264 /*! @brief Read current value of the CRC_DATALL_DATALL field. */
mbed_official 324:406fd2029f23 265 #define BR_CRC_DATALL_DATALL(x) (HW_CRC_DATALL(x).U)
mbed_official 324:406fd2029f23 266
mbed_official 324:406fd2029f23 267 /*! @brief Format value for bitfield CRC_DATALL_DATALL. */
mbed_official 324:406fd2029f23 268 #define BF_CRC_DATALL_DATALL(v) ((uint8_t)((uint8_t)(v) << BP_CRC_DATALL_DATALL) & BM_CRC_DATALL_DATALL)
mbed_official 324:406fd2029f23 269
mbed_official 324:406fd2029f23 270 /*! @brief Set the DATALL field to a new value. */
mbed_official 324:406fd2029f23 271 #define BW_CRC_DATALL_DATALL(x, v) (HW_CRC_DATALL_WR(x, v))
mbed_official 324:406fd2029f23 272 /*@}*/
mbed_official 324:406fd2029f23 273 /*******************************************************************************
mbed_official 324:406fd2029f23 274 * HW_CRC_DATALU - CRC_DATALU register.
mbed_official 324:406fd2029f23 275 ******************************************************************************/
mbed_official 324:406fd2029f23 276
mbed_official 324:406fd2029f23 277 /*!
mbed_official 324:406fd2029f23 278 * @brief HW_CRC_DATALU - CRC_DATALU register. (RW)
mbed_official 324:406fd2029f23 279 *
mbed_official 324:406fd2029f23 280 * Reset value: 0xFFU
mbed_official 324:406fd2029f23 281 */
mbed_official 324:406fd2029f23 282 typedef union _hw_crc_datalu
mbed_official 324:406fd2029f23 283 {
mbed_official 324:406fd2029f23 284 uint8_t U;
mbed_official 324:406fd2029f23 285 struct _hw_crc_datalu_bitfields
mbed_official 324:406fd2029f23 286 {
mbed_official 324:406fd2029f23 287 uint8_t DATALU : 8; /*!< [7:0] DATALL stores the second 8 bits of the
mbed_official 324:406fd2029f23 288 * 32 bit CRC */
mbed_official 324:406fd2029f23 289 } B;
mbed_official 324:406fd2029f23 290 } hw_crc_datalu_t;
mbed_official 324:406fd2029f23 291
mbed_official 324:406fd2029f23 292 /*!
mbed_official 324:406fd2029f23 293 * @name Constants and macros for entire CRC_DATALU register
mbed_official 324:406fd2029f23 294 */
mbed_official 324:406fd2029f23 295 /*@{*/
mbed_official 324:406fd2029f23 296 #define HW_CRC_DATALU_ADDR(x) ((x) + 0x1U)
mbed_official 324:406fd2029f23 297
mbed_official 324:406fd2029f23 298 #define HW_CRC_DATALU(x) (*(__IO hw_crc_datalu_t *) HW_CRC_DATALU_ADDR(x))
mbed_official 324:406fd2029f23 299 #define HW_CRC_DATALU_RD(x) (HW_CRC_DATALU(x).U)
mbed_official 324:406fd2029f23 300 #define HW_CRC_DATALU_WR(x, v) (HW_CRC_DATALU(x).U = (v))
mbed_official 324:406fd2029f23 301 #define HW_CRC_DATALU_SET(x, v) (HW_CRC_DATALU_WR(x, HW_CRC_DATALU_RD(x) | (v)))
mbed_official 324:406fd2029f23 302 #define HW_CRC_DATALU_CLR(x, v) (HW_CRC_DATALU_WR(x, HW_CRC_DATALU_RD(x) & ~(v)))
mbed_official 324:406fd2029f23 303 #define HW_CRC_DATALU_TOG(x, v) (HW_CRC_DATALU_WR(x, HW_CRC_DATALU_RD(x) ^ (v)))
mbed_official 324:406fd2029f23 304 /*@}*/
mbed_official 324:406fd2029f23 305
mbed_official 324:406fd2029f23 306 /*
mbed_official 324:406fd2029f23 307 * Constants & macros for individual CRC_DATALU bitfields
mbed_official 324:406fd2029f23 308 */
mbed_official 324:406fd2029f23 309
mbed_official 324:406fd2029f23 310 /*!
mbed_official 324:406fd2029f23 311 * @name Register CRC_DATALU, field DATALU[7:0] (RW)
mbed_official 324:406fd2029f23 312 */
mbed_official 324:406fd2029f23 313 /*@{*/
mbed_official 324:406fd2029f23 314 #define BP_CRC_DATALU_DATALU (0U) /*!< Bit position for CRC_DATALU_DATALU. */
mbed_official 324:406fd2029f23 315 #define BM_CRC_DATALU_DATALU (0xFFU) /*!< Bit mask for CRC_DATALU_DATALU. */
mbed_official 324:406fd2029f23 316 #define BS_CRC_DATALU_DATALU (8U) /*!< Bit field size in bits for CRC_DATALU_DATALU. */
mbed_official 324:406fd2029f23 317
mbed_official 324:406fd2029f23 318 /*! @brief Read current value of the CRC_DATALU_DATALU field. */
mbed_official 324:406fd2029f23 319 #define BR_CRC_DATALU_DATALU(x) (HW_CRC_DATALU(x).U)
mbed_official 324:406fd2029f23 320
mbed_official 324:406fd2029f23 321 /*! @brief Format value for bitfield CRC_DATALU_DATALU. */
mbed_official 324:406fd2029f23 322 #define BF_CRC_DATALU_DATALU(v) ((uint8_t)((uint8_t)(v) << BP_CRC_DATALU_DATALU) & BM_CRC_DATALU_DATALU)
mbed_official 324:406fd2029f23 323
mbed_official 324:406fd2029f23 324 /*! @brief Set the DATALU field to a new value. */
mbed_official 324:406fd2029f23 325 #define BW_CRC_DATALU_DATALU(x, v) (HW_CRC_DATALU_WR(x, v))
mbed_official 324:406fd2029f23 326 /*@}*/
mbed_official 324:406fd2029f23 327 /*******************************************************************************
mbed_official 324:406fd2029f23 328 * HW_CRC_DATAHL - CRC_DATAHL register.
mbed_official 324:406fd2029f23 329 ******************************************************************************/
mbed_official 324:406fd2029f23 330
mbed_official 324:406fd2029f23 331 /*!
mbed_official 324:406fd2029f23 332 * @brief HW_CRC_DATAHL - CRC_DATAHL register. (RW)
mbed_official 324:406fd2029f23 333 *
mbed_official 324:406fd2029f23 334 * Reset value: 0xFFU
mbed_official 324:406fd2029f23 335 */
mbed_official 324:406fd2029f23 336 typedef union _hw_crc_datahl
mbed_official 324:406fd2029f23 337 {
mbed_official 324:406fd2029f23 338 uint8_t U;
mbed_official 324:406fd2029f23 339 struct _hw_crc_datahl_bitfields
mbed_official 324:406fd2029f23 340 {
mbed_official 324:406fd2029f23 341 uint8_t DATAHL : 8; /*!< [7:0] DATAHL stores the third 8 bits of the
mbed_official 324:406fd2029f23 342 * 32 bit CRC */
mbed_official 324:406fd2029f23 343 } B;
mbed_official 324:406fd2029f23 344 } hw_crc_datahl_t;
mbed_official 324:406fd2029f23 345
mbed_official 324:406fd2029f23 346 /*!
mbed_official 324:406fd2029f23 347 * @name Constants and macros for entire CRC_DATAHL register
mbed_official 324:406fd2029f23 348 */
mbed_official 324:406fd2029f23 349 /*@{*/
mbed_official 324:406fd2029f23 350 #define HW_CRC_DATAHL_ADDR(x) ((x) + 0x2U)
mbed_official 324:406fd2029f23 351
mbed_official 324:406fd2029f23 352 #define HW_CRC_DATAHL(x) (*(__IO hw_crc_datahl_t *) HW_CRC_DATAHL_ADDR(x))
mbed_official 324:406fd2029f23 353 #define HW_CRC_DATAHL_RD(x) (HW_CRC_DATAHL(x).U)
mbed_official 324:406fd2029f23 354 #define HW_CRC_DATAHL_WR(x, v) (HW_CRC_DATAHL(x).U = (v))
mbed_official 324:406fd2029f23 355 #define HW_CRC_DATAHL_SET(x, v) (HW_CRC_DATAHL_WR(x, HW_CRC_DATAHL_RD(x) | (v)))
mbed_official 324:406fd2029f23 356 #define HW_CRC_DATAHL_CLR(x, v) (HW_CRC_DATAHL_WR(x, HW_CRC_DATAHL_RD(x) & ~(v)))
mbed_official 324:406fd2029f23 357 #define HW_CRC_DATAHL_TOG(x, v) (HW_CRC_DATAHL_WR(x, HW_CRC_DATAHL_RD(x) ^ (v)))
mbed_official 324:406fd2029f23 358 /*@}*/
mbed_official 324:406fd2029f23 359
mbed_official 324:406fd2029f23 360 /*
mbed_official 324:406fd2029f23 361 * Constants & macros for individual CRC_DATAHL bitfields
mbed_official 324:406fd2029f23 362 */
mbed_official 324:406fd2029f23 363
mbed_official 324:406fd2029f23 364 /*!
mbed_official 324:406fd2029f23 365 * @name Register CRC_DATAHL, field DATAHL[7:0] (RW)
mbed_official 324:406fd2029f23 366 */
mbed_official 324:406fd2029f23 367 /*@{*/
mbed_official 324:406fd2029f23 368 #define BP_CRC_DATAHL_DATAHL (0U) /*!< Bit position for CRC_DATAHL_DATAHL. */
mbed_official 324:406fd2029f23 369 #define BM_CRC_DATAHL_DATAHL (0xFFU) /*!< Bit mask for CRC_DATAHL_DATAHL. */
mbed_official 324:406fd2029f23 370 #define BS_CRC_DATAHL_DATAHL (8U) /*!< Bit field size in bits for CRC_DATAHL_DATAHL. */
mbed_official 324:406fd2029f23 371
mbed_official 324:406fd2029f23 372 /*! @brief Read current value of the CRC_DATAHL_DATAHL field. */
mbed_official 324:406fd2029f23 373 #define BR_CRC_DATAHL_DATAHL(x) (HW_CRC_DATAHL(x).U)
mbed_official 324:406fd2029f23 374
mbed_official 324:406fd2029f23 375 /*! @brief Format value for bitfield CRC_DATAHL_DATAHL. */
mbed_official 324:406fd2029f23 376 #define BF_CRC_DATAHL_DATAHL(v) ((uint8_t)((uint8_t)(v) << BP_CRC_DATAHL_DATAHL) & BM_CRC_DATAHL_DATAHL)
mbed_official 324:406fd2029f23 377
mbed_official 324:406fd2029f23 378 /*! @brief Set the DATAHL field to a new value. */
mbed_official 324:406fd2029f23 379 #define BW_CRC_DATAHL_DATAHL(x, v) (HW_CRC_DATAHL_WR(x, v))
mbed_official 324:406fd2029f23 380 /*@}*/
mbed_official 324:406fd2029f23 381 /*******************************************************************************
mbed_official 324:406fd2029f23 382 * HW_CRC_DATAHU - CRC_DATAHU register.
mbed_official 324:406fd2029f23 383 ******************************************************************************/
mbed_official 324:406fd2029f23 384
mbed_official 324:406fd2029f23 385 /*!
mbed_official 324:406fd2029f23 386 * @brief HW_CRC_DATAHU - CRC_DATAHU register. (RW)
mbed_official 324:406fd2029f23 387 *
mbed_official 324:406fd2029f23 388 * Reset value: 0xFFU
mbed_official 324:406fd2029f23 389 */
mbed_official 324:406fd2029f23 390 typedef union _hw_crc_datahu
mbed_official 324:406fd2029f23 391 {
mbed_official 324:406fd2029f23 392 uint8_t U;
mbed_official 324:406fd2029f23 393 struct _hw_crc_datahu_bitfields
mbed_official 324:406fd2029f23 394 {
mbed_official 324:406fd2029f23 395 uint8_t DATAHU : 8; /*!< [7:0] DATAHU stores the fourth 8 bits of the
mbed_official 324:406fd2029f23 396 * 32 bit CRC */
mbed_official 324:406fd2029f23 397 } B;
mbed_official 324:406fd2029f23 398 } hw_crc_datahu_t;
mbed_official 324:406fd2029f23 399
mbed_official 324:406fd2029f23 400 /*!
mbed_official 324:406fd2029f23 401 * @name Constants and macros for entire CRC_DATAHU register
mbed_official 324:406fd2029f23 402 */
mbed_official 324:406fd2029f23 403 /*@{*/
mbed_official 324:406fd2029f23 404 #define HW_CRC_DATAHU_ADDR(x) ((x) + 0x3U)
mbed_official 324:406fd2029f23 405
mbed_official 324:406fd2029f23 406 #define HW_CRC_DATAHU(x) (*(__IO hw_crc_datahu_t *) HW_CRC_DATAHU_ADDR(x))
mbed_official 324:406fd2029f23 407 #define HW_CRC_DATAHU_RD(x) (HW_CRC_DATAHU(x).U)
mbed_official 324:406fd2029f23 408 #define HW_CRC_DATAHU_WR(x, v) (HW_CRC_DATAHU(x).U = (v))
mbed_official 324:406fd2029f23 409 #define HW_CRC_DATAHU_SET(x, v) (HW_CRC_DATAHU_WR(x, HW_CRC_DATAHU_RD(x) | (v)))
mbed_official 324:406fd2029f23 410 #define HW_CRC_DATAHU_CLR(x, v) (HW_CRC_DATAHU_WR(x, HW_CRC_DATAHU_RD(x) & ~(v)))
mbed_official 324:406fd2029f23 411 #define HW_CRC_DATAHU_TOG(x, v) (HW_CRC_DATAHU_WR(x, HW_CRC_DATAHU_RD(x) ^ (v)))
mbed_official 324:406fd2029f23 412 /*@}*/
mbed_official 324:406fd2029f23 413
mbed_official 324:406fd2029f23 414 /*
mbed_official 324:406fd2029f23 415 * Constants & macros for individual CRC_DATAHU bitfields
mbed_official 324:406fd2029f23 416 */
mbed_official 324:406fd2029f23 417
mbed_official 324:406fd2029f23 418 /*!
mbed_official 324:406fd2029f23 419 * @name Register CRC_DATAHU, field DATAHU[7:0] (RW)
mbed_official 324:406fd2029f23 420 */
mbed_official 324:406fd2029f23 421 /*@{*/
mbed_official 324:406fd2029f23 422 #define BP_CRC_DATAHU_DATAHU (0U) /*!< Bit position for CRC_DATAHU_DATAHU. */
mbed_official 324:406fd2029f23 423 #define BM_CRC_DATAHU_DATAHU (0xFFU) /*!< Bit mask for CRC_DATAHU_DATAHU. */
mbed_official 324:406fd2029f23 424 #define BS_CRC_DATAHU_DATAHU (8U) /*!< Bit field size in bits for CRC_DATAHU_DATAHU. */
mbed_official 324:406fd2029f23 425
mbed_official 324:406fd2029f23 426 /*! @brief Read current value of the CRC_DATAHU_DATAHU field. */
mbed_official 324:406fd2029f23 427 #define BR_CRC_DATAHU_DATAHU(x) (HW_CRC_DATAHU(x).U)
mbed_official 324:406fd2029f23 428
mbed_official 324:406fd2029f23 429 /*! @brief Format value for bitfield CRC_DATAHU_DATAHU. */
mbed_official 324:406fd2029f23 430 #define BF_CRC_DATAHU_DATAHU(v) ((uint8_t)((uint8_t)(v) << BP_CRC_DATAHU_DATAHU) & BM_CRC_DATAHU_DATAHU)
mbed_official 324:406fd2029f23 431
mbed_official 324:406fd2029f23 432 /*! @brief Set the DATAHU field to a new value. */
mbed_official 324:406fd2029f23 433 #define BW_CRC_DATAHU_DATAHU(x, v) (HW_CRC_DATAHU_WR(x, v))
mbed_official 324:406fd2029f23 434 /*@}*/
mbed_official 324:406fd2029f23 435 /*******************************************************************************
mbed_official 324:406fd2029f23 436 * HW_CRC_DATA - CRC Data register
mbed_official 324:406fd2029f23 437 ******************************************************************************/
mbed_official 324:406fd2029f23 438
mbed_official 324:406fd2029f23 439 /*!
mbed_official 324:406fd2029f23 440 * @brief HW_CRC_DATA - CRC Data register (RW)
mbed_official 324:406fd2029f23 441 *
mbed_official 324:406fd2029f23 442 * Reset value: 0xFFFFFFFFU
mbed_official 324:406fd2029f23 443 *
mbed_official 324:406fd2029f23 444 * The CRC Data register contains the value of the seed, data, and checksum.
mbed_official 324:406fd2029f23 445 * When CTRL[WAS] is set, any write to the data register is regarded as the seed
mbed_official 324:406fd2029f23 446 * value. When CTRL[WAS] is cleared, any write to the data register is regarded as
mbed_official 324:406fd2029f23 447 * data for general CRC computation. In 16-bit CRC mode, the HU and HL fields are
mbed_official 324:406fd2029f23 448 * not used for programming the seed value, and reads of these fields return an
mbed_official 324:406fd2029f23 449 * indeterminate value. In 32-bit CRC mode, all fields are used for programming
mbed_official 324:406fd2029f23 450 * the seed value. When programming data values, the values can be written 8 bits,
mbed_official 324:406fd2029f23 451 * 16 bits, or 32 bits at a time, provided all bytes are contiguous; with MSB of
mbed_official 324:406fd2029f23 452 * data value written first. After all data values are written, the CRC result
mbed_official 324:406fd2029f23 453 * can be read from this data register. In 16-bit CRC mode, the CRC result is
mbed_official 324:406fd2029f23 454 * available in the LU and LL fields. In 32-bit CRC mode, all fields contain the
mbed_official 324:406fd2029f23 455 * result. Reads of this register at any time return the intermediate CRC value,
mbed_official 324:406fd2029f23 456 * provided the CRC module is configured.
mbed_official 324:406fd2029f23 457 */
mbed_official 324:406fd2029f23 458 typedef union _hw_crc_data
mbed_official 324:406fd2029f23 459 {
mbed_official 324:406fd2029f23 460 uint32_t U;
mbed_official 324:406fd2029f23 461 struct _hw_crc_data_bitfields
mbed_official 324:406fd2029f23 462 {
mbed_official 324:406fd2029f23 463 uint32_t LL : 8; /*!< [7:0] CRC Low Lower Byte */
mbed_official 324:406fd2029f23 464 uint32_t LU : 8; /*!< [15:8] CRC Low Upper Byte */
mbed_official 324:406fd2029f23 465 uint32_t HL : 8; /*!< [23:16] CRC High Lower Byte */
mbed_official 324:406fd2029f23 466 uint32_t HU : 8; /*!< [31:24] CRC High Upper Byte */
mbed_official 324:406fd2029f23 467 } B;
mbed_official 324:406fd2029f23 468 } hw_crc_data_t;
mbed_official 324:406fd2029f23 469
mbed_official 324:406fd2029f23 470 /*!
mbed_official 324:406fd2029f23 471 * @name Constants and macros for entire CRC_DATA register
mbed_official 324:406fd2029f23 472 */
mbed_official 324:406fd2029f23 473 /*@{*/
mbed_official 324:406fd2029f23 474 #define HW_CRC_DATA_ADDR(x) ((x) + 0x0U)
mbed_official 324:406fd2029f23 475
mbed_official 324:406fd2029f23 476 #define HW_CRC_DATA(x) (*(__IO hw_crc_data_t *) HW_CRC_DATA_ADDR(x))
mbed_official 324:406fd2029f23 477 #define HW_CRC_DATA_RD(x) (HW_CRC_DATA(x).U)
mbed_official 324:406fd2029f23 478 #define HW_CRC_DATA_WR(x, v) (HW_CRC_DATA(x).U = (v))
mbed_official 324:406fd2029f23 479 #define HW_CRC_DATA_SET(x, v) (HW_CRC_DATA_WR(x, HW_CRC_DATA_RD(x) | (v)))
mbed_official 324:406fd2029f23 480 #define HW_CRC_DATA_CLR(x, v) (HW_CRC_DATA_WR(x, HW_CRC_DATA_RD(x) & ~(v)))
mbed_official 324:406fd2029f23 481 #define HW_CRC_DATA_TOG(x, v) (HW_CRC_DATA_WR(x, HW_CRC_DATA_RD(x) ^ (v)))
mbed_official 324:406fd2029f23 482 /*@}*/
mbed_official 324:406fd2029f23 483
mbed_official 324:406fd2029f23 484 /*
mbed_official 324:406fd2029f23 485 * Constants & macros for individual CRC_DATA bitfields
mbed_official 324:406fd2029f23 486 */
mbed_official 324:406fd2029f23 487
mbed_official 324:406fd2029f23 488 /*!
mbed_official 324:406fd2029f23 489 * @name Register CRC_DATA, field LL[7:0] (RW)
mbed_official 324:406fd2029f23 490 *
mbed_official 324:406fd2029f23 491 * When CTRL[WAS] is 1, values written to this field are part of the seed value.
mbed_official 324:406fd2029f23 492 * When CTRL[WAS] is 0, data written to this field is used for CRC checksum
mbed_official 324:406fd2029f23 493 * generation.
mbed_official 324:406fd2029f23 494 */
mbed_official 324:406fd2029f23 495 /*@{*/
mbed_official 324:406fd2029f23 496 #define BP_CRC_DATA_LL (0U) /*!< Bit position for CRC_DATA_LL. */
mbed_official 324:406fd2029f23 497 #define BM_CRC_DATA_LL (0x000000FFU) /*!< Bit mask for CRC_DATA_LL. */
mbed_official 324:406fd2029f23 498 #define BS_CRC_DATA_LL (8U) /*!< Bit field size in bits for CRC_DATA_LL. */
mbed_official 324:406fd2029f23 499
mbed_official 324:406fd2029f23 500 /*! @brief Read current value of the CRC_DATA_LL field. */
mbed_official 324:406fd2029f23 501 #define BR_CRC_DATA_LL(x) (HW_CRC_DATA(x).B.LL)
mbed_official 324:406fd2029f23 502
mbed_official 324:406fd2029f23 503 /*! @brief Format value for bitfield CRC_DATA_LL. */
mbed_official 324:406fd2029f23 504 #define BF_CRC_DATA_LL(v) ((uint32_t)((uint32_t)(v) << BP_CRC_DATA_LL) & BM_CRC_DATA_LL)
mbed_official 324:406fd2029f23 505
mbed_official 324:406fd2029f23 506 /*! @brief Set the LL field to a new value. */
mbed_official 324:406fd2029f23 507 #define BW_CRC_DATA_LL(x, v) (HW_CRC_DATA_WR(x, (HW_CRC_DATA_RD(x) & ~BM_CRC_DATA_LL) | BF_CRC_DATA_LL(v)))
mbed_official 324:406fd2029f23 508 /*@}*/
mbed_official 324:406fd2029f23 509
mbed_official 324:406fd2029f23 510 /*!
mbed_official 324:406fd2029f23 511 * @name Register CRC_DATA, field LU[15:8] (RW)
mbed_official 324:406fd2029f23 512 *
mbed_official 324:406fd2029f23 513 * When CTRL[WAS] is 1, values written to this field are part of the seed value.
mbed_official 324:406fd2029f23 514 * When CTRL[WAS] is 0, data written to this field is used for CRC checksum
mbed_official 324:406fd2029f23 515 * generation.
mbed_official 324:406fd2029f23 516 */
mbed_official 324:406fd2029f23 517 /*@{*/
mbed_official 324:406fd2029f23 518 #define BP_CRC_DATA_LU (8U) /*!< Bit position for CRC_DATA_LU. */
mbed_official 324:406fd2029f23 519 #define BM_CRC_DATA_LU (0x0000FF00U) /*!< Bit mask for CRC_DATA_LU. */
mbed_official 324:406fd2029f23 520 #define BS_CRC_DATA_LU (8U) /*!< Bit field size in bits for CRC_DATA_LU. */
mbed_official 324:406fd2029f23 521
mbed_official 324:406fd2029f23 522 /*! @brief Read current value of the CRC_DATA_LU field. */
mbed_official 324:406fd2029f23 523 #define BR_CRC_DATA_LU(x) (HW_CRC_DATA(x).B.LU)
mbed_official 324:406fd2029f23 524
mbed_official 324:406fd2029f23 525 /*! @brief Format value for bitfield CRC_DATA_LU. */
mbed_official 324:406fd2029f23 526 #define BF_CRC_DATA_LU(v) ((uint32_t)((uint32_t)(v) << BP_CRC_DATA_LU) & BM_CRC_DATA_LU)
mbed_official 324:406fd2029f23 527
mbed_official 324:406fd2029f23 528 /*! @brief Set the LU field to a new value. */
mbed_official 324:406fd2029f23 529 #define BW_CRC_DATA_LU(x, v) (HW_CRC_DATA_WR(x, (HW_CRC_DATA_RD(x) & ~BM_CRC_DATA_LU) | BF_CRC_DATA_LU(v)))
mbed_official 324:406fd2029f23 530 /*@}*/
mbed_official 324:406fd2029f23 531
mbed_official 324:406fd2029f23 532 /*!
mbed_official 324:406fd2029f23 533 * @name Register CRC_DATA, field HL[23:16] (RW)
mbed_official 324:406fd2029f23 534 *
mbed_official 324:406fd2029f23 535 * In 16-bit CRC mode (CTRL[TCRC] is 0), this field is not used for programming
mbed_official 324:406fd2029f23 536 * a seed value. In 32-bit CRC mode (CTRL[TCRC] is 1), values written to this
mbed_official 324:406fd2029f23 537 * field are part of the seed value when CTRL[WAS] is 1. When CTRL[WAS] is 0, data
mbed_official 324:406fd2029f23 538 * written to this field is used for CRC checksum generation in both 16-bit and
mbed_official 324:406fd2029f23 539 * 32-bit CRC modes.
mbed_official 324:406fd2029f23 540 */
mbed_official 324:406fd2029f23 541 /*@{*/
mbed_official 324:406fd2029f23 542 #define BP_CRC_DATA_HL (16U) /*!< Bit position for CRC_DATA_HL. */
mbed_official 324:406fd2029f23 543 #define BM_CRC_DATA_HL (0x00FF0000U) /*!< Bit mask for CRC_DATA_HL. */
mbed_official 324:406fd2029f23 544 #define BS_CRC_DATA_HL (8U) /*!< Bit field size in bits for CRC_DATA_HL. */
mbed_official 324:406fd2029f23 545
mbed_official 324:406fd2029f23 546 /*! @brief Read current value of the CRC_DATA_HL field. */
mbed_official 324:406fd2029f23 547 #define BR_CRC_DATA_HL(x) (HW_CRC_DATA(x).B.HL)
mbed_official 324:406fd2029f23 548
mbed_official 324:406fd2029f23 549 /*! @brief Format value for bitfield CRC_DATA_HL. */
mbed_official 324:406fd2029f23 550 #define BF_CRC_DATA_HL(v) ((uint32_t)((uint32_t)(v) << BP_CRC_DATA_HL) & BM_CRC_DATA_HL)
mbed_official 324:406fd2029f23 551
mbed_official 324:406fd2029f23 552 /*! @brief Set the HL field to a new value. */
mbed_official 324:406fd2029f23 553 #define BW_CRC_DATA_HL(x, v) (HW_CRC_DATA_WR(x, (HW_CRC_DATA_RD(x) & ~BM_CRC_DATA_HL) | BF_CRC_DATA_HL(v)))
mbed_official 324:406fd2029f23 554 /*@}*/
mbed_official 324:406fd2029f23 555
mbed_official 324:406fd2029f23 556 /*!
mbed_official 324:406fd2029f23 557 * @name Register CRC_DATA, field HU[31:24] (RW)
mbed_official 324:406fd2029f23 558 *
mbed_official 324:406fd2029f23 559 * In 16-bit CRC mode (CTRL[TCRC] is 0), this field is not used for programming
mbed_official 324:406fd2029f23 560 * a seed value. In 32-bit CRC mode (CTRL[TCRC] is 1), values written to this
mbed_official 324:406fd2029f23 561 * field are part of the seed value when CTRL[WAS] is 1. When CTRL[WAS] is 0, data
mbed_official 324:406fd2029f23 562 * written to this field is used for CRC checksum generation in both 16-bit and
mbed_official 324:406fd2029f23 563 * 32-bit CRC modes.
mbed_official 324:406fd2029f23 564 */
mbed_official 324:406fd2029f23 565 /*@{*/
mbed_official 324:406fd2029f23 566 #define BP_CRC_DATA_HU (24U) /*!< Bit position for CRC_DATA_HU. */
mbed_official 324:406fd2029f23 567 #define BM_CRC_DATA_HU (0xFF000000U) /*!< Bit mask for CRC_DATA_HU. */
mbed_official 324:406fd2029f23 568 #define BS_CRC_DATA_HU (8U) /*!< Bit field size in bits for CRC_DATA_HU. */
mbed_official 324:406fd2029f23 569
mbed_official 324:406fd2029f23 570 /*! @brief Read current value of the CRC_DATA_HU field. */
mbed_official 324:406fd2029f23 571 #define BR_CRC_DATA_HU(x) (HW_CRC_DATA(x).B.HU)
mbed_official 324:406fd2029f23 572
mbed_official 324:406fd2029f23 573 /*! @brief Format value for bitfield CRC_DATA_HU. */
mbed_official 324:406fd2029f23 574 #define BF_CRC_DATA_HU(v) ((uint32_t)((uint32_t)(v) << BP_CRC_DATA_HU) & BM_CRC_DATA_HU)
mbed_official 324:406fd2029f23 575
mbed_official 324:406fd2029f23 576 /*! @brief Set the HU field to a new value. */
mbed_official 324:406fd2029f23 577 #define BW_CRC_DATA_HU(x, v) (HW_CRC_DATA_WR(x, (HW_CRC_DATA_RD(x) & ~BM_CRC_DATA_HU) | BF_CRC_DATA_HU(v)))
mbed_official 324:406fd2029f23 578 /*@}*/
mbed_official 324:406fd2029f23 579
mbed_official 324:406fd2029f23 580 /*******************************************************************************
mbed_official 324:406fd2029f23 581 * HW_CRC_GPOLY - CRC Polynomial register
mbed_official 324:406fd2029f23 582 ******************************************************************************/
mbed_official 324:406fd2029f23 583
mbed_official 324:406fd2029f23 584 /*!
mbed_official 324:406fd2029f23 585 * @brief HW_CRC_GPOLY - CRC Polynomial register (RW)
mbed_official 324:406fd2029f23 586 *
mbed_official 324:406fd2029f23 587 * Reset value: 0x00001021U
mbed_official 324:406fd2029f23 588 *
mbed_official 324:406fd2029f23 589 * This register contains the value of the polynomial for the CRC calculation.
mbed_official 324:406fd2029f23 590 * The HIGH field contains the upper 16 bits of the CRC polynomial, which are used
mbed_official 324:406fd2029f23 591 * only in 32-bit CRC mode. Writes to the HIGH field are ignored in 16-bit CRC
mbed_official 324:406fd2029f23 592 * mode. The LOW field contains the lower 16 bits of the CRC polynomial, which are
mbed_official 324:406fd2029f23 593 * used in both 16- and 32-bit CRC modes.
mbed_official 324:406fd2029f23 594 */
mbed_official 324:406fd2029f23 595 typedef union _hw_crc_gpoly
mbed_official 324:406fd2029f23 596 {
mbed_official 324:406fd2029f23 597 uint32_t U;
mbed_official 324:406fd2029f23 598 struct _hw_crc_gpoly_bitfields
mbed_official 324:406fd2029f23 599 {
mbed_official 324:406fd2029f23 600 uint32_t LOW : 16; /*!< [15:0] Low Polynominal Half-word */
mbed_official 324:406fd2029f23 601 uint32_t HIGH : 16; /*!< [31:16] High Polynominal Half-word */
mbed_official 324:406fd2029f23 602 } B;
mbed_official 324:406fd2029f23 603 } hw_crc_gpoly_t;
mbed_official 324:406fd2029f23 604
mbed_official 324:406fd2029f23 605 /*!
mbed_official 324:406fd2029f23 606 * @name Constants and macros for entire CRC_GPOLY register
mbed_official 324:406fd2029f23 607 */
mbed_official 324:406fd2029f23 608 /*@{*/
mbed_official 324:406fd2029f23 609 #define HW_CRC_GPOLY_ADDR(x) ((x) + 0x4U)
mbed_official 324:406fd2029f23 610
mbed_official 324:406fd2029f23 611 #define HW_CRC_GPOLY(x) (*(__IO hw_crc_gpoly_t *) HW_CRC_GPOLY_ADDR(x))
mbed_official 324:406fd2029f23 612 #define HW_CRC_GPOLY_RD(x) (HW_CRC_GPOLY(x).U)
mbed_official 324:406fd2029f23 613 #define HW_CRC_GPOLY_WR(x, v) (HW_CRC_GPOLY(x).U = (v))
mbed_official 324:406fd2029f23 614 #define HW_CRC_GPOLY_SET(x, v) (HW_CRC_GPOLY_WR(x, HW_CRC_GPOLY_RD(x) | (v)))
mbed_official 324:406fd2029f23 615 #define HW_CRC_GPOLY_CLR(x, v) (HW_CRC_GPOLY_WR(x, HW_CRC_GPOLY_RD(x) & ~(v)))
mbed_official 324:406fd2029f23 616 #define HW_CRC_GPOLY_TOG(x, v) (HW_CRC_GPOLY_WR(x, HW_CRC_GPOLY_RD(x) ^ (v)))
mbed_official 324:406fd2029f23 617 /*@}*/
mbed_official 324:406fd2029f23 618
mbed_official 324:406fd2029f23 619 /*
mbed_official 324:406fd2029f23 620 * Constants & macros for individual CRC_GPOLY bitfields
mbed_official 324:406fd2029f23 621 */
mbed_official 324:406fd2029f23 622
mbed_official 324:406fd2029f23 623 /*!
mbed_official 324:406fd2029f23 624 * @name Register CRC_GPOLY, field LOW[15:0] (RW)
mbed_official 324:406fd2029f23 625 *
mbed_official 324:406fd2029f23 626 * Writable and readable in both 32-bit and 16-bit CRC modes.
mbed_official 324:406fd2029f23 627 */
mbed_official 324:406fd2029f23 628 /*@{*/
mbed_official 324:406fd2029f23 629 #define BP_CRC_GPOLY_LOW (0U) /*!< Bit position for CRC_GPOLY_LOW. */
mbed_official 324:406fd2029f23 630 #define BM_CRC_GPOLY_LOW (0x0000FFFFU) /*!< Bit mask for CRC_GPOLY_LOW. */
mbed_official 324:406fd2029f23 631 #define BS_CRC_GPOLY_LOW (16U) /*!< Bit field size in bits for CRC_GPOLY_LOW. */
mbed_official 324:406fd2029f23 632
mbed_official 324:406fd2029f23 633 /*! @brief Read current value of the CRC_GPOLY_LOW field. */
mbed_official 324:406fd2029f23 634 #define BR_CRC_GPOLY_LOW(x) (HW_CRC_GPOLY(x).B.LOW)
mbed_official 324:406fd2029f23 635
mbed_official 324:406fd2029f23 636 /*! @brief Format value for bitfield CRC_GPOLY_LOW. */
mbed_official 324:406fd2029f23 637 #define BF_CRC_GPOLY_LOW(v) ((uint32_t)((uint32_t)(v) << BP_CRC_GPOLY_LOW) & BM_CRC_GPOLY_LOW)
mbed_official 324:406fd2029f23 638
mbed_official 324:406fd2029f23 639 /*! @brief Set the LOW field to a new value. */
mbed_official 324:406fd2029f23 640 #define BW_CRC_GPOLY_LOW(x, v) (HW_CRC_GPOLY_WR(x, (HW_CRC_GPOLY_RD(x) & ~BM_CRC_GPOLY_LOW) | BF_CRC_GPOLY_LOW(v)))
mbed_official 324:406fd2029f23 641 /*@}*/
mbed_official 324:406fd2029f23 642
mbed_official 324:406fd2029f23 643 /*!
mbed_official 324:406fd2029f23 644 * @name Register CRC_GPOLY, field HIGH[31:16] (RW)
mbed_official 324:406fd2029f23 645 *
mbed_official 324:406fd2029f23 646 * Writable and readable in 32-bit CRC mode (CTRL[TCRC] is 1). This field is not
mbed_official 324:406fd2029f23 647 * writable in 16-bit CRC mode (CTRL[TCRC] is 0).
mbed_official 324:406fd2029f23 648 */
mbed_official 324:406fd2029f23 649 /*@{*/
mbed_official 324:406fd2029f23 650 #define BP_CRC_GPOLY_HIGH (16U) /*!< Bit position for CRC_GPOLY_HIGH. */
mbed_official 324:406fd2029f23 651 #define BM_CRC_GPOLY_HIGH (0xFFFF0000U) /*!< Bit mask for CRC_GPOLY_HIGH. */
mbed_official 324:406fd2029f23 652 #define BS_CRC_GPOLY_HIGH (16U) /*!< Bit field size in bits for CRC_GPOLY_HIGH. */
mbed_official 324:406fd2029f23 653
mbed_official 324:406fd2029f23 654 /*! @brief Read current value of the CRC_GPOLY_HIGH field. */
mbed_official 324:406fd2029f23 655 #define BR_CRC_GPOLY_HIGH(x) (HW_CRC_GPOLY(x).B.HIGH)
mbed_official 324:406fd2029f23 656
mbed_official 324:406fd2029f23 657 /*! @brief Format value for bitfield CRC_GPOLY_HIGH. */
mbed_official 324:406fd2029f23 658 #define BF_CRC_GPOLY_HIGH(v) ((uint32_t)((uint32_t)(v) << BP_CRC_GPOLY_HIGH) & BM_CRC_GPOLY_HIGH)
mbed_official 324:406fd2029f23 659
mbed_official 324:406fd2029f23 660 /*! @brief Set the HIGH field to a new value. */
mbed_official 324:406fd2029f23 661 #define BW_CRC_GPOLY_HIGH(x, v) (HW_CRC_GPOLY_WR(x, (HW_CRC_GPOLY_RD(x) & ~BM_CRC_GPOLY_HIGH) | BF_CRC_GPOLY_HIGH(v)))
mbed_official 324:406fd2029f23 662 /*@}*/
mbed_official 324:406fd2029f23 663 /*******************************************************************************
mbed_official 324:406fd2029f23 664 * HW_CRC_GPOLYL - CRC_GPOLYL register.
mbed_official 324:406fd2029f23 665 ******************************************************************************/
mbed_official 324:406fd2029f23 666
mbed_official 324:406fd2029f23 667 /*!
mbed_official 324:406fd2029f23 668 * @brief HW_CRC_GPOLYL - CRC_GPOLYL register. (RW)
mbed_official 324:406fd2029f23 669 *
mbed_official 324:406fd2029f23 670 * Reset value: 0xFFFFU
mbed_official 324:406fd2029f23 671 */
mbed_official 324:406fd2029f23 672 typedef union _hw_crc_gpolyl
mbed_official 324:406fd2029f23 673 {
mbed_official 324:406fd2029f23 674 uint16_t U;
mbed_official 324:406fd2029f23 675 struct _hw_crc_gpolyl_bitfields
mbed_official 324:406fd2029f23 676 {
mbed_official 324:406fd2029f23 677 uint16_t GPOLYL : 16; /*!< [15:0] POLYL stores the lower 16 bits of
mbed_official 324:406fd2029f23 678 * the 16/32 bit CRC polynomial value */
mbed_official 324:406fd2029f23 679 } B;
mbed_official 324:406fd2029f23 680 } hw_crc_gpolyl_t;
mbed_official 324:406fd2029f23 681
mbed_official 324:406fd2029f23 682 /*!
mbed_official 324:406fd2029f23 683 * @name Constants and macros for entire CRC_GPOLYL register
mbed_official 324:406fd2029f23 684 */
mbed_official 324:406fd2029f23 685 /*@{*/
mbed_official 324:406fd2029f23 686 #define HW_CRC_GPOLYL_ADDR(x) ((x) + 0x4U)
mbed_official 324:406fd2029f23 687
mbed_official 324:406fd2029f23 688 #define HW_CRC_GPOLYL(x) (*(__IO hw_crc_gpolyl_t *) HW_CRC_GPOLYL_ADDR(x))
mbed_official 324:406fd2029f23 689 #define HW_CRC_GPOLYL_RD(x) (HW_CRC_GPOLYL(x).U)
mbed_official 324:406fd2029f23 690 #define HW_CRC_GPOLYL_WR(x, v) (HW_CRC_GPOLYL(x).U = (v))
mbed_official 324:406fd2029f23 691 #define HW_CRC_GPOLYL_SET(x, v) (HW_CRC_GPOLYL_WR(x, HW_CRC_GPOLYL_RD(x) | (v)))
mbed_official 324:406fd2029f23 692 #define HW_CRC_GPOLYL_CLR(x, v) (HW_CRC_GPOLYL_WR(x, HW_CRC_GPOLYL_RD(x) & ~(v)))
mbed_official 324:406fd2029f23 693 #define HW_CRC_GPOLYL_TOG(x, v) (HW_CRC_GPOLYL_WR(x, HW_CRC_GPOLYL_RD(x) ^ (v)))
mbed_official 324:406fd2029f23 694 /*@}*/
mbed_official 324:406fd2029f23 695
mbed_official 324:406fd2029f23 696 /*
mbed_official 324:406fd2029f23 697 * Constants & macros for individual CRC_GPOLYL bitfields
mbed_official 324:406fd2029f23 698 */
mbed_official 324:406fd2029f23 699
mbed_official 324:406fd2029f23 700 /*!
mbed_official 324:406fd2029f23 701 * @name Register CRC_GPOLYL, field GPOLYL[15:0] (RW)
mbed_official 324:406fd2029f23 702 */
mbed_official 324:406fd2029f23 703 /*@{*/
mbed_official 324:406fd2029f23 704 #define BP_CRC_GPOLYL_GPOLYL (0U) /*!< Bit position for CRC_GPOLYL_GPOLYL. */
mbed_official 324:406fd2029f23 705 #define BM_CRC_GPOLYL_GPOLYL (0xFFFFU) /*!< Bit mask for CRC_GPOLYL_GPOLYL. */
mbed_official 324:406fd2029f23 706 #define BS_CRC_GPOLYL_GPOLYL (16U) /*!< Bit field size in bits for CRC_GPOLYL_GPOLYL. */
mbed_official 324:406fd2029f23 707
mbed_official 324:406fd2029f23 708 /*! @brief Read current value of the CRC_GPOLYL_GPOLYL field. */
mbed_official 324:406fd2029f23 709 #define BR_CRC_GPOLYL_GPOLYL(x) (HW_CRC_GPOLYL(x).U)
mbed_official 324:406fd2029f23 710
mbed_official 324:406fd2029f23 711 /*! @brief Format value for bitfield CRC_GPOLYL_GPOLYL. */
mbed_official 324:406fd2029f23 712 #define BF_CRC_GPOLYL_GPOLYL(v) ((uint16_t)((uint16_t)(v) << BP_CRC_GPOLYL_GPOLYL) & BM_CRC_GPOLYL_GPOLYL)
mbed_official 324:406fd2029f23 713
mbed_official 324:406fd2029f23 714 /*! @brief Set the GPOLYL field to a new value. */
mbed_official 324:406fd2029f23 715 #define BW_CRC_GPOLYL_GPOLYL(x, v) (HW_CRC_GPOLYL_WR(x, v))
mbed_official 324:406fd2029f23 716 /*@}*/
mbed_official 324:406fd2029f23 717 /*******************************************************************************
mbed_official 324:406fd2029f23 718 * HW_CRC_GPOLYH - CRC_GPOLYH register.
mbed_official 324:406fd2029f23 719 ******************************************************************************/
mbed_official 324:406fd2029f23 720
mbed_official 324:406fd2029f23 721 /*!
mbed_official 324:406fd2029f23 722 * @brief HW_CRC_GPOLYH - CRC_GPOLYH register. (RW)
mbed_official 324:406fd2029f23 723 *
mbed_official 324:406fd2029f23 724 * Reset value: 0xFFFFU
mbed_official 324:406fd2029f23 725 */
mbed_official 324:406fd2029f23 726 typedef union _hw_crc_gpolyh
mbed_official 324:406fd2029f23 727 {
mbed_official 324:406fd2029f23 728 uint16_t U;
mbed_official 324:406fd2029f23 729 struct _hw_crc_gpolyh_bitfields
mbed_official 324:406fd2029f23 730 {
mbed_official 324:406fd2029f23 731 uint16_t GPOLYH : 16; /*!< [15:0] POLYH stores the high 16 bits of
mbed_official 324:406fd2029f23 732 * the 16/32 bit CRC polynomial value */
mbed_official 324:406fd2029f23 733 } B;
mbed_official 324:406fd2029f23 734 } hw_crc_gpolyh_t;
mbed_official 324:406fd2029f23 735
mbed_official 324:406fd2029f23 736 /*!
mbed_official 324:406fd2029f23 737 * @name Constants and macros for entire CRC_GPOLYH register
mbed_official 324:406fd2029f23 738 */
mbed_official 324:406fd2029f23 739 /*@{*/
mbed_official 324:406fd2029f23 740 #define HW_CRC_GPOLYH_ADDR(x) ((x) + 0x6U)
mbed_official 324:406fd2029f23 741
mbed_official 324:406fd2029f23 742 #define HW_CRC_GPOLYH(x) (*(__IO hw_crc_gpolyh_t *) HW_CRC_GPOLYH_ADDR(x))
mbed_official 324:406fd2029f23 743 #define HW_CRC_GPOLYH_RD(x) (HW_CRC_GPOLYH(x).U)
mbed_official 324:406fd2029f23 744 #define HW_CRC_GPOLYH_WR(x, v) (HW_CRC_GPOLYH(x).U = (v))
mbed_official 324:406fd2029f23 745 #define HW_CRC_GPOLYH_SET(x, v) (HW_CRC_GPOLYH_WR(x, HW_CRC_GPOLYH_RD(x) | (v)))
mbed_official 324:406fd2029f23 746 #define HW_CRC_GPOLYH_CLR(x, v) (HW_CRC_GPOLYH_WR(x, HW_CRC_GPOLYH_RD(x) & ~(v)))
mbed_official 324:406fd2029f23 747 #define HW_CRC_GPOLYH_TOG(x, v) (HW_CRC_GPOLYH_WR(x, HW_CRC_GPOLYH_RD(x) ^ (v)))
mbed_official 324:406fd2029f23 748 /*@}*/
mbed_official 324:406fd2029f23 749
mbed_official 324:406fd2029f23 750 /*
mbed_official 324:406fd2029f23 751 * Constants & macros for individual CRC_GPOLYH bitfields
mbed_official 324:406fd2029f23 752 */
mbed_official 324:406fd2029f23 753
mbed_official 324:406fd2029f23 754 /*!
mbed_official 324:406fd2029f23 755 * @name Register CRC_GPOLYH, field GPOLYH[15:0] (RW)
mbed_official 324:406fd2029f23 756 */
mbed_official 324:406fd2029f23 757 /*@{*/
mbed_official 324:406fd2029f23 758 #define BP_CRC_GPOLYH_GPOLYH (0U) /*!< Bit position for CRC_GPOLYH_GPOLYH. */
mbed_official 324:406fd2029f23 759 #define BM_CRC_GPOLYH_GPOLYH (0xFFFFU) /*!< Bit mask for CRC_GPOLYH_GPOLYH. */
mbed_official 324:406fd2029f23 760 #define BS_CRC_GPOLYH_GPOLYH (16U) /*!< Bit field size in bits for CRC_GPOLYH_GPOLYH. */
mbed_official 324:406fd2029f23 761
mbed_official 324:406fd2029f23 762 /*! @brief Read current value of the CRC_GPOLYH_GPOLYH field. */
mbed_official 324:406fd2029f23 763 #define BR_CRC_GPOLYH_GPOLYH(x) (HW_CRC_GPOLYH(x).U)
mbed_official 324:406fd2029f23 764
mbed_official 324:406fd2029f23 765 /*! @brief Format value for bitfield CRC_GPOLYH_GPOLYH. */
mbed_official 324:406fd2029f23 766 #define BF_CRC_GPOLYH_GPOLYH(v) ((uint16_t)((uint16_t)(v) << BP_CRC_GPOLYH_GPOLYH) & BM_CRC_GPOLYH_GPOLYH)
mbed_official 324:406fd2029f23 767
mbed_official 324:406fd2029f23 768 /*! @brief Set the GPOLYH field to a new value. */
mbed_official 324:406fd2029f23 769 #define BW_CRC_GPOLYH_GPOLYH(x, v) (HW_CRC_GPOLYH_WR(x, v))
mbed_official 324:406fd2029f23 770 /*@}*/
mbed_official 324:406fd2029f23 771 /*******************************************************************************
mbed_official 324:406fd2029f23 772 * HW_CRC_GPOLYLL - CRC_GPOLYLL register.
mbed_official 324:406fd2029f23 773 ******************************************************************************/
mbed_official 324:406fd2029f23 774
mbed_official 324:406fd2029f23 775 /*!
mbed_official 324:406fd2029f23 776 * @brief HW_CRC_GPOLYLL - CRC_GPOLYLL register. (RW)
mbed_official 324:406fd2029f23 777 *
mbed_official 324:406fd2029f23 778 * Reset value: 0xFFU
mbed_official 324:406fd2029f23 779 */
mbed_official 324:406fd2029f23 780 typedef union _hw_crc_gpolyll
mbed_official 324:406fd2029f23 781 {
mbed_official 324:406fd2029f23 782 uint8_t U;
mbed_official 324:406fd2029f23 783 struct _hw_crc_gpolyll_bitfields
mbed_official 324:406fd2029f23 784 {
mbed_official 324:406fd2029f23 785 uint8_t GPOLYLL : 8; /*!< [7:0] POLYLL stores the first 8 bits of the
mbed_official 324:406fd2029f23 786 * 32 bit CRC */
mbed_official 324:406fd2029f23 787 } B;
mbed_official 324:406fd2029f23 788 } hw_crc_gpolyll_t;
mbed_official 324:406fd2029f23 789
mbed_official 324:406fd2029f23 790 /*!
mbed_official 324:406fd2029f23 791 * @name Constants and macros for entire CRC_GPOLYLL register
mbed_official 324:406fd2029f23 792 */
mbed_official 324:406fd2029f23 793 /*@{*/
mbed_official 324:406fd2029f23 794 #define HW_CRC_GPOLYLL_ADDR(x) ((x) + 0x4U)
mbed_official 324:406fd2029f23 795
mbed_official 324:406fd2029f23 796 #define HW_CRC_GPOLYLL(x) (*(__IO hw_crc_gpolyll_t *) HW_CRC_GPOLYLL_ADDR(x))
mbed_official 324:406fd2029f23 797 #define HW_CRC_GPOLYLL_RD(x) (HW_CRC_GPOLYLL(x).U)
mbed_official 324:406fd2029f23 798 #define HW_CRC_GPOLYLL_WR(x, v) (HW_CRC_GPOLYLL(x).U = (v))
mbed_official 324:406fd2029f23 799 #define HW_CRC_GPOLYLL_SET(x, v) (HW_CRC_GPOLYLL_WR(x, HW_CRC_GPOLYLL_RD(x) | (v)))
mbed_official 324:406fd2029f23 800 #define HW_CRC_GPOLYLL_CLR(x, v) (HW_CRC_GPOLYLL_WR(x, HW_CRC_GPOLYLL_RD(x) & ~(v)))
mbed_official 324:406fd2029f23 801 #define HW_CRC_GPOLYLL_TOG(x, v) (HW_CRC_GPOLYLL_WR(x, HW_CRC_GPOLYLL_RD(x) ^ (v)))
mbed_official 324:406fd2029f23 802 /*@}*/
mbed_official 324:406fd2029f23 803
mbed_official 324:406fd2029f23 804 /*
mbed_official 324:406fd2029f23 805 * Constants & macros for individual CRC_GPOLYLL bitfields
mbed_official 324:406fd2029f23 806 */
mbed_official 324:406fd2029f23 807
mbed_official 324:406fd2029f23 808 /*!
mbed_official 324:406fd2029f23 809 * @name Register CRC_GPOLYLL, field GPOLYLL[7:0] (RW)
mbed_official 324:406fd2029f23 810 */
mbed_official 324:406fd2029f23 811 /*@{*/
mbed_official 324:406fd2029f23 812 #define BP_CRC_GPOLYLL_GPOLYLL (0U) /*!< Bit position for CRC_GPOLYLL_GPOLYLL. */
mbed_official 324:406fd2029f23 813 #define BM_CRC_GPOLYLL_GPOLYLL (0xFFU) /*!< Bit mask for CRC_GPOLYLL_GPOLYLL. */
mbed_official 324:406fd2029f23 814 #define BS_CRC_GPOLYLL_GPOLYLL (8U) /*!< Bit field size in bits for CRC_GPOLYLL_GPOLYLL. */
mbed_official 324:406fd2029f23 815
mbed_official 324:406fd2029f23 816 /*! @brief Read current value of the CRC_GPOLYLL_GPOLYLL field. */
mbed_official 324:406fd2029f23 817 #define BR_CRC_GPOLYLL_GPOLYLL(x) (HW_CRC_GPOLYLL(x).U)
mbed_official 324:406fd2029f23 818
mbed_official 324:406fd2029f23 819 /*! @brief Format value for bitfield CRC_GPOLYLL_GPOLYLL. */
mbed_official 324:406fd2029f23 820 #define BF_CRC_GPOLYLL_GPOLYLL(v) ((uint8_t)((uint8_t)(v) << BP_CRC_GPOLYLL_GPOLYLL) & BM_CRC_GPOLYLL_GPOLYLL)
mbed_official 324:406fd2029f23 821
mbed_official 324:406fd2029f23 822 /*! @brief Set the GPOLYLL field to a new value. */
mbed_official 324:406fd2029f23 823 #define BW_CRC_GPOLYLL_GPOLYLL(x, v) (HW_CRC_GPOLYLL_WR(x, v))
mbed_official 324:406fd2029f23 824 /*@}*/
mbed_official 324:406fd2029f23 825 /*******************************************************************************
mbed_official 324:406fd2029f23 826 * HW_CRC_GPOLYLU - CRC_GPOLYLU register.
mbed_official 324:406fd2029f23 827 ******************************************************************************/
mbed_official 324:406fd2029f23 828
mbed_official 324:406fd2029f23 829 /*!
mbed_official 324:406fd2029f23 830 * @brief HW_CRC_GPOLYLU - CRC_GPOLYLU register. (RW)
mbed_official 324:406fd2029f23 831 *
mbed_official 324:406fd2029f23 832 * Reset value: 0xFFU
mbed_official 324:406fd2029f23 833 */
mbed_official 324:406fd2029f23 834 typedef union _hw_crc_gpolylu
mbed_official 324:406fd2029f23 835 {
mbed_official 324:406fd2029f23 836 uint8_t U;
mbed_official 324:406fd2029f23 837 struct _hw_crc_gpolylu_bitfields
mbed_official 324:406fd2029f23 838 {
mbed_official 324:406fd2029f23 839 uint8_t GPOLYLU : 8; /*!< [7:0] POLYLL stores the second 8 bits of
mbed_official 324:406fd2029f23 840 * the 32 bit CRC */
mbed_official 324:406fd2029f23 841 } B;
mbed_official 324:406fd2029f23 842 } hw_crc_gpolylu_t;
mbed_official 324:406fd2029f23 843
mbed_official 324:406fd2029f23 844 /*!
mbed_official 324:406fd2029f23 845 * @name Constants and macros for entire CRC_GPOLYLU register
mbed_official 324:406fd2029f23 846 */
mbed_official 324:406fd2029f23 847 /*@{*/
mbed_official 324:406fd2029f23 848 #define HW_CRC_GPOLYLU_ADDR(x) ((x) + 0x5U)
mbed_official 324:406fd2029f23 849
mbed_official 324:406fd2029f23 850 #define HW_CRC_GPOLYLU(x) (*(__IO hw_crc_gpolylu_t *) HW_CRC_GPOLYLU_ADDR(x))
mbed_official 324:406fd2029f23 851 #define HW_CRC_GPOLYLU_RD(x) (HW_CRC_GPOLYLU(x).U)
mbed_official 324:406fd2029f23 852 #define HW_CRC_GPOLYLU_WR(x, v) (HW_CRC_GPOLYLU(x).U = (v))
mbed_official 324:406fd2029f23 853 #define HW_CRC_GPOLYLU_SET(x, v) (HW_CRC_GPOLYLU_WR(x, HW_CRC_GPOLYLU_RD(x) | (v)))
mbed_official 324:406fd2029f23 854 #define HW_CRC_GPOLYLU_CLR(x, v) (HW_CRC_GPOLYLU_WR(x, HW_CRC_GPOLYLU_RD(x) & ~(v)))
mbed_official 324:406fd2029f23 855 #define HW_CRC_GPOLYLU_TOG(x, v) (HW_CRC_GPOLYLU_WR(x, HW_CRC_GPOLYLU_RD(x) ^ (v)))
mbed_official 324:406fd2029f23 856 /*@}*/
mbed_official 324:406fd2029f23 857
mbed_official 324:406fd2029f23 858 /*
mbed_official 324:406fd2029f23 859 * Constants & macros for individual CRC_GPOLYLU bitfields
mbed_official 324:406fd2029f23 860 */
mbed_official 324:406fd2029f23 861
mbed_official 324:406fd2029f23 862 /*!
mbed_official 324:406fd2029f23 863 * @name Register CRC_GPOLYLU, field GPOLYLU[7:0] (RW)
mbed_official 324:406fd2029f23 864 */
mbed_official 324:406fd2029f23 865 /*@{*/
mbed_official 324:406fd2029f23 866 #define BP_CRC_GPOLYLU_GPOLYLU (0U) /*!< Bit position for CRC_GPOLYLU_GPOLYLU. */
mbed_official 324:406fd2029f23 867 #define BM_CRC_GPOLYLU_GPOLYLU (0xFFU) /*!< Bit mask for CRC_GPOLYLU_GPOLYLU. */
mbed_official 324:406fd2029f23 868 #define BS_CRC_GPOLYLU_GPOLYLU (8U) /*!< Bit field size in bits for CRC_GPOLYLU_GPOLYLU. */
mbed_official 324:406fd2029f23 869
mbed_official 324:406fd2029f23 870 /*! @brief Read current value of the CRC_GPOLYLU_GPOLYLU field. */
mbed_official 324:406fd2029f23 871 #define BR_CRC_GPOLYLU_GPOLYLU(x) (HW_CRC_GPOLYLU(x).U)
mbed_official 324:406fd2029f23 872
mbed_official 324:406fd2029f23 873 /*! @brief Format value for bitfield CRC_GPOLYLU_GPOLYLU. */
mbed_official 324:406fd2029f23 874 #define BF_CRC_GPOLYLU_GPOLYLU(v) ((uint8_t)((uint8_t)(v) << BP_CRC_GPOLYLU_GPOLYLU) & BM_CRC_GPOLYLU_GPOLYLU)
mbed_official 324:406fd2029f23 875
mbed_official 324:406fd2029f23 876 /*! @brief Set the GPOLYLU field to a new value. */
mbed_official 324:406fd2029f23 877 #define BW_CRC_GPOLYLU_GPOLYLU(x, v) (HW_CRC_GPOLYLU_WR(x, v))
mbed_official 324:406fd2029f23 878 /*@}*/
mbed_official 324:406fd2029f23 879 /*******************************************************************************
mbed_official 324:406fd2029f23 880 * HW_CRC_GPOLYHL - CRC_GPOLYHL register.
mbed_official 324:406fd2029f23 881 ******************************************************************************/
mbed_official 324:406fd2029f23 882
mbed_official 324:406fd2029f23 883 /*!
mbed_official 324:406fd2029f23 884 * @brief HW_CRC_GPOLYHL - CRC_GPOLYHL register. (RW)
mbed_official 324:406fd2029f23 885 *
mbed_official 324:406fd2029f23 886 * Reset value: 0xFFU
mbed_official 324:406fd2029f23 887 */
mbed_official 324:406fd2029f23 888 typedef union _hw_crc_gpolyhl
mbed_official 324:406fd2029f23 889 {
mbed_official 324:406fd2029f23 890 uint8_t U;
mbed_official 324:406fd2029f23 891 struct _hw_crc_gpolyhl_bitfields
mbed_official 324:406fd2029f23 892 {
mbed_official 324:406fd2029f23 893 uint8_t GPOLYHL : 8; /*!< [7:0] POLYHL stores the third 8 bits of the
mbed_official 324:406fd2029f23 894 * 32 bit CRC */
mbed_official 324:406fd2029f23 895 } B;
mbed_official 324:406fd2029f23 896 } hw_crc_gpolyhl_t;
mbed_official 324:406fd2029f23 897
mbed_official 324:406fd2029f23 898 /*!
mbed_official 324:406fd2029f23 899 * @name Constants and macros for entire CRC_GPOLYHL register
mbed_official 324:406fd2029f23 900 */
mbed_official 324:406fd2029f23 901 /*@{*/
mbed_official 324:406fd2029f23 902 #define HW_CRC_GPOLYHL_ADDR(x) ((x) + 0x6U)
mbed_official 324:406fd2029f23 903
mbed_official 324:406fd2029f23 904 #define HW_CRC_GPOLYHL(x) (*(__IO hw_crc_gpolyhl_t *) HW_CRC_GPOLYHL_ADDR(x))
mbed_official 324:406fd2029f23 905 #define HW_CRC_GPOLYHL_RD(x) (HW_CRC_GPOLYHL(x).U)
mbed_official 324:406fd2029f23 906 #define HW_CRC_GPOLYHL_WR(x, v) (HW_CRC_GPOLYHL(x).U = (v))
mbed_official 324:406fd2029f23 907 #define HW_CRC_GPOLYHL_SET(x, v) (HW_CRC_GPOLYHL_WR(x, HW_CRC_GPOLYHL_RD(x) | (v)))
mbed_official 324:406fd2029f23 908 #define HW_CRC_GPOLYHL_CLR(x, v) (HW_CRC_GPOLYHL_WR(x, HW_CRC_GPOLYHL_RD(x) & ~(v)))
mbed_official 324:406fd2029f23 909 #define HW_CRC_GPOLYHL_TOG(x, v) (HW_CRC_GPOLYHL_WR(x, HW_CRC_GPOLYHL_RD(x) ^ (v)))
mbed_official 324:406fd2029f23 910 /*@}*/
mbed_official 324:406fd2029f23 911
mbed_official 324:406fd2029f23 912 /*
mbed_official 324:406fd2029f23 913 * Constants & macros for individual CRC_GPOLYHL bitfields
mbed_official 324:406fd2029f23 914 */
mbed_official 324:406fd2029f23 915
mbed_official 324:406fd2029f23 916 /*!
mbed_official 324:406fd2029f23 917 * @name Register CRC_GPOLYHL, field GPOLYHL[7:0] (RW)
mbed_official 324:406fd2029f23 918 */
mbed_official 324:406fd2029f23 919 /*@{*/
mbed_official 324:406fd2029f23 920 #define BP_CRC_GPOLYHL_GPOLYHL (0U) /*!< Bit position for CRC_GPOLYHL_GPOLYHL. */
mbed_official 324:406fd2029f23 921 #define BM_CRC_GPOLYHL_GPOLYHL (0xFFU) /*!< Bit mask for CRC_GPOLYHL_GPOLYHL. */
mbed_official 324:406fd2029f23 922 #define BS_CRC_GPOLYHL_GPOLYHL (8U) /*!< Bit field size in bits for CRC_GPOLYHL_GPOLYHL. */
mbed_official 324:406fd2029f23 923
mbed_official 324:406fd2029f23 924 /*! @brief Read current value of the CRC_GPOLYHL_GPOLYHL field. */
mbed_official 324:406fd2029f23 925 #define BR_CRC_GPOLYHL_GPOLYHL(x) (HW_CRC_GPOLYHL(x).U)
mbed_official 324:406fd2029f23 926
mbed_official 324:406fd2029f23 927 /*! @brief Format value for bitfield CRC_GPOLYHL_GPOLYHL. */
mbed_official 324:406fd2029f23 928 #define BF_CRC_GPOLYHL_GPOLYHL(v) ((uint8_t)((uint8_t)(v) << BP_CRC_GPOLYHL_GPOLYHL) & BM_CRC_GPOLYHL_GPOLYHL)
mbed_official 324:406fd2029f23 929
mbed_official 324:406fd2029f23 930 /*! @brief Set the GPOLYHL field to a new value. */
mbed_official 324:406fd2029f23 931 #define BW_CRC_GPOLYHL_GPOLYHL(x, v) (HW_CRC_GPOLYHL_WR(x, v))
mbed_official 324:406fd2029f23 932 /*@}*/
mbed_official 324:406fd2029f23 933 /*******************************************************************************
mbed_official 324:406fd2029f23 934 * HW_CRC_GPOLYHU - CRC_GPOLYHU register.
mbed_official 324:406fd2029f23 935 ******************************************************************************/
mbed_official 324:406fd2029f23 936
mbed_official 324:406fd2029f23 937 /*!
mbed_official 324:406fd2029f23 938 * @brief HW_CRC_GPOLYHU - CRC_GPOLYHU register. (RW)
mbed_official 324:406fd2029f23 939 *
mbed_official 324:406fd2029f23 940 * Reset value: 0xFFU
mbed_official 324:406fd2029f23 941 */
mbed_official 324:406fd2029f23 942 typedef union _hw_crc_gpolyhu
mbed_official 324:406fd2029f23 943 {
mbed_official 324:406fd2029f23 944 uint8_t U;
mbed_official 324:406fd2029f23 945 struct _hw_crc_gpolyhu_bitfields
mbed_official 324:406fd2029f23 946 {
mbed_official 324:406fd2029f23 947 uint8_t GPOLYHU : 8; /*!< [7:0] POLYHU stores the fourth 8 bits of
mbed_official 324:406fd2029f23 948 * the 32 bit CRC */
mbed_official 324:406fd2029f23 949 } B;
mbed_official 324:406fd2029f23 950 } hw_crc_gpolyhu_t;
mbed_official 324:406fd2029f23 951
mbed_official 324:406fd2029f23 952 /*!
mbed_official 324:406fd2029f23 953 * @name Constants and macros for entire CRC_GPOLYHU register
mbed_official 324:406fd2029f23 954 */
mbed_official 324:406fd2029f23 955 /*@{*/
mbed_official 324:406fd2029f23 956 #define HW_CRC_GPOLYHU_ADDR(x) ((x) + 0x7U)
mbed_official 324:406fd2029f23 957
mbed_official 324:406fd2029f23 958 #define HW_CRC_GPOLYHU(x) (*(__IO hw_crc_gpolyhu_t *) HW_CRC_GPOLYHU_ADDR(x))
mbed_official 324:406fd2029f23 959 #define HW_CRC_GPOLYHU_RD(x) (HW_CRC_GPOLYHU(x).U)
mbed_official 324:406fd2029f23 960 #define HW_CRC_GPOLYHU_WR(x, v) (HW_CRC_GPOLYHU(x).U = (v))
mbed_official 324:406fd2029f23 961 #define HW_CRC_GPOLYHU_SET(x, v) (HW_CRC_GPOLYHU_WR(x, HW_CRC_GPOLYHU_RD(x) | (v)))
mbed_official 324:406fd2029f23 962 #define HW_CRC_GPOLYHU_CLR(x, v) (HW_CRC_GPOLYHU_WR(x, HW_CRC_GPOLYHU_RD(x) & ~(v)))
mbed_official 324:406fd2029f23 963 #define HW_CRC_GPOLYHU_TOG(x, v) (HW_CRC_GPOLYHU_WR(x, HW_CRC_GPOLYHU_RD(x) ^ (v)))
mbed_official 324:406fd2029f23 964 /*@}*/
mbed_official 324:406fd2029f23 965
mbed_official 324:406fd2029f23 966 /*
mbed_official 324:406fd2029f23 967 * Constants & macros for individual CRC_GPOLYHU bitfields
mbed_official 324:406fd2029f23 968 */
mbed_official 324:406fd2029f23 969
mbed_official 324:406fd2029f23 970 /*!
mbed_official 324:406fd2029f23 971 * @name Register CRC_GPOLYHU, field GPOLYHU[7:0] (RW)
mbed_official 324:406fd2029f23 972 */
mbed_official 324:406fd2029f23 973 /*@{*/
mbed_official 324:406fd2029f23 974 #define BP_CRC_GPOLYHU_GPOLYHU (0U) /*!< Bit position for CRC_GPOLYHU_GPOLYHU. */
mbed_official 324:406fd2029f23 975 #define BM_CRC_GPOLYHU_GPOLYHU (0xFFU) /*!< Bit mask for CRC_GPOLYHU_GPOLYHU. */
mbed_official 324:406fd2029f23 976 #define BS_CRC_GPOLYHU_GPOLYHU (8U) /*!< Bit field size in bits for CRC_GPOLYHU_GPOLYHU. */
mbed_official 324:406fd2029f23 977
mbed_official 324:406fd2029f23 978 /*! @brief Read current value of the CRC_GPOLYHU_GPOLYHU field. */
mbed_official 324:406fd2029f23 979 #define BR_CRC_GPOLYHU_GPOLYHU(x) (HW_CRC_GPOLYHU(x).U)
mbed_official 324:406fd2029f23 980
mbed_official 324:406fd2029f23 981 /*! @brief Format value for bitfield CRC_GPOLYHU_GPOLYHU. */
mbed_official 324:406fd2029f23 982 #define BF_CRC_GPOLYHU_GPOLYHU(v) ((uint8_t)((uint8_t)(v) << BP_CRC_GPOLYHU_GPOLYHU) & BM_CRC_GPOLYHU_GPOLYHU)
mbed_official 324:406fd2029f23 983
mbed_official 324:406fd2029f23 984 /*! @brief Set the GPOLYHU field to a new value. */
mbed_official 324:406fd2029f23 985 #define BW_CRC_GPOLYHU_GPOLYHU(x, v) (HW_CRC_GPOLYHU_WR(x, v))
mbed_official 324:406fd2029f23 986 /*@}*/
mbed_official 324:406fd2029f23 987
mbed_official 324:406fd2029f23 988 /*******************************************************************************
mbed_official 324:406fd2029f23 989 * HW_CRC_CTRL - CRC Control register
mbed_official 324:406fd2029f23 990 ******************************************************************************/
mbed_official 324:406fd2029f23 991
mbed_official 324:406fd2029f23 992 /*!
mbed_official 324:406fd2029f23 993 * @brief HW_CRC_CTRL - CRC Control register (RW)
mbed_official 324:406fd2029f23 994 *
mbed_official 324:406fd2029f23 995 * Reset value: 0x00000000U
mbed_official 324:406fd2029f23 996 *
mbed_official 324:406fd2029f23 997 * This register controls the configuration and working of the CRC module.
mbed_official 324:406fd2029f23 998 * Appropriate bits must be set before starting a new CRC calculation. A new CRC
mbed_official 324:406fd2029f23 999 * calculation is initialized by asserting CTRL[WAS] and then writing the seed into
mbed_official 324:406fd2029f23 1000 * the CRC data register.
mbed_official 324:406fd2029f23 1001 */
mbed_official 324:406fd2029f23 1002 typedef union _hw_crc_ctrl
mbed_official 324:406fd2029f23 1003 {
mbed_official 324:406fd2029f23 1004 uint32_t U;
mbed_official 324:406fd2029f23 1005 struct _hw_crc_ctrl_bitfields
mbed_official 324:406fd2029f23 1006 {
mbed_official 324:406fd2029f23 1007 uint32_t RESERVED0 : 24; /*!< [23:0] */
mbed_official 324:406fd2029f23 1008 uint32_t TCRC : 1; /*!< [24] */
mbed_official 324:406fd2029f23 1009 uint32_t WAS : 1; /*!< [25] Write CRC Data Register As Seed */
mbed_official 324:406fd2029f23 1010 uint32_t FXOR : 1; /*!< [26] Complement Read Of CRC Data Register */
mbed_official 324:406fd2029f23 1011 uint32_t RESERVED1 : 1; /*!< [27] */
mbed_official 324:406fd2029f23 1012 uint32_t TOTR : 2; /*!< [29:28] Type Of Transpose For Read */
mbed_official 324:406fd2029f23 1013 uint32_t TOT : 2; /*!< [31:30] Type Of Transpose For Writes */
mbed_official 324:406fd2029f23 1014 } B;
mbed_official 324:406fd2029f23 1015 } hw_crc_ctrl_t;
mbed_official 324:406fd2029f23 1016
mbed_official 324:406fd2029f23 1017 /*!
mbed_official 324:406fd2029f23 1018 * @name Constants and macros for entire CRC_CTRL register
mbed_official 324:406fd2029f23 1019 */
mbed_official 324:406fd2029f23 1020 /*@{*/
mbed_official 324:406fd2029f23 1021 #define HW_CRC_CTRL_ADDR(x) ((x) + 0x8U)
mbed_official 324:406fd2029f23 1022
mbed_official 324:406fd2029f23 1023 #define HW_CRC_CTRL(x) (*(__IO hw_crc_ctrl_t *) HW_CRC_CTRL_ADDR(x))
mbed_official 324:406fd2029f23 1024 #define HW_CRC_CTRL_RD(x) (HW_CRC_CTRL(x).U)
mbed_official 324:406fd2029f23 1025 #define HW_CRC_CTRL_WR(x, v) (HW_CRC_CTRL(x).U = (v))
mbed_official 324:406fd2029f23 1026 #define HW_CRC_CTRL_SET(x, v) (HW_CRC_CTRL_WR(x, HW_CRC_CTRL_RD(x) | (v)))
mbed_official 324:406fd2029f23 1027 #define HW_CRC_CTRL_CLR(x, v) (HW_CRC_CTRL_WR(x, HW_CRC_CTRL_RD(x) & ~(v)))
mbed_official 324:406fd2029f23 1028 #define HW_CRC_CTRL_TOG(x, v) (HW_CRC_CTRL_WR(x, HW_CRC_CTRL_RD(x) ^ (v)))
mbed_official 324:406fd2029f23 1029 /*@}*/
mbed_official 324:406fd2029f23 1030
mbed_official 324:406fd2029f23 1031 /*
mbed_official 324:406fd2029f23 1032 * Constants & macros for individual CRC_CTRL bitfields
mbed_official 324:406fd2029f23 1033 */
mbed_official 324:406fd2029f23 1034
mbed_official 324:406fd2029f23 1035 /*!
mbed_official 324:406fd2029f23 1036 * @name Register CRC_CTRL, field TCRC[24] (RW)
mbed_official 324:406fd2029f23 1037 *
mbed_official 324:406fd2029f23 1038 * Width of CRC protocol.
mbed_official 324:406fd2029f23 1039 *
mbed_official 324:406fd2029f23 1040 * Values:
mbed_official 324:406fd2029f23 1041 * - 0 - 16-bit CRC protocol.
mbed_official 324:406fd2029f23 1042 * - 1 - 32-bit CRC protocol.
mbed_official 324:406fd2029f23 1043 */
mbed_official 324:406fd2029f23 1044 /*@{*/
mbed_official 324:406fd2029f23 1045 #define BP_CRC_CTRL_TCRC (24U) /*!< Bit position for CRC_CTRL_TCRC. */
mbed_official 324:406fd2029f23 1046 #define BM_CRC_CTRL_TCRC (0x01000000U) /*!< Bit mask for CRC_CTRL_TCRC. */
mbed_official 324:406fd2029f23 1047 #define BS_CRC_CTRL_TCRC (1U) /*!< Bit field size in bits for CRC_CTRL_TCRC. */
mbed_official 324:406fd2029f23 1048
mbed_official 324:406fd2029f23 1049 /*! @brief Read current value of the CRC_CTRL_TCRC field. */
mbed_official 324:406fd2029f23 1050 #define BR_CRC_CTRL_TCRC(x) (BITBAND_ACCESS32(HW_CRC_CTRL_ADDR(x), BP_CRC_CTRL_TCRC))
mbed_official 324:406fd2029f23 1051
mbed_official 324:406fd2029f23 1052 /*! @brief Format value for bitfield CRC_CTRL_TCRC. */
mbed_official 324:406fd2029f23 1053 #define BF_CRC_CTRL_TCRC(v) ((uint32_t)((uint32_t)(v) << BP_CRC_CTRL_TCRC) & BM_CRC_CTRL_TCRC)
mbed_official 324:406fd2029f23 1054
mbed_official 324:406fd2029f23 1055 /*! @brief Set the TCRC field to a new value. */
mbed_official 324:406fd2029f23 1056 #define BW_CRC_CTRL_TCRC(x, v) (BITBAND_ACCESS32(HW_CRC_CTRL_ADDR(x), BP_CRC_CTRL_TCRC) = (v))
mbed_official 324:406fd2029f23 1057 /*@}*/
mbed_official 324:406fd2029f23 1058
mbed_official 324:406fd2029f23 1059 /*!
mbed_official 324:406fd2029f23 1060 * @name Register CRC_CTRL, field WAS[25] (RW)
mbed_official 324:406fd2029f23 1061 *
mbed_official 324:406fd2029f23 1062 * When asserted, a value written to the CRC data register is considered a seed
mbed_official 324:406fd2029f23 1063 * value. When deasserted, a value written to the CRC data register is taken as
mbed_official 324:406fd2029f23 1064 * data for CRC computation.
mbed_official 324:406fd2029f23 1065 *
mbed_official 324:406fd2029f23 1066 * Values:
mbed_official 324:406fd2029f23 1067 * - 0 - Writes to the CRC data register are data values.
mbed_official 324:406fd2029f23 1068 * - 1 - Writes to the CRC data register are seed values.
mbed_official 324:406fd2029f23 1069 */
mbed_official 324:406fd2029f23 1070 /*@{*/
mbed_official 324:406fd2029f23 1071 #define BP_CRC_CTRL_WAS (25U) /*!< Bit position for CRC_CTRL_WAS. */
mbed_official 324:406fd2029f23 1072 #define BM_CRC_CTRL_WAS (0x02000000U) /*!< Bit mask for CRC_CTRL_WAS. */
mbed_official 324:406fd2029f23 1073 #define BS_CRC_CTRL_WAS (1U) /*!< Bit field size in bits for CRC_CTRL_WAS. */
mbed_official 324:406fd2029f23 1074
mbed_official 324:406fd2029f23 1075 /*! @brief Read current value of the CRC_CTRL_WAS field. */
mbed_official 324:406fd2029f23 1076 #define BR_CRC_CTRL_WAS(x) (BITBAND_ACCESS32(HW_CRC_CTRL_ADDR(x), BP_CRC_CTRL_WAS))
mbed_official 324:406fd2029f23 1077
mbed_official 324:406fd2029f23 1078 /*! @brief Format value for bitfield CRC_CTRL_WAS. */
mbed_official 324:406fd2029f23 1079 #define BF_CRC_CTRL_WAS(v) ((uint32_t)((uint32_t)(v) << BP_CRC_CTRL_WAS) & BM_CRC_CTRL_WAS)
mbed_official 324:406fd2029f23 1080
mbed_official 324:406fd2029f23 1081 /*! @brief Set the WAS field to a new value. */
mbed_official 324:406fd2029f23 1082 #define BW_CRC_CTRL_WAS(x, v) (BITBAND_ACCESS32(HW_CRC_CTRL_ADDR(x), BP_CRC_CTRL_WAS) = (v))
mbed_official 324:406fd2029f23 1083 /*@}*/
mbed_official 324:406fd2029f23 1084
mbed_official 324:406fd2029f23 1085 /*!
mbed_official 324:406fd2029f23 1086 * @name Register CRC_CTRL, field FXOR[26] (RW)
mbed_official 324:406fd2029f23 1087 *
mbed_official 324:406fd2029f23 1088 * Some CRC protocols require the final checksum to be XORed with 0xFFFFFFFF or
mbed_official 324:406fd2029f23 1089 * 0xFFFF. Asserting this bit enables on the fly complementing of read data.
mbed_official 324:406fd2029f23 1090 *
mbed_official 324:406fd2029f23 1091 * Values:
mbed_official 324:406fd2029f23 1092 * - 0 - No XOR on reading.
mbed_official 324:406fd2029f23 1093 * - 1 - Invert or complement the read value of the CRC Data register.
mbed_official 324:406fd2029f23 1094 */
mbed_official 324:406fd2029f23 1095 /*@{*/
mbed_official 324:406fd2029f23 1096 #define BP_CRC_CTRL_FXOR (26U) /*!< Bit position for CRC_CTRL_FXOR. */
mbed_official 324:406fd2029f23 1097 #define BM_CRC_CTRL_FXOR (0x04000000U) /*!< Bit mask for CRC_CTRL_FXOR. */
mbed_official 324:406fd2029f23 1098 #define BS_CRC_CTRL_FXOR (1U) /*!< Bit field size in bits for CRC_CTRL_FXOR. */
mbed_official 324:406fd2029f23 1099
mbed_official 324:406fd2029f23 1100 /*! @brief Read current value of the CRC_CTRL_FXOR field. */
mbed_official 324:406fd2029f23 1101 #define BR_CRC_CTRL_FXOR(x) (BITBAND_ACCESS32(HW_CRC_CTRL_ADDR(x), BP_CRC_CTRL_FXOR))
mbed_official 324:406fd2029f23 1102
mbed_official 324:406fd2029f23 1103 /*! @brief Format value for bitfield CRC_CTRL_FXOR. */
mbed_official 324:406fd2029f23 1104 #define BF_CRC_CTRL_FXOR(v) ((uint32_t)((uint32_t)(v) << BP_CRC_CTRL_FXOR) & BM_CRC_CTRL_FXOR)
mbed_official 324:406fd2029f23 1105
mbed_official 324:406fd2029f23 1106 /*! @brief Set the FXOR field to a new value. */
mbed_official 324:406fd2029f23 1107 #define BW_CRC_CTRL_FXOR(x, v) (BITBAND_ACCESS32(HW_CRC_CTRL_ADDR(x), BP_CRC_CTRL_FXOR) = (v))
mbed_official 324:406fd2029f23 1108 /*@}*/
mbed_official 324:406fd2029f23 1109
mbed_official 324:406fd2029f23 1110 /*!
mbed_official 324:406fd2029f23 1111 * @name Register CRC_CTRL, field TOTR[29:28] (RW)
mbed_official 324:406fd2029f23 1112 *
mbed_official 324:406fd2029f23 1113 * Identifies the transpose configuration of the value read from the CRC Data
mbed_official 324:406fd2029f23 1114 * register. See the description of the transpose feature for the available
mbed_official 324:406fd2029f23 1115 * transpose options.
mbed_official 324:406fd2029f23 1116 *
mbed_official 324:406fd2029f23 1117 * Values:
mbed_official 324:406fd2029f23 1118 * - 00 - No transposition.
mbed_official 324:406fd2029f23 1119 * - 01 - Bits in bytes are transposed; bytes are not transposed.
mbed_official 324:406fd2029f23 1120 * - 10 - Both bits in bytes and bytes are transposed.
mbed_official 324:406fd2029f23 1121 * - 11 - Only bytes are transposed; no bits in a byte are transposed.
mbed_official 324:406fd2029f23 1122 */
mbed_official 324:406fd2029f23 1123 /*@{*/
mbed_official 324:406fd2029f23 1124 #define BP_CRC_CTRL_TOTR (28U) /*!< Bit position for CRC_CTRL_TOTR. */
mbed_official 324:406fd2029f23 1125 #define BM_CRC_CTRL_TOTR (0x30000000U) /*!< Bit mask for CRC_CTRL_TOTR. */
mbed_official 324:406fd2029f23 1126 #define BS_CRC_CTRL_TOTR (2U) /*!< Bit field size in bits for CRC_CTRL_TOTR. */
mbed_official 324:406fd2029f23 1127
mbed_official 324:406fd2029f23 1128 /*! @brief Read current value of the CRC_CTRL_TOTR field. */
mbed_official 324:406fd2029f23 1129 #define BR_CRC_CTRL_TOTR(x) (HW_CRC_CTRL(x).B.TOTR)
mbed_official 324:406fd2029f23 1130
mbed_official 324:406fd2029f23 1131 /*! @brief Format value for bitfield CRC_CTRL_TOTR. */
mbed_official 324:406fd2029f23 1132 #define BF_CRC_CTRL_TOTR(v) ((uint32_t)((uint32_t)(v) << BP_CRC_CTRL_TOTR) & BM_CRC_CTRL_TOTR)
mbed_official 324:406fd2029f23 1133
mbed_official 324:406fd2029f23 1134 /*! @brief Set the TOTR field to a new value. */
mbed_official 324:406fd2029f23 1135 #define BW_CRC_CTRL_TOTR(x, v) (HW_CRC_CTRL_WR(x, (HW_CRC_CTRL_RD(x) & ~BM_CRC_CTRL_TOTR) | BF_CRC_CTRL_TOTR(v)))
mbed_official 324:406fd2029f23 1136 /*@}*/
mbed_official 324:406fd2029f23 1137
mbed_official 324:406fd2029f23 1138 /*!
mbed_official 324:406fd2029f23 1139 * @name Register CRC_CTRL, field TOT[31:30] (RW)
mbed_official 324:406fd2029f23 1140 *
mbed_official 324:406fd2029f23 1141 * Defines the transpose configuration of the data written to the CRC data
mbed_official 324:406fd2029f23 1142 * register. See the description of the transpose feature for the available transpose
mbed_official 324:406fd2029f23 1143 * options.
mbed_official 324:406fd2029f23 1144 *
mbed_official 324:406fd2029f23 1145 * Values:
mbed_official 324:406fd2029f23 1146 * - 00 - No transposition.
mbed_official 324:406fd2029f23 1147 * - 01 - Bits in bytes are transposed; bytes are not transposed.
mbed_official 324:406fd2029f23 1148 * - 10 - Both bits in bytes and bytes are transposed.
mbed_official 324:406fd2029f23 1149 * - 11 - Only bytes are transposed; no bits in a byte are transposed.
mbed_official 324:406fd2029f23 1150 */
mbed_official 324:406fd2029f23 1151 /*@{*/
mbed_official 324:406fd2029f23 1152 #define BP_CRC_CTRL_TOT (30U) /*!< Bit position for CRC_CTRL_TOT. */
mbed_official 324:406fd2029f23 1153 #define BM_CRC_CTRL_TOT (0xC0000000U) /*!< Bit mask for CRC_CTRL_TOT. */
mbed_official 324:406fd2029f23 1154 #define BS_CRC_CTRL_TOT (2U) /*!< Bit field size in bits for CRC_CTRL_TOT. */
mbed_official 324:406fd2029f23 1155
mbed_official 324:406fd2029f23 1156 /*! @brief Read current value of the CRC_CTRL_TOT field. */
mbed_official 324:406fd2029f23 1157 #define BR_CRC_CTRL_TOT(x) (HW_CRC_CTRL(x).B.TOT)
mbed_official 324:406fd2029f23 1158
mbed_official 324:406fd2029f23 1159 /*! @brief Format value for bitfield CRC_CTRL_TOT. */
mbed_official 324:406fd2029f23 1160 #define BF_CRC_CTRL_TOT(v) ((uint32_t)((uint32_t)(v) << BP_CRC_CTRL_TOT) & BM_CRC_CTRL_TOT)
mbed_official 324:406fd2029f23 1161
mbed_official 324:406fd2029f23 1162 /*! @brief Set the TOT field to a new value. */
mbed_official 324:406fd2029f23 1163 #define BW_CRC_CTRL_TOT(x, v) (HW_CRC_CTRL_WR(x, (HW_CRC_CTRL_RD(x) & ~BM_CRC_CTRL_TOT) | BF_CRC_CTRL_TOT(v)))
mbed_official 324:406fd2029f23 1164 /*@}*/
mbed_official 324:406fd2029f23 1165 /*******************************************************************************
mbed_official 324:406fd2029f23 1166 * HW_CRC_CTRLHU - CRC_CTRLHU register.
mbed_official 324:406fd2029f23 1167 ******************************************************************************/
mbed_official 324:406fd2029f23 1168
mbed_official 324:406fd2029f23 1169 /*!
mbed_official 324:406fd2029f23 1170 * @brief HW_CRC_CTRLHU - CRC_CTRLHU register. (RW)
mbed_official 324:406fd2029f23 1171 *
mbed_official 324:406fd2029f23 1172 * Reset value: 0x00U
mbed_official 324:406fd2029f23 1173 */
mbed_official 324:406fd2029f23 1174 typedef union _hw_crc_ctrlhu
mbed_official 324:406fd2029f23 1175 {
mbed_official 324:406fd2029f23 1176 uint8_t U;
mbed_official 324:406fd2029f23 1177 struct _hw_crc_ctrlhu_bitfields
mbed_official 324:406fd2029f23 1178 {
mbed_official 324:406fd2029f23 1179 uint8_t TCRC : 1; /*!< [0] */
mbed_official 324:406fd2029f23 1180 uint8_t WAS : 1; /*!< [1] */
mbed_official 324:406fd2029f23 1181 uint8_t FXOR : 1; /*!< [2] */
mbed_official 324:406fd2029f23 1182 uint8_t RESERVED0 : 1; /*!< [3] */
mbed_official 324:406fd2029f23 1183 uint8_t TOTR : 2; /*!< [5:4] */
mbed_official 324:406fd2029f23 1184 uint8_t TOT : 2; /*!< [7:6] */
mbed_official 324:406fd2029f23 1185 } B;
mbed_official 324:406fd2029f23 1186 } hw_crc_ctrlhu_t;
mbed_official 324:406fd2029f23 1187
mbed_official 324:406fd2029f23 1188 /*!
mbed_official 324:406fd2029f23 1189 * @name Constants and macros for entire CRC_CTRLHU register
mbed_official 324:406fd2029f23 1190 */
mbed_official 324:406fd2029f23 1191 /*@{*/
mbed_official 324:406fd2029f23 1192 #define HW_CRC_CTRLHU_ADDR(x) ((x) + 0xBU)
mbed_official 324:406fd2029f23 1193
mbed_official 324:406fd2029f23 1194 #define HW_CRC_CTRLHU(x) (*(__IO hw_crc_ctrlhu_t *) HW_CRC_CTRLHU_ADDR(x))
mbed_official 324:406fd2029f23 1195 #define HW_CRC_CTRLHU_RD(x) (HW_CRC_CTRLHU(x).U)
mbed_official 324:406fd2029f23 1196 #define HW_CRC_CTRLHU_WR(x, v) (HW_CRC_CTRLHU(x).U = (v))
mbed_official 324:406fd2029f23 1197 #define HW_CRC_CTRLHU_SET(x, v) (HW_CRC_CTRLHU_WR(x, HW_CRC_CTRLHU_RD(x) | (v)))
mbed_official 324:406fd2029f23 1198 #define HW_CRC_CTRLHU_CLR(x, v) (HW_CRC_CTRLHU_WR(x, HW_CRC_CTRLHU_RD(x) & ~(v)))
mbed_official 324:406fd2029f23 1199 #define HW_CRC_CTRLHU_TOG(x, v) (HW_CRC_CTRLHU_WR(x, HW_CRC_CTRLHU_RD(x) ^ (v)))
mbed_official 324:406fd2029f23 1200 /*@}*/
mbed_official 324:406fd2029f23 1201
mbed_official 324:406fd2029f23 1202 /*
mbed_official 324:406fd2029f23 1203 * Constants & macros for individual CRC_CTRLHU bitfields
mbed_official 324:406fd2029f23 1204 */
mbed_official 324:406fd2029f23 1205
mbed_official 324:406fd2029f23 1206 /*!
mbed_official 324:406fd2029f23 1207 * @name Register CRC_CTRLHU, field TCRC[0] (RW)
mbed_official 324:406fd2029f23 1208 *
mbed_official 324:406fd2029f23 1209 * Values:
mbed_official 324:406fd2029f23 1210 * - 0 - 16-bit CRC protocol.
mbed_official 324:406fd2029f23 1211 * - 1 - 32-bit CRC protocol.
mbed_official 324:406fd2029f23 1212 */
mbed_official 324:406fd2029f23 1213 /*@{*/
mbed_official 324:406fd2029f23 1214 #define BP_CRC_CTRLHU_TCRC (0U) /*!< Bit position for CRC_CTRLHU_TCRC. */
mbed_official 324:406fd2029f23 1215 #define BM_CRC_CTRLHU_TCRC (0x01U) /*!< Bit mask for CRC_CTRLHU_TCRC. */
mbed_official 324:406fd2029f23 1216 #define BS_CRC_CTRLHU_TCRC (1U) /*!< Bit field size in bits for CRC_CTRLHU_TCRC. */
mbed_official 324:406fd2029f23 1217
mbed_official 324:406fd2029f23 1218 /*! @brief Read current value of the CRC_CTRLHU_TCRC field. */
mbed_official 324:406fd2029f23 1219 #define BR_CRC_CTRLHU_TCRC(x) (BITBAND_ACCESS8(HW_CRC_CTRLHU_ADDR(x), BP_CRC_CTRLHU_TCRC))
mbed_official 324:406fd2029f23 1220
mbed_official 324:406fd2029f23 1221 /*! @brief Format value for bitfield CRC_CTRLHU_TCRC. */
mbed_official 324:406fd2029f23 1222 #define BF_CRC_CTRLHU_TCRC(v) ((uint8_t)((uint8_t)(v) << BP_CRC_CTRLHU_TCRC) & BM_CRC_CTRLHU_TCRC)
mbed_official 324:406fd2029f23 1223
mbed_official 324:406fd2029f23 1224 /*! @brief Set the TCRC field to a new value. */
mbed_official 324:406fd2029f23 1225 #define BW_CRC_CTRLHU_TCRC(x, v) (BITBAND_ACCESS8(HW_CRC_CTRLHU_ADDR(x), BP_CRC_CTRLHU_TCRC) = (v))
mbed_official 324:406fd2029f23 1226 /*@}*/
mbed_official 324:406fd2029f23 1227
mbed_official 324:406fd2029f23 1228 /*!
mbed_official 324:406fd2029f23 1229 * @name Register CRC_CTRLHU, field WAS[1] (RW)
mbed_official 324:406fd2029f23 1230 *
mbed_official 324:406fd2029f23 1231 * Values:
mbed_official 324:406fd2029f23 1232 * - 0 - Writes to CRC data register are data values.
mbed_official 324:406fd2029f23 1233 * - 1 - Writes to CRC data reguster are seed values.
mbed_official 324:406fd2029f23 1234 */
mbed_official 324:406fd2029f23 1235 /*@{*/
mbed_official 324:406fd2029f23 1236 #define BP_CRC_CTRLHU_WAS (1U) /*!< Bit position for CRC_CTRLHU_WAS. */
mbed_official 324:406fd2029f23 1237 #define BM_CRC_CTRLHU_WAS (0x02U) /*!< Bit mask for CRC_CTRLHU_WAS. */
mbed_official 324:406fd2029f23 1238 #define BS_CRC_CTRLHU_WAS (1U) /*!< Bit field size in bits for CRC_CTRLHU_WAS. */
mbed_official 324:406fd2029f23 1239
mbed_official 324:406fd2029f23 1240 /*! @brief Read current value of the CRC_CTRLHU_WAS field. */
mbed_official 324:406fd2029f23 1241 #define BR_CRC_CTRLHU_WAS(x) (BITBAND_ACCESS8(HW_CRC_CTRLHU_ADDR(x), BP_CRC_CTRLHU_WAS))
mbed_official 324:406fd2029f23 1242
mbed_official 324:406fd2029f23 1243 /*! @brief Format value for bitfield CRC_CTRLHU_WAS. */
mbed_official 324:406fd2029f23 1244 #define BF_CRC_CTRLHU_WAS(v) ((uint8_t)((uint8_t)(v) << BP_CRC_CTRLHU_WAS) & BM_CRC_CTRLHU_WAS)
mbed_official 324:406fd2029f23 1245
mbed_official 324:406fd2029f23 1246 /*! @brief Set the WAS field to a new value. */
mbed_official 324:406fd2029f23 1247 #define BW_CRC_CTRLHU_WAS(x, v) (BITBAND_ACCESS8(HW_CRC_CTRLHU_ADDR(x), BP_CRC_CTRLHU_WAS) = (v))
mbed_official 324:406fd2029f23 1248 /*@}*/
mbed_official 324:406fd2029f23 1249
mbed_official 324:406fd2029f23 1250 /*!
mbed_official 324:406fd2029f23 1251 * @name Register CRC_CTRLHU, field FXOR[2] (RW)
mbed_official 324:406fd2029f23 1252 *
mbed_official 324:406fd2029f23 1253 * Values:
mbed_official 324:406fd2029f23 1254 * - 0 - No XOR on reading.
mbed_official 324:406fd2029f23 1255 * - 1 - Invert or complement the read value of CRC data register.
mbed_official 324:406fd2029f23 1256 */
mbed_official 324:406fd2029f23 1257 /*@{*/
mbed_official 324:406fd2029f23 1258 #define BP_CRC_CTRLHU_FXOR (2U) /*!< Bit position for CRC_CTRLHU_FXOR. */
mbed_official 324:406fd2029f23 1259 #define BM_CRC_CTRLHU_FXOR (0x04U) /*!< Bit mask for CRC_CTRLHU_FXOR. */
mbed_official 324:406fd2029f23 1260 #define BS_CRC_CTRLHU_FXOR (1U) /*!< Bit field size in bits for CRC_CTRLHU_FXOR. */
mbed_official 324:406fd2029f23 1261
mbed_official 324:406fd2029f23 1262 /*! @brief Read current value of the CRC_CTRLHU_FXOR field. */
mbed_official 324:406fd2029f23 1263 #define BR_CRC_CTRLHU_FXOR(x) (BITBAND_ACCESS8(HW_CRC_CTRLHU_ADDR(x), BP_CRC_CTRLHU_FXOR))
mbed_official 324:406fd2029f23 1264
mbed_official 324:406fd2029f23 1265 /*! @brief Format value for bitfield CRC_CTRLHU_FXOR. */
mbed_official 324:406fd2029f23 1266 #define BF_CRC_CTRLHU_FXOR(v) ((uint8_t)((uint8_t)(v) << BP_CRC_CTRLHU_FXOR) & BM_CRC_CTRLHU_FXOR)
mbed_official 324:406fd2029f23 1267
mbed_official 324:406fd2029f23 1268 /*! @brief Set the FXOR field to a new value. */
mbed_official 324:406fd2029f23 1269 #define BW_CRC_CTRLHU_FXOR(x, v) (BITBAND_ACCESS8(HW_CRC_CTRLHU_ADDR(x), BP_CRC_CTRLHU_FXOR) = (v))
mbed_official 324:406fd2029f23 1270 /*@}*/
mbed_official 324:406fd2029f23 1271
mbed_official 324:406fd2029f23 1272 /*!
mbed_official 324:406fd2029f23 1273 * @name Register CRC_CTRLHU, field TOTR[5:4] (RW)
mbed_official 324:406fd2029f23 1274 *
mbed_official 324:406fd2029f23 1275 * Values:
mbed_official 324:406fd2029f23 1276 * - 00 - No Transposition.
mbed_official 324:406fd2029f23 1277 * - 01 - Bits in bytes are transposed, bytes are not transposed.
mbed_official 324:406fd2029f23 1278 * - 10 - Both bits in bytes and bytes are transposed.
mbed_official 324:406fd2029f23 1279 * - 11 - Only bytes are transposed; no bits in a byte are transposed.
mbed_official 324:406fd2029f23 1280 */
mbed_official 324:406fd2029f23 1281 /*@{*/
mbed_official 324:406fd2029f23 1282 #define BP_CRC_CTRLHU_TOTR (4U) /*!< Bit position for CRC_CTRLHU_TOTR. */
mbed_official 324:406fd2029f23 1283 #define BM_CRC_CTRLHU_TOTR (0x30U) /*!< Bit mask for CRC_CTRLHU_TOTR. */
mbed_official 324:406fd2029f23 1284 #define BS_CRC_CTRLHU_TOTR (2U) /*!< Bit field size in bits for CRC_CTRLHU_TOTR. */
mbed_official 324:406fd2029f23 1285
mbed_official 324:406fd2029f23 1286 /*! @brief Read current value of the CRC_CTRLHU_TOTR field. */
mbed_official 324:406fd2029f23 1287 #define BR_CRC_CTRLHU_TOTR(x) (HW_CRC_CTRLHU(x).B.TOTR)
mbed_official 324:406fd2029f23 1288
mbed_official 324:406fd2029f23 1289 /*! @brief Format value for bitfield CRC_CTRLHU_TOTR. */
mbed_official 324:406fd2029f23 1290 #define BF_CRC_CTRLHU_TOTR(v) ((uint8_t)((uint8_t)(v) << BP_CRC_CTRLHU_TOTR) & BM_CRC_CTRLHU_TOTR)
mbed_official 324:406fd2029f23 1291
mbed_official 324:406fd2029f23 1292 /*! @brief Set the TOTR field to a new value. */
mbed_official 324:406fd2029f23 1293 #define BW_CRC_CTRLHU_TOTR(x, v) (HW_CRC_CTRLHU_WR(x, (HW_CRC_CTRLHU_RD(x) & ~BM_CRC_CTRLHU_TOTR) | BF_CRC_CTRLHU_TOTR(v)))
mbed_official 324:406fd2029f23 1294 /*@}*/
mbed_official 324:406fd2029f23 1295
mbed_official 324:406fd2029f23 1296 /*!
mbed_official 324:406fd2029f23 1297 * @name Register CRC_CTRLHU, field TOT[7:6] (RW)
mbed_official 324:406fd2029f23 1298 *
mbed_official 324:406fd2029f23 1299 * Values:
mbed_official 324:406fd2029f23 1300 * - 00 - No Transposition.
mbed_official 324:406fd2029f23 1301 * - 01 - Bits in bytes are transposed, bytes are not transposed.
mbed_official 324:406fd2029f23 1302 * - 10 - Both bits in bytes and bytes are transposed.
mbed_official 324:406fd2029f23 1303 * - 11 - Only bytes are transposed; no bits in a byte are transposed.
mbed_official 324:406fd2029f23 1304 */
mbed_official 324:406fd2029f23 1305 /*@{*/
mbed_official 324:406fd2029f23 1306 #define BP_CRC_CTRLHU_TOT (6U) /*!< Bit position for CRC_CTRLHU_TOT. */
mbed_official 324:406fd2029f23 1307 #define BM_CRC_CTRLHU_TOT (0xC0U) /*!< Bit mask for CRC_CTRLHU_TOT. */
mbed_official 324:406fd2029f23 1308 #define BS_CRC_CTRLHU_TOT (2U) /*!< Bit field size in bits for CRC_CTRLHU_TOT. */
mbed_official 324:406fd2029f23 1309
mbed_official 324:406fd2029f23 1310 /*! @brief Read current value of the CRC_CTRLHU_TOT field. */
mbed_official 324:406fd2029f23 1311 #define BR_CRC_CTRLHU_TOT(x) (HW_CRC_CTRLHU(x).B.TOT)
mbed_official 324:406fd2029f23 1312
mbed_official 324:406fd2029f23 1313 /*! @brief Format value for bitfield CRC_CTRLHU_TOT. */
mbed_official 324:406fd2029f23 1314 #define BF_CRC_CTRLHU_TOT(v) ((uint8_t)((uint8_t)(v) << BP_CRC_CTRLHU_TOT) & BM_CRC_CTRLHU_TOT)
mbed_official 324:406fd2029f23 1315
mbed_official 324:406fd2029f23 1316 /*! @brief Set the TOT field to a new value. */
mbed_official 324:406fd2029f23 1317 #define BW_CRC_CTRLHU_TOT(x, v) (HW_CRC_CTRLHU_WR(x, (HW_CRC_CTRLHU_RD(x) & ~BM_CRC_CTRLHU_TOT) | BF_CRC_CTRLHU_TOT(v)))
mbed_official 324:406fd2029f23 1318 /*@}*/
mbed_official 324:406fd2029f23 1319
mbed_official 324:406fd2029f23 1320 /*
mbed_official 324:406fd2029f23 1321 ** Start of section using anonymous unions
mbed_official 324:406fd2029f23 1322 */
mbed_official 324:406fd2029f23 1323
mbed_official 324:406fd2029f23 1324 #if defined(__ARMCC_VERSION)
mbed_official 324:406fd2029f23 1325 #pragma push
mbed_official 324:406fd2029f23 1326 #pragma anon_unions
mbed_official 324:406fd2029f23 1327 #elif defined(__CWCC__)
mbed_official 324:406fd2029f23 1328 #pragma push
mbed_official 324:406fd2029f23 1329 #pragma cpp_extensions on
mbed_official 324:406fd2029f23 1330 #elif defined(__GNUC__)
mbed_official 324:406fd2029f23 1331 /* anonymous unions are enabled by default */
mbed_official 324:406fd2029f23 1332 #elif defined(__IAR_SYSTEMS_ICC__)
mbed_official 324:406fd2029f23 1333 #pragma language=extended
mbed_official 324:406fd2029f23 1334 #else
mbed_official 324:406fd2029f23 1335 #error Not supported compiler type
mbed_official 324:406fd2029f23 1336 #endif
mbed_official 324:406fd2029f23 1337
mbed_official 324:406fd2029f23 1338 /*******************************************************************************
mbed_official 324:406fd2029f23 1339 * hw_crc_t - module struct
mbed_official 324:406fd2029f23 1340 ******************************************************************************/
mbed_official 324:406fd2029f23 1341 /*!
mbed_official 324:406fd2029f23 1342 * @brief All CRC module registers.
mbed_official 324:406fd2029f23 1343 */
mbed_official 324:406fd2029f23 1344 #pragma pack(1)
mbed_official 324:406fd2029f23 1345 typedef struct _hw_crc
mbed_official 324:406fd2029f23 1346 {
mbed_official 324:406fd2029f23 1347 union {
mbed_official 324:406fd2029f23 1348 struct {
mbed_official 324:406fd2029f23 1349 __IO hw_crc_datal_t DATAL; /*!< [0x0] CRC_DATAL register. */
mbed_official 324:406fd2029f23 1350 __IO hw_crc_datah_t DATAH; /*!< [0x2] CRC_DATAH register. */
mbed_official 324:406fd2029f23 1351 } ACCESS16BIT;
mbed_official 324:406fd2029f23 1352 struct {
mbed_official 324:406fd2029f23 1353 __IO hw_crc_datall_t DATALL; /*!< [0x0] CRC_DATALL register. */
mbed_official 324:406fd2029f23 1354 __IO hw_crc_datalu_t DATALU; /*!< [0x1] CRC_DATALU register. */
mbed_official 324:406fd2029f23 1355 __IO hw_crc_datahl_t DATAHL; /*!< [0x2] CRC_DATAHL register. */
mbed_official 324:406fd2029f23 1356 __IO hw_crc_datahu_t DATAHU; /*!< [0x3] CRC_DATAHU register. */
mbed_official 324:406fd2029f23 1357 } ACCESS8BIT;
mbed_official 324:406fd2029f23 1358 __IO hw_crc_data_t DATA; /*!< [0x0] CRC Data register */
mbed_official 324:406fd2029f23 1359 };
mbed_official 324:406fd2029f23 1360 union {
mbed_official 324:406fd2029f23 1361 __IO hw_crc_gpoly_t GPOLY; /*!< [0x4] CRC Polynomial register */
mbed_official 324:406fd2029f23 1362 struct {
mbed_official 324:406fd2029f23 1363 __IO hw_crc_gpolyl_t GPOLYL; /*!< [0x4] CRC_GPOLYL register. */
mbed_official 324:406fd2029f23 1364 __IO hw_crc_gpolyh_t GPOLYH; /*!< [0x6] CRC_GPOLYH register. */
mbed_official 324:406fd2029f23 1365 } GPOLY_ACCESS16BIT;
mbed_official 324:406fd2029f23 1366 struct {
mbed_official 324:406fd2029f23 1367 __IO hw_crc_gpolyll_t GPOLYLL; /*!< [0x4] CRC_GPOLYLL register. */
mbed_official 324:406fd2029f23 1368 __IO hw_crc_gpolylu_t GPOLYLU; /*!< [0x5] CRC_GPOLYLU register. */
mbed_official 324:406fd2029f23 1369 __IO hw_crc_gpolyhl_t GPOLYHL; /*!< [0x6] CRC_GPOLYHL register. */
mbed_official 324:406fd2029f23 1370 __IO hw_crc_gpolyhu_t GPOLYHU; /*!< [0x7] CRC_GPOLYHU register. */
mbed_official 324:406fd2029f23 1371 } GPOLY_ACCESS8BIT;
mbed_official 324:406fd2029f23 1372 };
mbed_official 324:406fd2029f23 1373 union {
mbed_official 324:406fd2029f23 1374 __IO hw_crc_ctrl_t CTRL; /*!< [0x8] CRC Control register */
mbed_official 324:406fd2029f23 1375 struct {
mbed_official 324:406fd2029f23 1376 uint8_t _reserved0[3];
mbed_official 324:406fd2029f23 1377 __IO hw_crc_ctrlhu_t CTRLHU; /*!< [0xB] CRC_CTRLHU register. */
mbed_official 324:406fd2029f23 1378 } CTRL_ACCESS8BIT;
mbed_official 324:406fd2029f23 1379 };
mbed_official 324:406fd2029f23 1380 } hw_crc_t;
mbed_official 324:406fd2029f23 1381 #pragma pack()
mbed_official 324:406fd2029f23 1382
mbed_official 324:406fd2029f23 1383 /*! @brief Macro to access all CRC registers. */
mbed_official 324:406fd2029f23 1384 /*! @param x CRC module instance base address. */
mbed_official 324:406fd2029f23 1385 /*! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
mbed_official 324:406fd2029f23 1386 * use the '&' operator, like <code>&HW_CRC(CRC_BASE)</code>. */
mbed_official 324:406fd2029f23 1387 #define HW_CRC(x) (*(hw_crc_t *)(x))
mbed_official 324:406fd2029f23 1388
mbed_official 324:406fd2029f23 1389 /*
mbed_official 324:406fd2029f23 1390 ** End of section using anonymous unions
mbed_official 324:406fd2029f23 1391 */
mbed_official 324:406fd2029f23 1392
mbed_official 324:406fd2029f23 1393 #if defined(__ARMCC_VERSION)
mbed_official 324:406fd2029f23 1394 #pragma pop
mbed_official 324:406fd2029f23 1395 #elif defined(__CWCC__)
mbed_official 324:406fd2029f23 1396 #pragma pop
mbed_official 324:406fd2029f23 1397 #elif defined(__GNUC__)
mbed_official 324:406fd2029f23 1398 /* leave anonymous unions enabled */
mbed_official 324:406fd2029f23 1399 #elif defined(__IAR_SYSTEMS_ICC__)
mbed_official 324:406fd2029f23 1400 #pragma language=default
mbed_official 324:406fd2029f23 1401 #else
mbed_official 324:406fd2029f23 1402 #error Not supported compiler type
mbed_official 324:406fd2029f23 1403 #endif
mbed_official 324:406fd2029f23 1404
mbed_official 324:406fd2029f23 1405 #endif /* __HW_CRC_REGISTERS_H__ */
mbed_official 324:406fd2029f23 1406 /* EOF */