30 #ifndef _SAM3U_ADC_COMPONENT_ 31 #define _SAM3U_ADC_COMPONENT_ 39 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 66 #define ADC_CR_SWRST (0x1u << 0) 67 #define ADC_CR_START (0x1u << 1) 69 #define ADC_MR_TRGEN (0x1u << 0) 70 #define ADC_MR_TRGEN_DIS (0x0u << 0) 71 #define ADC_MR_TRGEN_EN (0x1u << 0) 72 #define ADC_MR_TRGSEL_Pos 1 73 #define ADC_MR_TRGSEL_Msk (0x7u << ADC_MR_TRGSEL_Pos) 74 #define ADC_MR_TRGSEL(value) ((ADC_MR_TRGSEL_Msk & ((value) << ADC_MR_TRGSEL_Pos))) 75 #define ADC_MR_TRGSEL_ADC_TRIG0 (0x6u << 1) 76 #define ADC_MR_TRGSEL_ADC_TRIG1 (0x0u << 1) 77 #define ADC_MR_TRGSEL_ADC_TRIG2 (0x1u << 1) 78 #define ADC_MR_TRGSEL_ADC_TRIG3 (0x2u << 1) 79 #define ADC_MR_TRGSEL_ADC_TRIG4 (0x3u << 1) 80 #define ADC_MR_TRGSEL_ADC_TRIG5 (0x4u << 1) 81 #define ADC_MR_LOWRES (0x1u << 4) 82 #define ADC_MR_LOWRES_BITS_10 (0x0u << 4) 83 #define ADC_MR_LOWRES_BITS_8 (0x1u << 4) 84 #define ADC_MR_SLEEP (0x1u << 5) 85 #define ADC_MR_SLEEP_NORMAL (0x0u << 5) 86 #define ADC_MR_SLEEP_SLEEP (0x1u << 5) 87 #define ADC_MR_PRESCAL_Pos 8 88 #define ADC_MR_PRESCAL_Msk (0xffu << ADC_MR_PRESCAL_Pos) 89 #define ADC_MR_PRESCAL(value) ((ADC_MR_PRESCAL_Msk & ((value) << ADC_MR_PRESCAL_Pos))) 90 #define ADC_MR_STARTUP_Pos 16 91 #define ADC_MR_STARTUP_Msk (0x7fu << ADC_MR_STARTUP_Pos) 92 #define ADC_MR_STARTUP(value) ((ADC_MR_STARTUP_Msk & ((value) << ADC_MR_STARTUP_Pos))) 93 #define ADC_MR_SHTIM_Pos 24 94 #define ADC_MR_SHTIM_Msk (0xfu << ADC_MR_SHTIM_Pos) 95 #define ADC_MR_SHTIM(value) ((ADC_MR_SHTIM_Msk & ((value) << ADC_MR_SHTIM_Pos))) 97 #define ADC_CHER_CH0 (0x1u << 0) 98 #define ADC_CHER_CH1 (0x1u << 1) 99 #define ADC_CHER_CH2 (0x1u << 2) 100 #define ADC_CHER_CH3 (0x1u << 3) 101 #define ADC_CHER_CH4 (0x1u << 4) 102 #define ADC_CHER_CH5 (0x1u << 5) 103 #define ADC_CHER_CH6 (0x1u << 6) 104 #define ADC_CHER_CH7 (0x1u << 7) 106 #define ADC_CHDR_CH0 (0x1u << 0) 107 #define ADC_CHDR_CH1 (0x1u << 1) 108 #define ADC_CHDR_CH2 (0x1u << 2) 109 #define ADC_CHDR_CH3 (0x1u << 3) 110 #define ADC_CHDR_CH4 (0x1u << 4) 111 #define ADC_CHDR_CH5 (0x1u << 5) 112 #define ADC_CHDR_CH6 (0x1u << 6) 113 #define ADC_CHDR_CH7 (0x1u << 7) 115 #define ADC_CHSR_CH0 (0x1u << 0) 116 #define ADC_CHSR_CH1 (0x1u << 1) 117 #define ADC_CHSR_CH2 (0x1u << 2) 118 #define ADC_CHSR_CH3 (0x1u << 3) 119 #define ADC_CHSR_CH4 (0x1u << 4) 120 #define ADC_CHSR_CH5 (0x1u << 5) 121 #define ADC_CHSR_CH6 (0x1u << 6) 122 #define ADC_CHSR_CH7 (0x1u << 7) 124 #define ADC_SR_EOC0 (0x1u << 0) 125 #define ADC_SR_EOC1 (0x1u << 1) 126 #define ADC_SR_EOC2 (0x1u << 2) 127 #define ADC_SR_EOC3 (0x1u << 3) 128 #define ADC_SR_EOC4 (0x1u << 4) 129 #define ADC_SR_EOC5 (0x1u << 5) 130 #define ADC_SR_EOC6 (0x1u << 6) 131 #define ADC_SR_EOC7 (0x1u << 7) 132 #define ADC_SR_OVRE0 (0x1u << 8) 133 #define ADC_SR_OVRE1 (0x1u << 9) 134 #define ADC_SR_OVRE2 (0x1u << 10) 135 #define ADC_SR_OVRE3 (0x1u << 11) 136 #define ADC_SR_OVRE4 (0x1u << 12) 137 #define ADC_SR_OVRE5 (0x1u << 13) 138 #define ADC_SR_OVRE6 (0x1u << 14) 139 #define ADC_SR_OVRE7 (0x1u << 15) 140 #define ADC_SR_DRDY (0x1u << 16) 141 #define ADC_SR_GOVRE (0x1u << 17) 142 #define ADC_SR_ENDRX (0x1u << 18) 143 #define ADC_SR_RXBUFF (0x1u << 19) 145 #define ADC_LCDR_LDATA_Pos 0 146 #define ADC_LCDR_LDATA_Msk (0x3ffu << ADC_LCDR_LDATA_Pos) 148 #define ADC_IER_EOC0 (0x1u << 0) 149 #define ADC_IER_EOC1 (0x1u << 1) 150 #define ADC_IER_EOC2 (0x1u << 2) 151 #define ADC_IER_EOC3 (0x1u << 3) 152 #define ADC_IER_EOC4 (0x1u << 4) 153 #define ADC_IER_EOC5 (0x1u << 5) 154 #define ADC_IER_EOC6 (0x1u << 6) 155 #define ADC_IER_EOC7 (0x1u << 7) 156 #define ADC_IER_OVRE0 (0x1u << 8) 157 #define ADC_IER_OVRE1 (0x1u << 9) 158 #define ADC_IER_OVRE2 (0x1u << 10) 159 #define ADC_IER_OVRE3 (0x1u << 11) 160 #define ADC_IER_OVRE4 (0x1u << 12) 161 #define ADC_IER_OVRE5 (0x1u << 13) 162 #define ADC_IER_OVRE6 (0x1u << 14) 163 #define ADC_IER_OVRE7 (0x1u << 15) 164 #define ADC_IER_DRDY (0x1u << 16) 165 #define ADC_IER_GOVRE (0x1u << 17) 166 #define ADC_IER_ENDRX (0x1u << 18) 167 #define ADC_IER_RXBUFF (0x1u << 19) 169 #define ADC_IDR_EOC0 (0x1u << 0) 170 #define ADC_IDR_EOC1 (0x1u << 1) 171 #define ADC_IDR_EOC2 (0x1u << 2) 172 #define ADC_IDR_EOC3 (0x1u << 3) 173 #define ADC_IDR_EOC4 (0x1u << 4) 174 #define ADC_IDR_EOC5 (0x1u << 5) 175 #define ADC_IDR_EOC6 (0x1u << 6) 176 #define ADC_IDR_EOC7 (0x1u << 7) 177 #define ADC_IDR_OVRE0 (0x1u << 8) 178 #define ADC_IDR_OVRE1 (0x1u << 9) 179 #define ADC_IDR_OVRE2 (0x1u << 10) 180 #define ADC_IDR_OVRE3 (0x1u << 11) 181 #define ADC_IDR_OVRE4 (0x1u << 12) 182 #define ADC_IDR_OVRE5 (0x1u << 13) 183 #define ADC_IDR_OVRE6 (0x1u << 14) 184 #define ADC_IDR_OVRE7 (0x1u << 15) 185 #define ADC_IDR_DRDY (0x1u << 16) 186 #define ADC_IDR_GOVRE (0x1u << 17) 187 #define ADC_IDR_ENDRX (0x1u << 18) 188 #define ADC_IDR_RXBUFF (0x1u << 19) 190 #define ADC_IMR_EOC0 (0x1u << 0) 191 #define ADC_IMR_EOC1 (0x1u << 1) 192 #define ADC_IMR_EOC2 (0x1u << 2) 193 #define ADC_IMR_EOC3 (0x1u << 3) 194 #define ADC_IMR_EOC4 (0x1u << 4) 195 #define ADC_IMR_EOC5 (0x1u << 5) 196 #define ADC_IMR_EOC6 (0x1u << 6) 197 #define ADC_IMR_EOC7 (0x1u << 7) 198 #define ADC_IMR_OVRE0 (0x1u << 8) 199 #define ADC_IMR_OVRE1 (0x1u << 9) 200 #define ADC_IMR_OVRE2 (0x1u << 10) 201 #define ADC_IMR_OVRE3 (0x1u << 11) 202 #define ADC_IMR_OVRE4 (0x1u << 12) 203 #define ADC_IMR_OVRE5 (0x1u << 13) 204 #define ADC_IMR_OVRE6 (0x1u << 14) 205 #define ADC_IMR_OVRE7 (0x1u << 15) 206 #define ADC_IMR_DRDY (0x1u << 16) 207 #define ADC_IMR_GOVRE (0x1u << 17) 208 #define ADC_IMR_ENDRX (0x1u << 18) 209 #define ADC_IMR_RXBUFF (0x1u << 19) 211 #define ADC_CDR_DATA_Pos 0 212 #define ADC_CDR_DATA_Msk (0x3ffu << ADC_CDR_DATA_Pos) 214 #define ADC_RPR_RXPTR_Pos 0 215 #define ADC_RPR_RXPTR_Msk (0xffffffffu << ADC_RPR_RXPTR_Pos) 216 #define ADC_RPR_RXPTR(value) ((ADC_RPR_RXPTR_Msk & ((value) << ADC_RPR_RXPTR_Pos))) 218 #define ADC_RCR_RXCTR_Pos 0 219 #define ADC_RCR_RXCTR_Msk (0xffffu << ADC_RCR_RXCTR_Pos) 220 #define ADC_RCR_RXCTR(value) ((ADC_RCR_RXCTR_Msk & ((value) << ADC_RCR_RXCTR_Pos))) 222 #define ADC_RNPR_RXNPTR_Pos 0 223 #define ADC_RNPR_RXNPTR_Msk (0xffffffffu << ADC_RNPR_RXNPTR_Pos) 224 #define ADC_RNPR_RXNPTR(value) ((ADC_RNPR_RXNPTR_Msk & ((value) << ADC_RNPR_RXNPTR_Pos))) 226 #define ADC_RNCR_RXNCTR_Pos 0 227 #define ADC_RNCR_RXNCTR_Msk (0xffffu << ADC_RNCR_RXNCTR_Pos) 228 #define ADC_RNCR_RXNCTR(value) ((ADC_RNCR_RXNCTR_Msk & ((value) << ADC_RNCR_RXNCTR_Pos))) 230 #define ADC_PTCR_RXTEN (0x1u << 0) 231 #define ADC_PTCR_RXTDIS (0x1u << 1) 232 #define ADC_PTCR_TXTEN (0x1u << 8) 233 #define ADC_PTCR_TXTDIS (0x1u << 9) 235 #define ADC_PTSR_RXTEN (0x1u << 0) 236 #define ADC_PTSR_TXTEN (0x1u << 8) volatile uint32_t RwReg
Definition: sam3n00a.h:54
volatile uint32_t WoReg
Definition: sam3n00a.h:53
RoReg ADC_SR
(Adc Offset: 0x1C) Status Register
Definition: component_adc.h:48
volatile const uint32_t RoReg
Definition: sam3n00a.h:49
Adc hardware registers.
Definition: component_adc.h:41