1 /** 2 * @file crc_regs.h 3 * @brief Registers, Bit Masks and Bit Positions for the CRC Peripheral Module. 4 * @note This file is @generated. 5 * @ingroup crc_registers 6 */ 7 8 /****************************************************************************** 9 * 10 * Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by 11 * Analog Devices, Inc.), 12 * Copyright (C) 2023-2024 Analog Devices, Inc. 13 * 14 * Licensed under the Apache License, Version 2.0 (the "License"); 15 * you may not use this file except in compliance with the License. 16 * You may obtain a copy of the License at 17 * 18 * http://www.apache.org/licenses/LICENSE-2.0 19 * 20 * Unless required by applicable law or agreed to in writing, software 21 * distributed under the License is distributed on an "AS IS" BASIS, 22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 * See the License for the specific language governing permissions and 24 * limitations under the License. 25 * 26 ******************************************************************************/ 27 28 #ifndef LIBRARIES_CMSIS_DEVICE_MAXIM_MAX32675_INCLUDE_CRC_REGS_H_ 29 #define LIBRARIES_CMSIS_DEVICE_MAXIM_MAX32675_INCLUDE_CRC_REGS_H_ 30 31 /* **** Includes **** */ 32 #include <stdint.h> 33 34 #ifdef __cplusplus 35 extern "C" { 36 #endif 37 38 #if defined (__ICCARM__) 39 #pragma system_include 40 #endif 41 42 #if defined (__CC_ARM) 43 #pragma anon_unions 44 #endif 45 /// @cond 46 /* 47 If types are not defined elsewhere (CMSIS) define them here 48 */ 49 #ifndef __IO 50 #define __IO volatile 51 #endif 52 #ifndef __I 53 #define __I volatile const 54 #endif 55 #ifndef __O 56 #define __O volatile 57 #endif 58 #ifndef __R 59 #define __R volatile const 60 #endif 61 /// @endcond 62 63 /* **** Definitions **** */ 64 65 /** 66 * @ingroup crc 67 * @defgroup crc_registers CRC_Registers 68 * @brief Registers, Bit Masks and Bit Positions for the CRC Peripheral Module. 69 * @details CRC Registers. 70 */ 71 72 /** 73 * @ingroup crc_registers 74 * Structure type to access the CRC Registers. 75 */ 76 typedef struct { 77 __IO uint32_t ctrl; /**< <tt>\b 0x0000:</tt> CRC CTRL Register */ 78 union { 79 __IO uint32_t datain32; /**< <tt>\b 0x0004:</tt> CRC DATAIN32 Register */ 80 __IO uint16_t datain16[2]; /**< <tt>\b 0x0004:</tt> CRC DATAIN16 Register */ 81 __IO uint8_t datain8[4]; /**< <tt>\b 0x0004:</tt> CRC DATAIN8 Register */ 82 }; 83 __IO uint32_t poly; /**< <tt>\b 0x0008:</tt> CRC POLY Register */ 84 __IO uint32_t val; /**< <tt>\b 0x000C:</tt> CRC VAL Register */ 85 } mxc_crc_regs_t; 86 87 /* Register offsets for module CRC */ 88 /** 89 * @ingroup crc_registers 90 * @defgroup CRC_Register_Offsets Register Offsets 91 * @brief CRC Peripheral Register Offsets from the CRC Base Peripheral Address. 92 * @{ 93 */ 94 #define MXC_R_CRC_CTRL ((uint32_t)0x00000000UL) /**< Offset from CRC Base Address: <tt> 0x0000</tt> */ 95 #define MXC_R_CRC_DATAIN32 ((uint32_t)0x00000004UL) /**< Offset from CRC Base Address: <tt> 0x0004</tt> */ 96 #define MXC_R_CRC_DATAIN16 ((uint32_t)0x00000004UL) /**< Offset from CRC Base Address: <tt> 0x0004</tt> */ 97 #define MXC_R_CRC_DATAIN8 ((uint32_t)0x00000004UL) /**< Offset from CRC Base Address: <tt> 0x0004</tt> */ 98 #define MXC_R_CRC_POLY ((uint32_t)0x00000008UL) /**< Offset from CRC Base Address: <tt> 0x0008</tt> */ 99 #define MXC_R_CRC_VAL ((uint32_t)0x0000000CUL) /**< Offset from CRC Base Address: <tt> 0x000C</tt> */ 100 /**@} end of group crc_registers */ 101 102 /** 103 * @ingroup crc_registers 104 * @defgroup CRC_CTRL CRC_CTRL 105 * @brief CRC Control 106 * @{ 107 */ 108 #define MXC_F_CRC_CTRL_EN_POS 0 /**< CTRL_EN Position */ 109 #define MXC_F_CRC_CTRL_EN ((uint32_t)(0x1UL << MXC_F_CRC_CTRL_EN_POS)) /**< CTRL_EN Mask */ 110 111 #define MXC_F_CRC_CTRL_DMA_EN_POS 1 /**< CTRL_DMA_EN Position */ 112 #define MXC_F_CRC_CTRL_DMA_EN ((uint32_t)(0x1UL << MXC_F_CRC_CTRL_DMA_EN_POS)) /**< CTRL_DMA_EN Mask */ 113 114 #define MXC_F_CRC_CTRL_MSB_POS 2 /**< CTRL_MSB Position */ 115 #define MXC_F_CRC_CTRL_MSB ((uint32_t)(0x1UL << MXC_F_CRC_CTRL_MSB_POS)) /**< CTRL_MSB Mask */ 116 117 #define MXC_F_CRC_CTRL_BYTE_SWAP_IN_POS 3 /**< CTRL_BYTE_SWAP_IN Position */ 118 #define MXC_F_CRC_CTRL_BYTE_SWAP_IN ((uint32_t)(0x1UL << MXC_F_CRC_CTRL_BYTE_SWAP_IN_POS)) /**< CTRL_BYTE_SWAP_IN Mask */ 119 120 #define MXC_F_CRC_CTRL_BYTE_SWAP_OUT_POS 4 /**< CTRL_BYTE_SWAP_OUT Position */ 121 #define MXC_F_CRC_CTRL_BYTE_SWAP_OUT ((uint32_t)(0x1UL << MXC_F_CRC_CTRL_BYTE_SWAP_OUT_POS)) /**< CTRL_BYTE_SWAP_OUT Mask */ 122 123 #define MXC_F_CRC_CTRL_BUSY_POS 16 /**< CTRL_BUSY Position */ 124 #define MXC_F_CRC_CTRL_BUSY ((uint32_t)(0x1UL << MXC_F_CRC_CTRL_BUSY_POS)) /**< CTRL_BUSY Mask */ 125 126 /**@} end of group CRC_CTRL_Register */ 127 128 /** 129 * @ingroup crc_registers 130 * @defgroup CRC_DATAIN32 CRC_DATAIN32 131 * @brief CRC Data Input 132 * @{ 133 */ 134 #define MXC_F_CRC_DATAIN32_DATA_POS 0 /**< DATAIN32_DATA Position */ 135 #define MXC_F_CRC_DATAIN32_DATA ((uint32_t)(0xFFFFFFFFUL << MXC_F_CRC_DATAIN32_DATA_POS)) /**< DATAIN32_DATA Mask */ 136 137 /**@} end of group CRC_DATAIN32_Register */ 138 139 /** 140 * @ingroup crc_registers 141 * @defgroup CRC_DATAIN16 CRC_DATAIN16 142 * @brief CRC Data Input 143 * @{ 144 */ 145 #define MXC_F_CRC_DATAIN16_DATA_POS 0 /**< DATAIN16_DATA Position */ 146 #define MXC_F_CRC_DATAIN16_DATA ((uint16_t)(0xFFFFUL << MXC_F_CRC_DATAIN16_DATA_POS)) /**< DATAIN16_DATA Mask */ 147 148 /**@} end of group CRC_DATAIN16_Register */ 149 150 /** 151 * @ingroup crc_registers 152 * @defgroup CRC_DATAIN8 CRC_DATAIN8 153 * @brief CRC Data Input 154 * @{ 155 */ 156 #define MXC_F_CRC_DATAIN8_DATA_POS 0 /**< DATAIN8_DATA Position */ 157 #define MXC_F_CRC_DATAIN8_DATA ((uint8_t)(0xFFUL << MXC_F_CRC_DATAIN8_DATA_POS)) /**< DATAIN8_DATA Mask */ 158 159 /**@} end of group CRC_DATAIN8_Register */ 160 161 /** 162 * @ingroup crc_registers 163 * @defgroup CRC_POLY CRC_POLY 164 * @brief CRC Polynomial 165 * @{ 166 */ 167 #define MXC_F_CRC_POLY_POLY_POS 0 /**< POLY_POLY Position */ 168 #define MXC_F_CRC_POLY_POLY ((uint32_t)(0xFFFFFFFFUL << MXC_F_CRC_POLY_POLY_POS)) /**< POLY_POLY Mask */ 169 170 /**@} end of group CRC_POLY_Register */ 171 172 /** 173 * @ingroup crc_registers 174 * @defgroup CRC_VAL CRC_VAL 175 * @brief Current CRC Value 176 * @{ 177 */ 178 #define MXC_F_CRC_VAL_VALUE_POS 0 /**< VAL_VALUE Position */ 179 #define MXC_F_CRC_VAL_VALUE ((uint32_t)(0xFFFFFFFFUL << MXC_F_CRC_VAL_VALUE_POS)) /**< VAL_VALUE Mask */ 180 181 /**@} end of group CRC_VAL_Register */ 182 183 #ifdef __cplusplus 184 } 185 #endif 186 187 #endif // LIBRARIES_CMSIS_DEVICE_MAXIM_MAX32675_INCLUDE_CRC_REGS_H_ 188