1 ////////////////////////////////////////////////////////////////////////////////
2 /// @file     reg_crc.h
3 /// @author   AE TEAM
4 /// @brief    THIS FILE CONTAINS ALL THE FUNCTIONS PROTOTYPES FOR THE SERIES OF
5 ///           MM32 FIRMWARE LIBRARY.
6 ////////////////////////////////////////////////////////////////////////////////
7 /// @attention
8 ///
9 /// THE EXISTING FIRMWARE IS ONLY FOR REFERENCE, WHICH IS DESIGNED TO PROVIDE
10 /// CUSTOMERS WITH CODING INFORMATION ABOUT THEIR PRODUCTS SO THEY CAN SAVE
11 /// TIME. THEREFORE, MINDMOTION SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT OR
12 /// CONSEQUENTIAL DAMAGES ABOUT ANY CLAIMS ARISING OUT OF THE CONTENT OF SUCH
13 /// HARDWARE AND/OR THE USE OF THE CODING INFORMATION CONTAINED HEREIN IN
14 /// CONNECTION WITH PRODUCTS MADE BY CUSTOMERS.
15 ///
16 /// <H2><CENTER>&COPY; COPYRIGHT MINDMOTION </CENTER></H2>
17 ////////////////////////////////////////////////////////////////////////////////
18 
19 // Define to prevent recursive inclusion
20 
21 #ifndef __REG_CRC_H
22 #define __REG_CRC_H
23 
24 // Files includes
25 #include <stdint.h>
26 #include <stdbool.h>
27 #include "types.h"
28 
29 
30 
31 
32 #if defined ( __CC_ARM )
33 #pragma anon_unions
34 #endif
35 
36 
37 
38 
39 
40 
41 
42 ////////////////////////////////////////////////////////////////////////////////
43 /// @brief CRC Base Address Definition
44 ////////////////////////////////////////////////////////////////////////////////
45 #define CRC_BASE                        (AHBPERIPH_BASE + 0x3000)               ///< Base Address: 0x40023000
46 
47 
48 
49 
50 ////////////////////////////////////////////////////////////////////////////////
51 /// @brief CRC Register Structure Definition
52 ////////////////////////////////////////////////////////////////////////////////
53 typedef struct {
54     __IO u32   DR;                                                              ///< CRC data register,                             offset: 0x00
55     __IO u32   IDR;                                                             ///< CRC independent data register,                 offset: 0x04
56     __IO u32   CR;                                                              ///< CRC control register,                          offset: 0x08
57     __IO u32   MIR;                                                              ///< Middle data register,                          offset: 0x08
58 } CRC_TypeDef;
59 
60 
61 
62 ////////////////////////////////////////////////////////////////////////////////
63 /// @brief CRC type pointer Definition
64 ////////////////////////////////////////////////////////////////////////////////
65 #define CRC                             ((CRC_TypeDef*) CRC_BASE)
66 
67 
68 
69 ////////////////////////////////////////////////////////////////////////////////
70 /// @brief CRC_DR Register Bit Definition
71 ////////////////////////////////////////////////////////////////////////////////
72 #define CRC_DR_DATA_Pos                 (0)
73 #define CRC_DR_DATA                     (0xFFFFFFFFU << CRC_DR_DATA_Pos)        ///< Data register bits
74 ////////////////////////////////////////////////////////////////////////////////
75 /// @brief CRC_IDR Register Bit Definition
76 ////////////////////////////////////////////////////////////////////////////////
77 #define CRC_IDR_DATA_Pos                (0)
78 #define CRC_IDR_DATA                    (0xFFU << CRC_IDR_DATA_Pos)             ///< General-purpose 8-bit data register bits
79 
80 ////////////////////////////////////////////////////////////////////////////////
81 /// @brief CRC_CTRL Register Bit Definition
82 ////////////////////////////////////////////////////////////////////////////////
83 #define CRC_CR_RESET_Pos                (0)
84 #define CRC_CR_RESET                    (0x01U << CRC_CR_RESET_Pos)             ///< RESET bit
85 ////////////////////////////////////////////////////////////////////////////////
86 /// @brief CRC_MIR Register Bit Definition
87 ////////////////////////////////////////////////////////////////////////////////
88 #define CRC_MIR_Pos                 (0)
89 #define CRC_MIR                     (0xFFFFFFFFU << CRC_MIR_Pos)        ///< Middle data register
90 
91 
92 
93 
94 /// @}
95 
96 /// @}
97 
98 /// @}
99 
100 ////////////////////////////////////////////////////////////////////////////////
101 #endif
102 ////////////////////////////////////////////////////////////////////////////////
103