Robobo
component_crccu.h
1 /* ----------------------------------------------------------------------------
2  * SAM Software Package License
3  * ----------------------------------------------------------------------------
4  * Copyright (c) 2012, Atmel Corporation
5  *
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following condition is met:
10  *
11  * - Redistributions of source code must retain the above copyright notice,
12  * this list of conditions and the disclaimer below.
13  *
14  * Atmel's name may not be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
20  * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
23  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  * ----------------------------------------------------------------------------
28  */
29 
30 #ifndef _SAM3S8_CRCCU_COMPONENT_
31 #define _SAM3S8_CRCCU_COMPONENT_
32 
33 /* ============================================================================= */
35 /* ============================================================================= */
38 
39 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
40 
41 typedef struct {
42  RwReg CRCCU_DSCR;
43  RoReg Reserved1[1];
44  WoReg CRCCU_DMA_EN;
45  WoReg CRCCU_DMA_DIS;
46  RoReg CRCCU_DMA_SR;
47  WoReg CRCCU_DMA_IER;
48  WoReg CRCCU_DMA_IDR;
49  RoReg CRCCU_DMA_IMR;
50  RoReg CRCCU_DMA_ISR;
51  RoReg Reserved2[4];
52  WoReg CRCCU_CR;
53  RwReg CRCCU_MR;
54  RoReg CRCCU_SR;
55  WoReg CRCCU_IER;
56  WoReg CRCCU_IDR;
57  RoReg CRCCU_IMR;
58  RoReg CRCCU_ISR;
59 } Crccu;
60 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
61 /* -------- CRCCU_DSCR : (CRCCU Offset: 0x00000000) CRCCU Descriptor Base Register -------- */
62 #define CRCCU_DSCR_DSCR_Pos 9
63 #define CRCCU_DSCR_DSCR_Msk (0x7fffffu << CRCCU_DSCR_DSCR_Pos)
64 #define CRCCU_DSCR_DSCR(value) ((CRCCU_DSCR_DSCR_Msk & ((value) << CRCCU_DSCR_DSCR_Pos)))
65 /* -------- CRCCU_DMA_EN : (CRCCU Offset: 0x00000008) CRCCU DMA Enable Register -------- */
66 #define CRCCU_DMA_EN_DMAEN (0x1u << 0)
67 /* -------- CRCCU_DMA_DIS : (CRCCU Offset: 0x0000000C) CRCCU DMA Disable Register -------- */
68 #define CRCCU_DMA_DIS_DMADIS (0x1u << 0)
69 /* -------- CRCCU_DMA_SR : (CRCCU Offset: 0x00000010) CRCCU DMA Status Register -------- */
70 #define CRCCU_DMA_SR_DMASR (0x1u << 0)
71 /* -------- CRCCU_DMA_IER : (CRCCU Offset: 0x00000014) CRCCU DMA Interrupt Enable Register -------- */
72 #define CRCCU_DMA_IER_DMAIER (0x1u << 0)
73 /* -------- CRCCU_DMA_IDR : (CRCCU Offset: 0x00000018) CRCCU DMA Interrupt Disable Register -------- */
74 #define CRCCU_DMA_IDR_DMAIDR (0x1u << 0)
75 /* -------- CRCCU_DMA_IMR : (CRCCU Offset: 0x0000001C) CRCCU DMA Interrupt Mask Register -------- */
76 #define CRCCU_DMA_IMR_DMAIMR (0x1u << 0)
77 /* -------- CRCCU_DMA_ISR : (CRCCU Offset: 0x00000020) CRCCU DMA Interrupt Status Register -------- */
78 #define CRCCU_DMA_ISR_DMAISR (0x1u << 0)
79 /* -------- CRCCU_CR : (CRCCU Offset: 0x00000034) CRCCU Control Register -------- */
80 #define CRCCU_CR_RESET (0x1u << 0)
81 /* -------- CRCCU_MR : (CRCCU Offset: 0x00000038) CRCCU Mode Register -------- */
82 #define CRCCU_MR_ENABLE (0x1u << 0)
83 #define CRCCU_MR_COMPARE (0x1u << 1)
84 #define CRCCU_MR_PTYPE_Pos 2
85 #define CRCCU_MR_PTYPE_Msk (0x3u << CRCCU_MR_PTYPE_Pos)
86 #define CRCCU_MR_PTYPE_CCITT8023 (0x0u << 2)
87 #define CRCCU_MR_PTYPE_CASTAGNOLI (0x1u << 2)
88 #define CRCCU_MR_PTYPE_CCITT16 (0x2u << 2)
89 #define CRCCU_MR_DIVIDER_Pos 4
90 #define CRCCU_MR_DIVIDER_Msk (0xfu << CRCCU_MR_DIVIDER_Pos)
91 #define CRCCU_MR_DIVIDER(value) ((CRCCU_MR_DIVIDER_Msk & ((value) << CRCCU_MR_DIVIDER_Pos)))
92 /* -------- CRCCU_SR : (CRCCU Offset: 0x0000003C) CRCCU Status Register -------- */
93 #define CRCCU_SR_CRC_Pos 0
94 #define CRCCU_SR_CRC_Msk (0xffffffffu << CRCCU_SR_CRC_Pos)
95 /* -------- CRCCU_IER : (CRCCU Offset: 0x00000040) CRCCU Interrupt Enable Register -------- */
96 #define CRCCU_IER_ERRIER (0x1u << 0)
97 /* -------- CRCCU_IDR : (CRCCU Offset: 0x00000044) CRCCU Interrupt Disable Register -------- */
98 #define CRCCU_IDR_ERRIDR (0x1u << 0)
99 /* -------- CRCCU_IMR : (CRCCU Offset: 0x00000048) CRCCU Interrupt Mask Register -------- */
100 #define CRCCU_IMR_ERRIMR (0x1u << 0)
101 /* -------- CRCCU_ISR : (CRCCU Offset: 0x0000004C) CRCCU Interrupt Status Register -------- */
102 #define CRCCU_ISR_ERRISR (0x1u << 0)
105 
106 
107 #endif /* _SAM3S8_CRCCU_COMPONENT_ */
volatile uint32_t RwReg
Definition: sam3n00a.h:54
volatile uint32_t WoReg
Definition: sam3n00a.h:53
Crccu hardware registers.
Definition: component_crccu.h:41
volatile const uint32_t RoReg
Definition: sam3n00a.h:49