Robobo
component_dacc.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 _SAM3N_DACC_COMPONENT_
31 #define _SAM3N_DACC_COMPONENT_
32 
33 /* ============================================================================= */
35 /* ============================================================================= */
38 
39 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
40 
41 typedef struct {
49  RoReg Reserved1[50];
52  RoReg Reserved2[7];
55  RoReg Reserved3[2];
60 } Dacc;
61 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
62 /* -------- DACC_CR : (DACC Offset: 0x00) Control Register -------- */
63 #define DACC_CR_SWRST (0x1u << 0)
64 /* -------- DACC_MR : (DACC Offset: 0x04) Mode Register -------- */
65 #define DACC_MR_TRGEN (0x1u << 0)
66 #define DACC_MR_TRGSEL_Pos 1
67 #define DACC_MR_TRGSEL_Msk (0x7u << DACC_MR_TRGSEL_Pos)
68 #define DACC_MR_TRGSEL_TRGSEL0 (0x0u << 1)
69 #define DACC_MR_TRGSEL_TRGSEL1 (0x1u << 1)
70 #define DACC_MR_TRGSEL_TRGSEL2 (0x2u << 1)
71 #define DACC_MR_TRGSEL_TRGSEL3 (0x3u << 1)
72 #define DACC_MR_DACEN (0x1u << 4)
73 #define DACC_MR_WORD (0x1u << 5)
74 #define DACC_MR_STARTUP_Pos 8
75 #define DACC_MR_STARTUP_Msk (0xffu << DACC_MR_STARTUP_Pos)
76 #define DACC_MR_STARTUP(value) ((DACC_MR_STARTUP_Msk & ((value) << DACC_MR_STARTUP_Pos)))
77 #define DACC_MR_CLKDIV_Pos 16
78 #define DACC_MR_CLKDIV_Msk (0xffffu << DACC_MR_CLKDIV_Pos)
79 #define DACC_MR_CLKDIV(value) ((DACC_MR_CLKDIV_Msk & ((value) << DACC_MR_CLKDIV_Pos)))
80 /* -------- DACC_CDR : (DACC Offset: 0x08) Conversion Data Register -------- */
81 #define DACC_CDR_DATA_Pos 0
82 #define DACC_CDR_DATA_Msk (0xffffffffu << DACC_CDR_DATA_Pos)
83 #define DACC_CDR_DATA(value) ((DACC_CDR_DATA_Msk & ((value) << DACC_CDR_DATA_Pos)))
84 /* -------- DACC_IER : (DACC Offset: 0x0C) Interrupt Enable Register -------- */
85 #define DACC_IER_TXRDY (0x1u << 0)
86 #define DACC_IER_ENDTX (0x1u << 1)
87 #define DACC_IER_TXBUFE (0x1u << 2)
88 /* -------- DACC_IDR : (DACC Offset: 0x10) Interrupt Disable Register -------- */
89 #define DACC_IDR_TXRDY (0x1u << 0)
90 #define DACC_IDR_ENDTX (0x1u << 1)
91 #define DACC_IDR_TXBUFE (0x1u << 2)
92 /* -------- DACC_IMR : (DACC Offset: 0x14) Interrupt Mask Register -------- */
93 #define DACC_IMR_TXRDY (0x1u << 0)
94 #define DACC_IMR_ENDTX (0x1u << 1)
95 #define DACC_IMR_TXBUFE (0x1u << 2)
96 /* -------- DACC_ISR : (DACC Offset: 0x18) Interrupt Status Register -------- */
97 #define DACC_ISR_TXRDY (0x1u << 0)
98 #define DACC_ISR_ENDTX (0x1u << 1)
99 #define DACC_ISR_TXBUFE (0x1u << 2)
100 /* -------- DACC_WPMR : (DACC Offset: 0xE4) Write Protect Mode Register -------- */
101 #define DACC_WPMR_WPEN (0x1u << 0)
102 #define DACC_WPMR_WPKEY_Pos 8
103 #define DACC_WPMR_WPKEY_Msk (0xffffffu << DACC_WPMR_WPKEY_Pos)
104 #define DACC_WPMR_WPKEY(value) ((DACC_WPMR_WPKEY_Msk & ((value) << DACC_WPMR_WPKEY_Pos)))
105 /* -------- DACC_WPSR : (DACC Offset: 0xE8) Write Protect Status Register -------- */
106 #define DACC_WPSR_WPROTERR (0x1u << 0)
107 #define DACC_WPSR_WPROTADDR_Pos 8
108 #define DACC_WPSR_WPROTADDR_Msk (0xffu << DACC_WPSR_WPROTADDR_Pos)
109 /* -------- DACC_TPR : (DACC Offset: 0x108) Transmit Pointer Register -------- */
110 #define DACC_TPR_TXPTR_Pos 0
111 #define DACC_TPR_TXPTR_Msk (0xffffffffu << DACC_TPR_TXPTR_Pos)
112 #define DACC_TPR_TXPTR(value) ((DACC_TPR_TXPTR_Msk & ((value) << DACC_TPR_TXPTR_Pos)))
113 /* -------- DACC_TCR : (DACC Offset: 0x10C) Transmit Counter Register -------- */
114 #define DACC_TCR_TXCTR_Pos 0
115 #define DACC_TCR_TXCTR_Msk (0xffffu << DACC_TCR_TXCTR_Pos)
116 #define DACC_TCR_TXCTR(value) ((DACC_TCR_TXCTR_Msk & ((value) << DACC_TCR_TXCTR_Pos)))
117 /* -------- DACC_TNPR : (DACC Offset: 0x118) Transmit Next Pointer Register -------- */
118 #define DACC_TNPR_TXNPTR_Pos 0
119 #define DACC_TNPR_TXNPTR_Msk (0xffffffffu << DACC_TNPR_TXNPTR_Pos)
120 #define DACC_TNPR_TXNPTR(value) ((DACC_TNPR_TXNPTR_Msk & ((value) << DACC_TNPR_TXNPTR_Pos)))
121 /* -------- DACC_TNCR : (DACC Offset: 0x11C) Transmit Next Counter Register -------- */
122 #define DACC_TNCR_TXNCTR_Pos 0
123 #define DACC_TNCR_TXNCTR_Msk (0xffffu << DACC_TNCR_TXNCTR_Pos)
124 #define DACC_TNCR_TXNCTR(value) ((DACC_TNCR_TXNCTR_Msk & ((value) << DACC_TNCR_TXNCTR_Pos)))
125 /* -------- DACC_PTCR : (DACC Offset: 0x120) Transfer Control Register -------- */
126 #define DACC_PTCR_RXTEN (0x1u << 0)
127 #define DACC_PTCR_RXTDIS (0x1u << 1)
128 #define DACC_PTCR_TXTEN (0x1u << 8)
129 #define DACC_PTCR_TXTDIS (0x1u << 9)
130 /* -------- DACC_PTSR : (DACC Offset: 0x124) Transfer Status Register -------- */
131 #define DACC_PTSR_RXTEN (0x1u << 0)
132 #define DACC_PTSR_TXTEN (0x1u << 8)
135 
136 
137 #endif /* _SAM3N_DACC_COMPONENT_ */
RwReg DACC_TNCR
(Dacc Offset: 0x11C) Transmit Next Counter Register
Definition: component_dacc.h:57
WoReg DACC_IDR
(Dacc Offset: 0x10) Interrupt Disable Register
Definition: component_dacc.h:46
volatile uint32_t RwReg
Definition: sam3n00a.h:54
WoReg DACC_CDR
(Dacc Offset: 0x08) Conversion Data Register
Definition: component_dacc.h:44
volatile uint32_t WoReg
Definition: sam3n00a.h:53
RoReg DACC_PTSR
(Dacc Offset: 0x124) Transfer Status Register
Definition: component_dacc.h:59
WoReg DACC_CR
(Dacc Offset: 0x00) Control Register
Definition: component_dacc.h:42
RwReg DACC_WPMR
(Dacc Offset: 0xE4) Write Protect Mode Register
Definition: component_dacc.h:50
RoReg DACC_IMR
(Dacc Offset: 0x14) Interrupt Mask Register
Definition: component_dacc.h:47
Dacc hardware registers.
Definition: component_dacc.h:41
RwReg DACC_TNPR
(Dacc Offset: 0x118) Transmit Next Pointer Register
Definition: component_dacc.h:56
RwReg DACC_TCR
(Dacc Offset: 0x10C) Transmit Counter Register
Definition: component_dacc.h:54
RwReg DACC_MR
(Dacc Offset: 0x04) Mode Register
Definition: component_dacc.h:43
RoReg DACC_WPSR
(Dacc Offset: 0xE8) Write Protect Status Register
Definition: component_dacc.h:51
volatile const uint32_t RoReg
Definition: sam3n00a.h:49
RwReg DACC_TPR
(Dacc Offset: 0x108) Transmit Pointer Register
Definition: component_dacc.h:53
WoReg DACC_PTCR
(Dacc Offset: 0x120) Transfer Control Register
Definition: component_dacc.h:58
WoReg DACC_IER
(Dacc Offset: 0x0C) Interrupt Enable Register
Definition: component_dacc.h:45
RoReg DACC_ISR
(Dacc Offset: 0x18) Interrupt Status Register
Definition: component_dacc.h:48