component/dacc.h
Go to the documentation of this file.
1 
31 /*
32  * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
33  */
34 
35 #ifndef _SAME70_DACC_COMPONENT_
36 #define _SAME70_DACC_COMPONENT_
37 
38 /* ============================================================================= */
40 /* ============================================================================= */
43 
44 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
45 
46 typedef struct {
47  __O uint32_t DACC_CR;
48  __IO uint32_t DACC_MR;
49  __IO uint32_t DACC_TRIGR;
50  __I uint32_t Reserved1[1];
51  __O uint32_t DACC_CHER;
52  __O uint32_t DACC_CHDR;
53  __I uint32_t DACC_CHSR;
54  __O uint32_t DACC_CDR[2];
55  __O uint32_t DACC_IER;
56  __O uint32_t DACC_IDR;
57  __I uint32_t DACC_IMR;
58  __I uint32_t DACC_ISR;
59  __I uint32_t Reserved2[24];
60  __IO uint32_t DACC_ACR;
61  __I uint32_t Reserved3[19];
62  __IO uint32_t DACC_WPMR;
63  __I uint32_t DACC_WPSR;
64  __I uint32_t Reserved4[4];
65  __I uint32_t DACC_VERSION;
66 } Dacc;
67 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
68 /* -------- DACC_CR : (DACC Offset: 0x00) Control Register -------- */
69 #define DACC_CR_SWRST (0x1u << 0)
70 /* -------- DACC_MR : (DACC Offset: 0x04) Mode Register -------- */
71 #define DACC_MR_MAXS0 (0x1u << 0)
72 #define DACC_MR_MAXS0_TRIG_EVENT (0x0u << 0)
73 #define DACC_MR_MAXS0_MAXIMUM (0x1u << 0)
74 #define DACC_MR_MAXS1 (0x1u << 1)
75 #define DACC_MR_MAXS1_TRIG_EVENT (0x0u << 1)
76 #define DACC_MR_MAXS1_MAXIMUM (0x1u << 1)
77 #define DACC_MR_WORD (0x1u << 4)
78 #define DACC_MR_WORD_DISABLED (0x0u << 4)
79 #define DACC_MR_WORD_ENABLED (0x1u << 4)
80 #define DACC_MR_ZERO (0x1u << 5)
81 #define DACC_MR_REFRESH_Pos 8
82 #define DACC_MR_REFRESH_Msk (0xffu << DACC_MR_REFRESH_Pos)
83 #define DACC_MR_REFRESH(value) ((DACC_MR_REFRESH_Msk & ((value) << DACC_MR_REFRESH_Pos)))
84 #define DACC_MR_DIFF (0x1u << 23)
85 #define DACC_MR_DIFF_DISABLED (0x0u << 23)
86 #define DACC_MR_DIFF_ENABLED (0x1u << 23)
87 #define DACC_MR_PRESCALER_Pos 24
88 #define DACC_MR_PRESCALER_Msk (0xfu << DACC_MR_PRESCALER_Pos)
89 #define DACC_MR_PRESCALER(value) ((DACC_MR_PRESCALER_Msk & ((value) << DACC_MR_PRESCALER_Pos)))
90 /* -------- DACC_TRIGR : (DACC Offset: 0x08) Trigger Register -------- */
91 #define DACC_TRIGR_TRGEN0 (0x1u << 0)
92 #define DACC_TRIGR_TRGEN0_DIS (0x0u << 0)
93 #define DACC_TRIGR_TRGEN0_EN (0x1u << 0)
94 #define DACC_TRIGR_TRGEN1 (0x1u << 1)
95 #define DACC_TRIGR_TRGEN1_DIS (0x0u << 1)
96 #define DACC_TRIGR_TRGEN1_EN (0x1u << 1)
97 #define DACC_TRIGR_TRGSEL0_Pos 4
98 #define DACC_TRIGR_TRGSEL0_Msk (0x7u << DACC_TRIGR_TRGSEL0_Pos)
99 #define DACC_TRIGR_TRGSEL0(value) ((DACC_TRIGR_TRGSEL0_Msk & ((value) << DACC_TRIGR_TRGSEL0_Pos)))
100 #define DACC_TRIGR_TRGSEL0_TRGSEL0 (0x0u << 4)
101 #define DACC_TRIGR_TRGSEL0_TRGSEL1 (0x1u << 4)
102 #define DACC_TRIGR_TRGSEL0_TRGSEL2 (0x2u << 4)
103 #define DACC_TRIGR_TRGSEL0_TRGSEL3 (0x3u << 4)
104 #define DACC_TRIGR_TRGSEL0_TRGSEL4 (0x4u << 4)
105 #define DACC_TRIGR_TRGSEL0_TRGSEL5 (0x5u << 4)
106 #define DACC_TRIGR_TRGSEL0_TRGSEL6 (0x6u << 4)
107 #define DACC_TRIGR_TRGSEL0_TRGSEL7 (0x7u << 4)
108 #define DACC_TRIGR_TRGSEL1_Pos 8
109 #define DACC_TRIGR_TRGSEL1_Msk (0x7u << DACC_TRIGR_TRGSEL1_Pos)
110 #define DACC_TRIGR_TRGSEL1(value) ((DACC_TRIGR_TRGSEL1_Msk & ((value) << DACC_TRIGR_TRGSEL1_Pos)))
111 #define DACC_TRIGR_TRGSEL1_TRGSEL0 (0x0u << 8)
112 #define DACC_TRIGR_TRGSEL1_TRGSEL1 (0x1u << 8)
113 #define DACC_TRIGR_TRGSEL1_TRGSEL2 (0x2u << 8)
114 #define DACC_TRIGR_TRGSEL1_TRGSEL3 (0x3u << 8)
115 #define DACC_TRIGR_TRGSEL1_TRGSEL4 (0x4u << 8)
116 #define DACC_TRIGR_TRGSEL1_TRGSEL5 (0x5u << 8)
117 #define DACC_TRIGR_TRGSEL1_TRGSEL6 (0x6u << 8)
118 #define DACC_TRIGR_TRGSEL1_TRGSEL7 (0x7u << 8)
119 #define DACC_TRIGR_OSR0_Pos 16
120 #define DACC_TRIGR_OSR0_Msk (0x7u << DACC_TRIGR_OSR0_Pos)
121 #define DACC_TRIGR_OSR0(value) ((DACC_TRIGR_OSR0_Msk & ((value) << DACC_TRIGR_OSR0_Pos)))
122 #define DACC_TRIGR_OSR0_OSR_1 (0x0u << 16)
123 #define DACC_TRIGR_OSR0_OSR_2 (0x1u << 16)
124 #define DACC_TRIGR_OSR0_OSR_4 (0x2u << 16)
125 #define DACC_TRIGR_OSR0_OSR_8 (0x3u << 16)
126 #define DACC_TRIGR_OSR0_OSR_16 (0x4u << 16)
127 #define DACC_TRIGR_OSR0_OSR_32 (0x5u << 16)
128 #define DACC_TRIGR_OSR1_Pos 20
129 #define DACC_TRIGR_OSR1_Msk (0x7u << DACC_TRIGR_OSR1_Pos)
130 #define DACC_TRIGR_OSR1(value) ((DACC_TRIGR_OSR1_Msk & ((value) << DACC_TRIGR_OSR1_Pos)))
131 #define DACC_TRIGR_OSR1_OSR_1 (0x0u << 20)
132 #define DACC_TRIGR_OSR1_OSR_2 (0x1u << 20)
133 #define DACC_TRIGR_OSR1_OSR_4 (0x2u << 20)
134 #define DACC_TRIGR_OSR1_OSR_8 (0x3u << 20)
135 #define DACC_TRIGR_OSR1_OSR_16 (0x4u << 20)
136 #define DACC_TRIGR_OSR1_OSR_32 (0x5u << 20)
137 /* -------- DACC_CHER : (DACC Offset: 0x10) Channel Enable Register -------- */
138 #define DACC_CHER_CH0 (0x1u << 0)
139 #define DACC_CHER_CH1 (0x1u << 1)
140 /* -------- DACC_CHDR : (DACC Offset: 0x14) Channel Disable Register -------- */
141 #define DACC_CHDR_CH0 (0x1u << 0)
142 #define DACC_CHDR_CH1 (0x1u << 1)
143 /* -------- DACC_CHSR : (DACC Offset: 0x18) Channel Status Register -------- */
144 #define DACC_CHSR_CH0 (0x1u << 0)
145 #define DACC_CHSR_CH1 (0x1u << 1)
146 #define DACC_CHSR_DACRDY0 (0x1u << 8)
147 #define DACC_CHSR_DACRDY1 (0x1u << 9)
148 /* -------- DACC_CDR[2] : (DACC Offset: 0x1C) Conversion Data Register -------- */
149 #define DACC_CDR_DATA0_Pos 0
150 #define DACC_CDR_DATA0_Msk (0xffffu << DACC_CDR_DATA0_Pos)
151 #define DACC_CDR_DATA0(value) ((DACC_CDR_DATA0_Msk & ((value) << DACC_CDR_DATA0_Pos)))
152 #define DACC_CDR_DATA1_Pos 16
153 #define DACC_CDR_DATA1_Msk (0xffffu << DACC_CDR_DATA1_Pos)
154 #define DACC_CDR_DATA1(value) ((DACC_CDR_DATA1_Msk & ((value) << DACC_CDR_DATA1_Pos)))
155 /* -------- DACC_IER : (DACC Offset: 0x24) Interrupt Enable Register -------- */
156 #define DACC_IER_TXRDY0 (0x1u << 0)
157 #define DACC_IER_TXRDY1 (0x1u << 1)
158 #define DACC_IER_EOC0 (0x1u << 4)
159 #define DACC_IER_EOC1 (0x1u << 5)
160 #define DACC_IER_ENDTX0 (0x1u << 8)
161 #define DACC_IER_ENDTX1 (0x1u << 9)
162 #define DACC_IER_TXBUFE0 (0x1u << 12)
163 #define DACC_IER_TXBUFE1 (0x1u << 13)
164 /* -------- DACC_IDR : (DACC Offset: 0x28) Interrupt Disable Register -------- */
165 #define DACC_IDR_TXRDY0 (0x1u << 0)
166 #define DACC_IDR_TXRDY1 (0x1u << 1)
167 #define DACC_IDR_EOC0 (0x1u << 4)
168 #define DACC_IDR_EOC1 (0x1u << 5)
169 #define DACC_IDR_ENDTX0 (0x1u << 8)
170 #define DACC_IDR_ENDTX1 (0x1u << 9)
171 #define DACC_IDR_TXBUFE0 (0x1u << 12)
172 #define DACC_IDR_TXBUFE1 (0x1u << 13)
173 /* -------- DACC_IMR : (DACC Offset: 0x2C) Interrupt Mask Register -------- */
174 #define DACC_IMR_TXRDY0 (0x1u << 0)
175 #define DACC_IMR_TXRDY1 (0x1u << 1)
176 #define DACC_IMR_EOC0 (0x1u << 4)
177 #define DACC_IMR_EOC1 (0x1u << 5)
178 #define DACC_IMR_ENDTX0 (0x1u << 8)
179 #define DACC_IMR_ENDTX1 (0x1u << 9)
180 #define DACC_IMR_TXBUFE0 (0x1u << 12)
181 #define DACC_IMR_TXBUFE1 (0x1u << 13)
182 /* -------- DACC_ISR : (DACC Offset: 0x30) Interrupt Status Register -------- */
183 #define DACC_ISR_TXRDY0 (0x1u << 0)
184 #define DACC_ISR_TXRDY1 (0x1u << 1)
185 #define DACC_ISR_EOC0 (0x1u << 4)
186 #define DACC_ISR_EOC1 (0x1u << 5)
187 #define DACC_ISR_ENDTX0 (0x1u << 8)
188 #define DACC_ISR_ENDTX1 (0x1u << 9)
189 #define DACC_ISR_TXBUFE0 (0x1u << 12)
190 #define DACC_ISR_TXBUFE1 (0x1u << 13)
191 /* -------- DACC_ACR : (DACC Offset: 0x94) Analog Current Register -------- */
192 #define DACC_ACR_IBCTLCH0_Pos 0
193 #define DACC_ACR_IBCTLCH0_Msk (0x3u << DACC_ACR_IBCTLCH0_Pos)
194 #define DACC_ACR_IBCTLCH0(value) ((DACC_ACR_IBCTLCH0_Msk & ((value) << DACC_ACR_IBCTLCH0_Pos)))
195 #define DACC_ACR_IBCTLCH1_Pos 2
196 #define DACC_ACR_IBCTLCH1_Msk (0x3u << DACC_ACR_IBCTLCH1_Pos)
197 #define DACC_ACR_IBCTLCH1(value) ((DACC_ACR_IBCTLCH1_Msk & ((value) << DACC_ACR_IBCTLCH1_Pos)))
198 /* -------- DACC_WPMR : (DACC Offset: 0xE4) Write Protection Mode register -------- */
199 #define DACC_WPMR_WPEN (0x1u << 0)
200 #define DACC_WPMR_WPKEY_Pos 8
201 #define DACC_WPMR_WPKEY_Msk (0xffffffu << DACC_WPMR_WPKEY_Pos)
202 #define DACC_WPMR_WPKEY(value) ((DACC_WPMR_WPKEY_Msk & ((value) << DACC_WPMR_WPKEY_Pos)))
203 #define DACC_WPMR_WPKEY_PASSWD (0x444143u << 8)
204 /* -------- DACC_WPSR : (DACC Offset: 0xE8) Write Protection Status register -------- */
205 #define DACC_WPSR_WPVS (0x1u << 0)
206 #define DACC_WPSR_WPVSRC_Pos 8
207 #define DACC_WPSR_WPVSRC_Msk (0xffu << DACC_WPSR_WPVSRC_Pos)
208 /* -------- DACC_VERSION : (DACC Offset: 0xFC) Version Register -------- */
209 #define DACC_VERSION_VERSION_Pos 0
210 #define DACC_VERSION_VERSION_Msk (0xfffu << DACC_VERSION_VERSION_Pos)
211 #define DACC_VERSION_MFN_Pos 16
212 #define DACC_VERSION_MFN_Msk (0x7u << DACC_VERSION_MFN_Pos)
215 
216 
217 #endif /* _SAME70_DACC_COMPONENT_ */
__IO uint32_t DACC_WPMR
(Dacc Offset: 0xE4) Write Protection Mode Register
__IO uint32_t DACC_ACR
(Dacc Offset: 0x94) Analog Current Register
__O uint32_t DACC_CR
(Dacc Offset: 0x00) Control Register
#define __IO
Definition: core_cm7.h:266
#define __O
Definition: core_cm7.h:265
__I uint32_t DACC_VERSION
(Dacc Offset: 0xFC) Version Register
__I uint32_t DACC_WPSR
(Dacc Offset: 0xE8) Write Protection Status Register
__IO uint32_t DACC_MR
(Dacc Offset: 0x04) Mode Register
__IO uint32_t DACC_TRIGR
(Dacc Offset: 0x08) Trigger Register
__I uint32_t DACC_ISR
(Dacc Offset: 0x30) Interrupt Status Register
__O uint32_t DACC_CHER
(Dacc Offset: 0x10) Channel Enable Register
__O uint32_t DACC_IDR
(Dacc Offset: 0x28) Interrupt Disable Register
Dacc hardware registers.
__O uint32_t DACC_CHDR
(Dacc Offset: 0x14) Channel Disable Register
__O uint32_t DACC_IER
(Dacc Offset: 0x24) Interrupt Enable Register
__I uint32_t DACC_IMR
(Dacc Offset: 0x2C) Interrupt Mask Register
__I uint32_t DACC_CHSR
(Dacc Offset: 0x18) Channel Status Register
#define __I
Definition: core_cm7.h:263


inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:17:57