Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.
Dependents: 1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB
Fork of mbed by
TARGET_SAMD21G18A/comp_ac.h@121:672067c3ada4, 2016-04-14 (annotated)
- Committer:
- elijahorr
- Date:
- Thu Apr 14 07:28:54 2016 +0000
- Revision:
- 121:672067c3ada4
- Parent:
- 111:4336505e4b1c
.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 111:4336505e4b1c | 1 | /** |
Kojto | 111:4336505e4b1c | 2 | * \file |
Kojto | 111:4336505e4b1c | 3 | * |
Kojto | 111:4336505e4b1c | 4 | * \brief Component description for AC |
Kojto | 111:4336505e4b1c | 5 | * |
Kojto | 111:4336505e4b1c | 6 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. |
Kojto | 111:4336505e4b1c | 7 | * |
Kojto | 111:4336505e4b1c | 8 | * \asf_license_start |
Kojto | 111:4336505e4b1c | 9 | * |
Kojto | 111:4336505e4b1c | 10 | * \page License |
Kojto | 111:4336505e4b1c | 11 | * |
Kojto | 111:4336505e4b1c | 12 | * Redistribution and use in source and binary forms, with or without |
Kojto | 111:4336505e4b1c | 13 | * modification, are permitted provided that the following conditions are met: |
Kojto | 111:4336505e4b1c | 14 | * |
Kojto | 111:4336505e4b1c | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 111:4336505e4b1c | 16 | * this list of conditions and the following disclaimer. |
Kojto | 111:4336505e4b1c | 17 | * |
Kojto | 111:4336505e4b1c | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 111:4336505e4b1c | 19 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 111:4336505e4b1c | 20 | * and/or other materials provided with the distribution. |
Kojto | 111:4336505e4b1c | 21 | * |
Kojto | 111:4336505e4b1c | 22 | * 3. The name of Atmel may not be used to endorse or promote products derived |
Kojto | 111:4336505e4b1c | 23 | * from this software without specific prior written permission. |
Kojto | 111:4336505e4b1c | 24 | * |
Kojto | 111:4336505e4b1c | 25 | * 4. This software may only be redistributed and used in connection with an |
Kojto | 111:4336505e4b1c | 26 | * Atmel microcontroller product. |
Kojto | 111:4336505e4b1c | 27 | * |
Kojto | 111:4336505e4b1c | 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED |
Kojto | 111:4336505e4b1c | 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
Kojto | 111:4336505e4b1c | 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE |
Kojto | 111:4336505e4b1c | 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR |
Kojto | 111:4336505e4b1c | 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 111:4336505e4b1c | 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
Kojto | 111:4336505e4b1c | 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
Kojto | 111:4336505e4b1c | 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
Kojto | 111:4336505e4b1c | 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
Kojto | 111:4336505e4b1c | 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
Kojto | 111:4336505e4b1c | 38 | * POSSIBILITY OF SUCH DAMAGE. |
Kojto | 111:4336505e4b1c | 39 | * |
Kojto | 111:4336505e4b1c | 40 | * \asf_license_stop |
Kojto | 111:4336505e4b1c | 41 | * |
Kojto | 111:4336505e4b1c | 42 | */ |
Kojto | 111:4336505e4b1c | 43 | /* |
Kojto | 111:4336505e4b1c | 44 | * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> |
Kojto | 111:4336505e4b1c | 45 | */ |
Kojto | 111:4336505e4b1c | 46 | |
Kojto | 111:4336505e4b1c | 47 | #ifndef _SAMD21_AC_COMPONENT_ |
Kojto | 111:4336505e4b1c | 48 | #define _SAMD21_AC_COMPONENT_ |
Kojto | 111:4336505e4b1c | 49 | |
Kojto | 111:4336505e4b1c | 50 | /* ========================================================================== */ |
Kojto | 111:4336505e4b1c | 51 | /** SOFTWARE API DEFINITION FOR AC */ |
Kojto | 111:4336505e4b1c | 52 | /* ========================================================================== */ |
Kojto | 111:4336505e4b1c | 53 | /** \addtogroup SAMD21_AC Analog Comparators */ |
Kojto | 111:4336505e4b1c | 54 | /*@{*/ |
Kojto | 111:4336505e4b1c | 55 | |
Kojto | 111:4336505e4b1c | 56 | #define AC_U2205 |
Kojto | 111:4336505e4b1c | 57 | #define REV_AC 0x112 |
Kojto | 111:4336505e4b1c | 58 | |
Kojto | 111:4336505e4b1c | 59 | /* -------- AC_CTRLA : (AC Offset: 0x00) (R/W 8) Control A -------- */ |
Kojto | 111:4336505e4b1c | 60 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
Kojto | 111:4336505e4b1c | 61 | typedef union { |
Kojto | 111:4336505e4b1c | 62 | struct { |
Kojto | 111:4336505e4b1c | 63 | uint8_t SWRST:1; /*!< bit: 0 Software Reset */ |
Kojto | 111:4336505e4b1c | 64 | uint8_t ENABLE:1; /*!< bit: 1 Enable */ |
Kojto | 111:4336505e4b1c | 65 | uint8_t RUNSTDBY:1; /*!< bit: 2 Run in Standby */ |
Kojto | 111:4336505e4b1c | 66 | uint8_t :4; /*!< bit: 3.. 6 Reserved */ |
Kojto | 111:4336505e4b1c | 67 | uint8_t LPMUX:1; /*!< bit: 7 Low-Power Mux */ |
Kojto | 111:4336505e4b1c | 68 | } bit; /*!< Structure used for bit access */ |
Kojto | 111:4336505e4b1c | 69 | uint8_t reg; /*!< Type used for register access */ |
Kojto | 111:4336505e4b1c | 70 | } AC_CTRLA_Type; |
Kojto | 111:4336505e4b1c | 71 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
Kojto | 111:4336505e4b1c | 72 | |
Kojto | 111:4336505e4b1c | 73 | #define AC_CTRLA_OFFSET 0x00 /**< \brief (AC_CTRLA offset) Control A */ |
Kojto | 111:4336505e4b1c | 74 | #define AC_CTRLA_RESETVALUE 0x00ul /**< \brief (AC_CTRLA reset_value) Control A */ |
Kojto | 111:4336505e4b1c | 75 | |
Kojto | 111:4336505e4b1c | 76 | #define AC_CTRLA_SWRST_Pos 0 /**< \brief (AC_CTRLA) Software Reset */ |
Kojto | 111:4336505e4b1c | 77 | #define AC_CTRLA_SWRST (0x1ul << AC_CTRLA_SWRST_Pos) |
Kojto | 111:4336505e4b1c | 78 | #define AC_CTRLA_ENABLE_Pos 1 /**< \brief (AC_CTRLA) Enable */ |
Kojto | 111:4336505e4b1c | 79 | #define AC_CTRLA_ENABLE (0x1ul << AC_CTRLA_ENABLE_Pos) |
Kojto | 111:4336505e4b1c | 80 | #define AC_CTRLA_RUNSTDBY_Pos 2 /**< \brief (AC_CTRLA) Run in Standby */ |
Kojto | 111:4336505e4b1c | 81 | #define AC_CTRLA_RUNSTDBY_Msk (0x1ul << AC_CTRLA_RUNSTDBY_Pos) |
Kojto | 111:4336505e4b1c | 82 | #define AC_CTRLA_RUNSTDBY(value) ((AC_CTRLA_RUNSTDBY_Msk & ((value) << AC_CTRLA_RUNSTDBY_Pos))) |
Kojto | 111:4336505e4b1c | 83 | #define AC_CTRLA_LPMUX_Pos 7 /**< \brief (AC_CTRLA) Low-Power Mux */ |
Kojto | 111:4336505e4b1c | 84 | #define AC_CTRLA_LPMUX (0x1ul << AC_CTRLA_LPMUX_Pos) |
Kojto | 111:4336505e4b1c | 85 | #define AC_CTRLA_MASK 0x87ul /**< \brief (AC_CTRLA) MASK Register */ |
Kojto | 111:4336505e4b1c | 86 | |
Kojto | 111:4336505e4b1c | 87 | /* -------- AC_CTRLB : (AC Offset: 0x01) ( /W 8) Control B -------- */ |
Kojto | 111:4336505e4b1c | 88 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
Kojto | 111:4336505e4b1c | 89 | typedef union { |
Kojto | 111:4336505e4b1c | 90 | struct { |
Kojto | 111:4336505e4b1c | 91 | uint8_t START0:1; /*!< bit: 0 Comparator 0 Start Comparison */ |
Kojto | 111:4336505e4b1c | 92 | uint8_t START1:1; /*!< bit: 1 Comparator 1 Start Comparison */ |
Kojto | 111:4336505e4b1c | 93 | uint8_t :6; /*!< bit: 2.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 94 | } bit; /*!< Structure used for bit access */ |
Kojto | 111:4336505e4b1c | 95 | struct { |
Kojto | 111:4336505e4b1c | 96 | uint8_t START:2; /*!< bit: 0.. 1 Comparator x Start Comparison */ |
Kojto | 111:4336505e4b1c | 97 | uint8_t :6; /*!< bit: 2.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 98 | } vec; /*!< Structure used for vec access */ |
Kojto | 111:4336505e4b1c | 99 | uint8_t reg; /*!< Type used for register access */ |
Kojto | 111:4336505e4b1c | 100 | } AC_CTRLB_Type; |
Kojto | 111:4336505e4b1c | 101 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
Kojto | 111:4336505e4b1c | 102 | |
Kojto | 111:4336505e4b1c | 103 | #define AC_CTRLB_OFFSET 0x01 /**< \brief (AC_CTRLB offset) Control B */ |
Kojto | 111:4336505e4b1c | 104 | #define AC_CTRLB_RESETVALUE 0x00ul /**< \brief (AC_CTRLB reset_value) Control B */ |
Kojto | 111:4336505e4b1c | 105 | |
Kojto | 111:4336505e4b1c | 106 | #define AC_CTRLB_START0_Pos 0 /**< \brief (AC_CTRLB) Comparator 0 Start Comparison */ |
Kojto | 111:4336505e4b1c | 107 | #define AC_CTRLB_START0 (1 << AC_CTRLB_START0_Pos) |
Kojto | 111:4336505e4b1c | 108 | #define AC_CTRLB_START1_Pos 1 /**< \brief (AC_CTRLB) Comparator 1 Start Comparison */ |
Kojto | 111:4336505e4b1c | 109 | #define AC_CTRLB_START1 (1 << AC_CTRLB_START1_Pos) |
Kojto | 111:4336505e4b1c | 110 | #define AC_CTRLB_START_Pos 0 /**< \brief (AC_CTRLB) Comparator x Start Comparison */ |
Kojto | 111:4336505e4b1c | 111 | #define AC_CTRLB_START_Msk (0x3ul << AC_CTRLB_START_Pos) |
Kojto | 111:4336505e4b1c | 112 | #define AC_CTRLB_START(value) ((AC_CTRLB_START_Msk & ((value) << AC_CTRLB_START_Pos))) |
Kojto | 111:4336505e4b1c | 113 | #define AC_CTRLB_MASK 0x03ul /**< \brief (AC_CTRLB) MASK Register */ |
Kojto | 111:4336505e4b1c | 114 | |
Kojto | 111:4336505e4b1c | 115 | /* -------- AC_EVCTRL : (AC Offset: 0x02) (R/W 16) Event Control -------- */ |
Kojto | 111:4336505e4b1c | 116 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
Kojto | 111:4336505e4b1c | 117 | typedef union { |
Kojto | 111:4336505e4b1c | 118 | struct { |
Kojto | 111:4336505e4b1c | 119 | uint16_t COMPEO0:1; /*!< bit: 0 Comparator 0 Event Output Enable */ |
Kojto | 111:4336505e4b1c | 120 | uint16_t COMPEO1:1; /*!< bit: 1 Comparator 1 Event Output Enable */ |
Kojto | 111:4336505e4b1c | 121 | uint16_t :2; /*!< bit: 2.. 3 Reserved */ |
Kojto | 111:4336505e4b1c | 122 | uint16_t WINEO0:1; /*!< bit: 4 Window 0 Event Output Enable */ |
Kojto | 111:4336505e4b1c | 123 | uint16_t :3; /*!< bit: 5.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 124 | uint16_t COMPEI0:1; /*!< bit: 8 Comparator 0 Event Input */ |
Kojto | 111:4336505e4b1c | 125 | uint16_t COMPEI1:1; /*!< bit: 9 Comparator 1 Event Input */ |
Kojto | 111:4336505e4b1c | 126 | uint16_t :6; /*!< bit: 10..15 Reserved */ |
Kojto | 111:4336505e4b1c | 127 | } bit; /*!< Structure used for bit access */ |
Kojto | 111:4336505e4b1c | 128 | struct { |
Kojto | 111:4336505e4b1c | 129 | uint16_t COMPEO:2; /*!< bit: 0.. 1 Comparator x Event Output Enable */ |
Kojto | 111:4336505e4b1c | 130 | uint16_t :2; /*!< bit: 2.. 3 Reserved */ |
Kojto | 111:4336505e4b1c | 131 | uint16_t WINEO:1; /*!< bit: 4 Window x Event Output Enable */ |
Kojto | 111:4336505e4b1c | 132 | uint16_t :3; /*!< bit: 5.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 133 | uint16_t COMPEI:2; /*!< bit: 8.. 9 Comparator x Event Input */ |
Kojto | 111:4336505e4b1c | 134 | uint16_t :6; /*!< bit: 10..15 Reserved */ |
Kojto | 111:4336505e4b1c | 135 | } vec; /*!< Structure used for vec access */ |
Kojto | 111:4336505e4b1c | 136 | uint16_t reg; /*!< Type used for register access */ |
Kojto | 111:4336505e4b1c | 137 | } AC_EVCTRL_Type; |
Kojto | 111:4336505e4b1c | 138 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
Kojto | 111:4336505e4b1c | 139 | |
Kojto | 111:4336505e4b1c | 140 | #define AC_EVCTRL_OFFSET 0x02 /**< \brief (AC_EVCTRL offset) Event Control */ |
Kojto | 111:4336505e4b1c | 141 | #define AC_EVCTRL_RESETVALUE 0x0000ul /**< \brief (AC_EVCTRL reset_value) Event Control */ |
Kojto | 111:4336505e4b1c | 142 | |
Kojto | 111:4336505e4b1c | 143 | #define AC_EVCTRL_COMPEO0_Pos 0 /**< \brief (AC_EVCTRL) Comparator 0 Event Output Enable */ |
Kojto | 111:4336505e4b1c | 144 | #define AC_EVCTRL_COMPEO0 (1 << AC_EVCTRL_COMPEO0_Pos) |
Kojto | 111:4336505e4b1c | 145 | #define AC_EVCTRL_COMPEO1_Pos 1 /**< \brief (AC_EVCTRL) Comparator 1 Event Output Enable */ |
Kojto | 111:4336505e4b1c | 146 | #define AC_EVCTRL_COMPEO1 (1 << AC_EVCTRL_COMPEO1_Pos) |
Kojto | 111:4336505e4b1c | 147 | #define AC_EVCTRL_COMPEO_Pos 0 /**< \brief (AC_EVCTRL) Comparator x Event Output Enable */ |
Kojto | 111:4336505e4b1c | 148 | #define AC_EVCTRL_COMPEO_Msk (0x3ul << AC_EVCTRL_COMPEO_Pos) |
Kojto | 111:4336505e4b1c | 149 | #define AC_EVCTRL_COMPEO(value) ((AC_EVCTRL_COMPEO_Msk & ((value) << AC_EVCTRL_COMPEO_Pos))) |
Kojto | 111:4336505e4b1c | 150 | #define AC_EVCTRL_WINEO0_Pos 4 /**< \brief (AC_EVCTRL) Window 0 Event Output Enable */ |
Kojto | 111:4336505e4b1c | 151 | #define AC_EVCTRL_WINEO0 (1 << AC_EVCTRL_WINEO0_Pos) |
Kojto | 111:4336505e4b1c | 152 | #define AC_EVCTRL_WINEO_Pos 4 /**< \brief (AC_EVCTRL) Window x Event Output Enable */ |
Kojto | 111:4336505e4b1c | 153 | #define AC_EVCTRL_WINEO_Msk (0x1ul << AC_EVCTRL_WINEO_Pos) |
Kojto | 111:4336505e4b1c | 154 | #define AC_EVCTRL_WINEO(value) ((AC_EVCTRL_WINEO_Msk & ((value) << AC_EVCTRL_WINEO_Pos))) |
Kojto | 111:4336505e4b1c | 155 | #define AC_EVCTRL_COMPEI0_Pos 8 /**< \brief (AC_EVCTRL) Comparator 0 Event Input */ |
Kojto | 111:4336505e4b1c | 156 | #define AC_EVCTRL_COMPEI0 (1 << AC_EVCTRL_COMPEI0_Pos) |
Kojto | 111:4336505e4b1c | 157 | #define AC_EVCTRL_COMPEI1_Pos 9 /**< \brief (AC_EVCTRL) Comparator 1 Event Input */ |
Kojto | 111:4336505e4b1c | 158 | #define AC_EVCTRL_COMPEI1 (1 << AC_EVCTRL_COMPEI1_Pos) |
Kojto | 111:4336505e4b1c | 159 | #define AC_EVCTRL_COMPEI_Pos 8 /**< \brief (AC_EVCTRL) Comparator x Event Input */ |
Kojto | 111:4336505e4b1c | 160 | #define AC_EVCTRL_COMPEI_Msk (0x3ul << AC_EVCTRL_COMPEI_Pos) |
Kojto | 111:4336505e4b1c | 161 | #define AC_EVCTRL_COMPEI(value) ((AC_EVCTRL_COMPEI_Msk & ((value) << AC_EVCTRL_COMPEI_Pos))) |
Kojto | 111:4336505e4b1c | 162 | #define AC_EVCTRL_MASK 0x0313ul /**< \brief (AC_EVCTRL) MASK Register */ |
Kojto | 111:4336505e4b1c | 163 | |
Kojto | 111:4336505e4b1c | 164 | /* -------- AC_INTENCLR : (AC Offset: 0x04) (R/W 8) Interrupt Enable Clear -------- */ |
Kojto | 111:4336505e4b1c | 165 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
Kojto | 111:4336505e4b1c | 166 | typedef union { |
Kojto | 111:4336505e4b1c | 167 | struct { |
Kojto | 111:4336505e4b1c | 168 | uint8_t COMP0:1; /*!< bit: 0 Comparator 0 Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 169 | uint8_t COMP1:1; /*!< bit: 1 Comparator 1 Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 170 | uint8_t :2; /*!< bit: 2.. 3 Reserved */ |
Kojto | 111:4336505e4b1c | 171 | uint8_t WIN0:1; /*!< bit: 4 Window 0 Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 172 | uint8_t :3; /*!< bit: 5.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 173 | } bit; /*!< Structure used for bit access */ |
Kojto | 111:4336505e4b1c | 174 | struct { |
Kojto | 111:4336505e4b1c | 175 | uint8_t COMP:2; /*!< bit: 0.. 1 Comparator x Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 176 | uint8_t :2; /*!< bit: 2.. 3 Reserved */ |
Kojto | 111:4336505e4b1c | 177 | uint8_t WIN:1; /*!< bit: 4 Window x Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 178 | uint8_t :3; /*!< bit: 5.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 179 | } vec; /*!< Structure used for vec access */ |
Kojto | 111:4336505e4b1c | 180 | uint8_t reg; /*!< Type used for register access */ |
Kojto | 111:4336505e4b1c | 181 | } AC_INTENCLR_Type; |
Kojto | 111:4336505e4b1c | 182 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
Kojto | 111:4336505e4b1c | 183 | |
Kojto | 111:4336505e4b1c | 184 | #define AC_INTENCLR_OFFSET 0x04 /**< \brief (AC_INTENCLR offset) Interrupt Enable Clear */ |
Kojto | 111:4336505e4b1c | 185 | #define AC_INTENCLR_RESETVALUE 0x00ul /**< \brief (AC_INTENCLR reset_value) Interrupt Enable Clear */ |
Kojto | 111:4336505e4b1c | 186 | |
Kojto | 111:4336505e4b1c | 187 | #define AC_INTENCLR_COMP0_Pos 0 /**< \brief (AC_INTENCLR) Comparator 0 Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 188 | #define AC_INTENCLR_COMP0 (1 << AC_INTENCLR_COMP0_Pos) |
Kojto | 111:4336505e4b1c | 189 | #define AC_INTENCLR_COMP1_Pos 1 /**< \brief (AC_INTENCLR) Comparator 1 Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 190 | #define AC_INTENCLR_COMP1 (1 << AC_INTENCLR_COMP1_Pos) |
Kojto | 111:4336505e4b1c | 191 | #define AC_INTENCLR_COMP_Pos 0 /**< \brief (AC_INTENCLR) Comparator x Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 192 | #define AC_INTENCLR_COMP_Msk (0x3ul << AC_INTENCLR_COMP_Pos) |
Kojto | 111:4336505e4b1c | 193 | #define AC_INTENCLR_COMP(value) ((AC_INTENCLR_COMP_Msk & ((value) << AC_INTENCLR_COMP_Pos))) |
Kojto | 111:4336505e4b1c | 194 | #define AC_INTENCLR_WIN0_Pos 4 /**< \brief (AC_INTENCLR) Window 0 Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 195 | #define AC_INTENCLR_WIN0 (1 << AC_INTENCLR_WIN0_Pos) |
Kojto | 111:4336505e4b1c | 196 | #define AC_INTENCLR_WIN_Pos 4 /**< \brief (AC_INTENCLR) Window x Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 197 | #define AC_INTENCLR_WIN_Msk (0x1ul << AC_INTENCLR_WIN_Pos) |
Kojto | 111:4336505e4b1c | 198 | #define AC_INTENCLR_WIN(value) ((AC_INTENCLR_WIN_Msk & ((value) << AC_INTENCLR_WIN_Pos))) |
Kojto | 111:4336505e4b1c | 199 | #define AC_INTENCLR_MASK 0x13ul /**< \brief (AC_INTENCLR) MASK Register */ |
Kojto | 111:4336505e4b1c | 200 | |
Kojto | 111:4336505e4b1c | 201 | /* -------- AC_INTENSET : (AC Offset: 0x05) (R/W 8) Interrupt Enable Set -------- */ |
Kojto | 111:4336505e4b1c | 202 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
Kojto | 111:4336505e4b1c | 203 | typedef union { |
Kojto | 111:4336505e4b1c | 204 | struct { |
Kojto | 111:4336505e4b1c | 205 | uint8_t COMP0:1; /*!< bit: 0 Comparator 0 Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 206 | uint8_t COMP1:1; /*!< bit: 1 Comparator 1 Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 207 | uint8_t :2; /*!< bit: 2.. 3 Reserved */ |
Kojto | 111:4336505e4b1c | 208 | uint8_t WIN0:1; /*!< bit: 4 Window 0 Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 209 | uint8_t :3; /*!< bit: 5.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 210 | } bit; /*!< Structure used for bit access */ |
Kojto | 111:4336505e4b1c | 211 | struct { |
Kojto | 111:4336505e4b1c | 212 | uint8_t COMP:2; /*!< bit: 0.. 1 Comparator x Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 213 | uint8_t :2; /*!< bit: 2.. 3 Reserved */ |
Kojto | 111:4336505e4b1c | 214 | uint8_t WIN:1; /*!< bit: 4 Window x Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 215 | uint8_t :3; /*!< bit: 5.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 216 | } vec; /*!< Structure used for vec access */ |
Kojto | 111:4336505e4b1c | 217 | uint8_t reg; /*!< Type used for register access */ |
Kojto | 111:4336505e4b1c | 218 | } AC_INTENSET_Type; |
Kojto | 111:4336505e4b1c | 219 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
Kojto | 111:4336505e4b1c | 220 | |
Kojto | 111:4336505e4b1c | 221 | #define AC_INTENSET_OFFSET 0x05 /**< \brief (AC_INTENSET offset) Interrupt Enable Set */ |
Kojto | 111:4336505e4b1c | 222 | #define AC_INTENSET_RESETVALUE 0x00ul /**< \brief (AC_INTENSET reset_value) Interrupt Enable Set */ |
Kojto | 111:4336505e4b1c | 223 | |
Kojto | 111:4336505e4b1c | 224 | #define AC_INTENSET_COMP0_Pos 0 /**< \brief (AC_INTENSET) Comparator 0 Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 225 | #define AC_INTENSET_COMP0 (1 << AC_INTENSET_COMP0_Pos) |
Kojto | 111:4336505e4b1c | 226 | #define AC_INTENSET_COMP1_Pos 1 /**< \brief (AC_INTENSET) Comparator 1 Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 227 | #define AC_INTENSET_COMP1 (1 << AC_INTENSET_COMP1_Pos) |
Kojto | 111:4336505e4b1c | 228 | #define AC_INTENSET_COMP_Pos 0 /**< \brief (AC_INTENSET) Comparator x Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 229 | #define AC_INTENSET_COMP_Msk (0x3ul << AC_INTENSET_COMP_Pos) |
Kojto | 111:4336505e4b1c | 230 | #define AC_INTENSET_COMP(value) ((AC_INTENSET_COMP_Msk & ((value) << AC_INTENSET_COMP_Pos))) |
Kojto | 111:4336505e4b1c | 231 | #define AC_INTENSET_WIN0_Pos 4 /**< \brief (AC_INTENSET) Window 0 Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 232 | #define AC_INTENSET_WIN0 (1 << AC_INTENSET_WIN0_Pos) |
Kojto | 111:4336505e4b1c | 233 | #define AC_INTENSET_WIN_Pos 4 /**< \brief (AC_INTENSET) Window x Interrupt Enable */ |
Kojto | 111:4336505e4b1c | 234 | #define AC_INTENSET_WIN_Msk (0x1ul << AC_INTENSET_WIN_Pos) |
Kojto | 111:4336505e4b1c | 235 | #define AC_INTENSET_WIN(value) ((AC_INTENSET_WIN_Msk & ((value) << AC_INTENSET_WIN_Pos))) |
Kojto | 111:4336505e4b1c | 236 | #define AC_INTENSET_MASK 0x13ul /**< \brief (AC_INTENSET) MASK Register */ |
Kojto | 111:4336505e4b1c | 237 | |
Kojto | 111:4336505e4b1c | 238 | /* -------- AC_INTFLAG : (AC Offset: 0x06) (R/W 8) Interrupt Flag Status and Clear -------- */ |
Kojto | 111:4336505e4b1c | 239 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
Kojto | 111:4336505e4b1c | 240 | typedef union { |
Kojto | 111:4336505e4b1c | 241 | struct { |
Kojto | 111:4336505e4b1c | 242 | uint8_t COMP0:1; /*!< bit: 0 Comparator 0 */ |
Kojto | 111:4336505e4b1c | 243 | uint8_t COMP1:1; /*!< bit: 1 Comparator 1 */ |
Kojto | 111:4336505e4b1c | 244 | uint8_t :2; /*!< bit: 2.. 3 Reserved */ |
Kojto | 111:4336505e4b1c | 245 | uint8_t WIN0:1; /*!< bit: 4 Window 0 */ |
Kojto | 111:4336505e4b1c | 246 | uint8_t :3; /*!< bit: 5.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 247 | } bit; /*!< Structure used for bit access */ |
Kojto | 111:4336505e4b1c | 248 | struct { |
Kojto | 111:4336505e4b1c | 249 | uint8_t COMP:2; /*!< bit: 0.. 1 Comparator x */ |
Kojto | 111:4336505e4b1c | 250 | uint8_t :2; /*!< bit: 2.. 3 Reserved */ |
Kojto | 111:4336505e4b1c | 251 | uint8_t WIN:1; /*!< bit: 4 Window x */ |
Kojto | 111:4336505e4b1c | 252 | uint8_t :3; /*!< bit: 5.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 253 | } vec; /*!< Structure used for vec access */ |
Kojto | 111:4336505e4b1c | 254 | uint8_t reg; /*!< Type used for register access */ |
Kojto | 111:4336505e4b1c | 255 | } AC_INTFLAG_Type; |
Kojto | 111:4336505e4b1c | 256 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
Kojto | 111:4336505e4b1c | 257 | |
Kojto | 111:4336505e4b1c | 258 | #define AC_INTFLAG_OFFSET 0x06 /**< \brief (AC_INTFLAG offset) Interrupt Flag Status and Clear */ |
Kojto | 111:4336505e4b1c | 259 | #define AC_INTFLAG_RESETVALUE 0x00ul /**< \brief (AC_INTFLAG reset_value) Interrupt Flag Status and Clear */ |
Kojto | 111:4336505e4b1c | 260 | |
Kojto | 111:4336505e4b1c | 261 | #define AC_INTFLAG_COMP0_Pos 0 /**< \brief (AC_INTFLAG) Comparator 0 */ |
Kojto | 111:4336505e4b1c | 262 | #define AC_INTFLAG_COMP0 (1 << AC_INTFLAG_COMP0_Pos) |
Kojto | 111:4336505e4b1c | 263 | #define AC_INTFLAG_COMP1_Pos 1 /**< \brief (AC_INTFLAG) Comparator 1 */ |
Kojto | 111:4336505e4b1c | 264 | #define AC_INTFLAG_COMP1 (1 << AC_INTFLAG_COMP1_Pos) |
Kojto | 111:4336505e4b1c | 265 | #define AC_INTFLAG_COMP_Pos 0 /**< \brief (AC_INTFLAG) Comparator x */ |
Kojto | 111:4336505e4b1c | 266 | #define AC_INTFLAG_COMP_Msk (0x3ul << AC_INTFLAG_COMP_Pos) |
Kojto | 111:4336505e4b1c | 267 | #define AC_INTFLAG_COMP(value) ((AC_INTFLAG_COMP_Msk & ((value) << AC_INTFLAG_COMP_Pos))) |
Kojto | 111:4336505e4b1c | 268 | #define AC_INTFLAG_WIN0_Pos 4 /**< \brief (AC_INTFLAG) Window 0 */ |
Kojto | 111:4336505e4b1c | 269 | #define AC_INTFLAG_WIN0 (1 << AC_INTFLAG_WIN0_Pos) |
Kojto | 111:4336505e4b1c | 270 | #define AC_INTFLAG_WIN_Pos 4 /**< \brief (AC_INTFLAG) Window x */ |
Kojto | 111:4336505e4b1c | 271 | #define AC_INTFLAG_WIN_Msk (0x1ul << AC_INTFLAG_WIN_Pos) |
Kojto | 111:4336505e4b1c | 272 | #define AC_INTFLAG_WIN(value) ((AC_INTFLAG_WIN_Msk & ((value) << AC_INTFLAG_WIN_Pos))) |
Kojto | 111:4336505e4b1c | 273 | #define AC_INTFLAG_MASK 0x13ul /**< \brief (AC_INTFLAG) MASK Register */ |
Kojto | 111:4336505e4b1c | 274 | |
Kojto | 111:4336505e4b1c | 275 | /* -------- AC_STATUSA : (AC Offset: 0x08) (R/ 8) Status A -------- */ |
Kojto | 111:4336505e4b1c | 276 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
Kojto | 111:4336505e4b1c | 277 | typedef union { |
Kojto | 111:4336505e4b1c | 278 | struct { |
Kojto | 111:4336505e4b1c | 279 | uint8_t STATE0:1; /*!< bit: 0 Comparator 0 Current State */ |
Kojto | 111:4336505e4b1c | 280 | uint8_t STATE1:1; /*!< bit: 1 Comparator 1 Current State */ |
Kojto | 111:4336505e4b1c | 281 | uint8_t :2; /*!< bit: 2.. 3 Reserved */ |
Kojto | 111:4336505e4b1c | 282 | uint8_t WSTATE0:2; /*!< bit: 4.. 5 Window 0 Current State */ |
Kojto | 111:4336505e4b1c | 283 | uint8_t :2; /*!< bit: 6.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 284 | } bit; /*!< Structure used for bit access */ |
Kojto | 111:4336505e4b1c | 285 | struct { |
Kojto | 111:4336505e4b1c | 286 | uint8_t STATE:2; /*!< bit: 0.. 1 Comparator x Current State */ |
Kojto | 111:4336505e4b1c | 287 | uint8_t :6; /*!< bit: 2.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 288 | } vec; /*!< Structure used for vec access */ |
Kojto | 111:4336505e4b1c | 289 | uint8_t reg; /*!< Type used for register access */ |
Kojto | 111:4336505e4b1c | 290 | } AC_STATUSA_Type; |
Kojto | 111:4336505e4b1c | 291 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
Kojto | 111:4336505e4b1c | 292 | |
Kojto | 111:4336505e4b1c | 293 | #define AC_STATUSA_OFFSET 0x08 /**< \brief (AC_STATUSA offset) Status A */ |
Kojto | 111:4336505e4b1c | 294 | #define AC_STATUSA_RESETVALUE 0x00ul /**< \brief (AC_STATUSA reset_value) Status A */ |
Kojto | 111:4336505e4b1c | 295 | |
Kojto | 111:4336505e4b1c | 296 | #define AC_STATUSA_STATE0_Pos 0 /**< \brief (AC_STATUSA) Comparator 0 Current State */ |
Kojto | 111:4336505e4b1c | 297 | #define AC_STATUSA_STATE0 (1 << AC_STATUSA_STATE0_Pos) |
Kojto | 111:4336505e4b1c | 298 | #define AC_STATUSA_STATE1_Pos 1 /**< \brief (AC_STATUSA) Comparator 1 Current State */ |
Kojto | 111:4336505e4b1c | 299 | #define AC_STATUSA_STATE1 (1 << AC_STATUSA_STATE1_Pos) |
Kojto | 111:4336505e4b1c | 300 | #define AC_STATUSA_STATE_Pos 0 /**< \brief (AC_STATUSA) Comparator x Current State */ |
Kojto | 111:4336505e4b1c | 301 | #define AC_STATUSA_STATE_Msk (0x3ul << AC_STATUSA_STATE_Pos) |
Kojto | 111:4336505e4b1c | 302 | #define AC_STATUSA_STATE(value) ((AC_STATUSA_STATE_Msk & ((value) << AC_STATUSA_STATE_Pos))) |
Kojto | 111:4336505e4b1c | 303 | #define AC_STATUSA_WSTATE0_Pos 4 /**< \brief (AC_STATUSA) Window 0 Current State */ |
Kojto | 111:4336505e4b1c | 304 | #define AC_STATUSA_WSTATE0_Msk (0x3ul << AC_STATUSA_WSTATE0_Pos) |
Kojto | 111:4336505e4b1c | 305 | #define AC_STATUSA_WSTATE0(value) ((AC_STATUSA_WSTATE0_Msk & ((value) << AC_STATUSA_WSTATE0_Pos))) |
Kojto | 111:4336505e4b1c | 306 | #define AC_STATUSA_WSTATE0_ABOVE_Val 0x0ul /**< \brief (AC_STATUSA) Signal is above window */ |
Kojto | 111:4336505e4b1c | 307 | #define AC_STATUSA_WSTATE0_INSIDE_Val 0x1ul /**< \brief (AC_STATUSA) Signal is inside window */ |
Kojto | 111:4336505e4b1c | 308 | #define AC_STATUSA_WSTATE0_BELOW_Val 0x2ul /**< \brief (AC_STATUSA) Signal is below window */ |
Kojto | 111:4336505e4b1c | 309 | #define AC_STATUSA_WSTATE0_ABOVE (AC_STATUSA_WSTATE0_ABOVE_Val << AC_STATUSA_WSTATE0_Pos) |
Kojto | 111:4336505e4b1c | 310 | #define AC_STATUSA_WSTATE0_INSIDE (AC_STATUSA_WSTATE0_INSIDE_Val << AC_STATUSA_WSTATE0_Pos) |
Kojto | 111:4336505e4b1c | 311 | #define AC_STATUSA_WSTATE0_BELOW (AC_STATUSA_WSTATE0_BELOW_Val << AC_STATUSA_WSTATE0_Pos) |
Kojto | 111:4336505e4b1c | 312 | #define AC_STATUSA_MASK 0x33ul /**< \brief (AC_STATUSA) MASK Register */ |
Kojto | 111:4336505e4b1c | 313 | |
Kojto | 111:4336505e4b1c | 314 | /* -------- AC_STATUSB : (AC Offset: 0x09) (R/ 8) Status B -------- */ |
Kojto | 111:4336505e4b1c | 315 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
Kojto | 111:4336505e4b1c | 316 | typedef union { |
Kojto | 111:4336505e4b1c | 317 | struct { |
Kojto | 111:4336505e4b1c | 318 | uint8_t READY0:1; /*!< bit: 0 Comparator 0 Ready */ |
Kojto | 111:4336505e4b1c | 319 | uint8_t READY1:1; /*!< bit: 1 Comparator 1 Ready */ |
Kojto | 111:4336505e4b1c | 320 | uint8_t :5; /*!< bit: 2.. 6 Reserved */ |
Kojto | 111:4336505e4b1c | 321 | uint8_t SYNCBUSY:1; /*!< bit: 7 Synchronization Busy */ |
Kojto | 111:4336505e4b1c | 322 | } bit; /*!< Structure used for bit access */ |
Kojto | 111:4336505e4b1c | 323 | struct { |
Kojto | 111:4336505e4b1c | 324 | uint8_t READY:2; /*!< bit: 0.. 1 Comparator x Ready */ |
Kojto | 111:4336505e4b1c | 325 | uint8_t :6; /*!< bit: 2.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 326 | } vec; /*!< Structure used for vec access */ |
Kojto | 111:4336505e4b1c | 327 | uint8_t reg; /*!< Type used for register access */ |
Kojto | 111:4336505e4b1c | 328 | } AC_STATUSB_Type; |
Kojto | 111:4336505e4b1c | 329 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
Kojto | 111:4336505e4b1c | 330 | |
Kojto | 111:4336505e4b1c | 331 | #define AC_STATUSB_OFFSET 0x09 /**< \brief (AC_STATUSB offset) Status B */ |
Kojto | 111:4336505e4b1c | 332 | #define AC_STATUSB_RESETVALUE 0x00ul /**< \brief (AC_STATUSB reset_value) Status B */ |
Kojto | 111:4336505e4b1c | 333 | |
Kojto | 111:4336505e4b1c | 334 | #define AC_STATUSB_READY0_Pos 0 /**< \brief (AC_STATUSB) Comparator 0 Ready */ |
Kojto | 111:4336505e4b1c | 335 | #define AC_STATUSB_READY0 (1 << AC_STATUSB_READY0_Pos) |
Kojto | 111:4336505e4b1c | 336 | #define AC_STATUSB_READY1_Pos 1 /**< \brief (AC_STATUSB) Comparator 1 Ready */ |
Kojto | 111:4336505e4b1c | 337 | #define AC_STATUSB_READY1 (1 << AC_STATUSB_READY1_Pos) |
Kojto | 111:4336505e4b1c | 338 | #define AC_STATUSB_READY_Pos 0 /**< \brief (AC_STATUSB) Comparator x Ready */ |
Kojto | 111:4336505e4b1c | 339 | #define AC_STATUSB_READY_Msk (0x3ul << AC_STATUSB_READY_Pos) |
Kojto | 111:4336505e4b1c | 340 | #define AC_STATUSB_READY(value) ((AC_STATUSB_READY_Msk & ((value) << AC_STATUSB_READY_Pos))) |
Kojto | 111:4336505e4b1c | 341 | #define AC_STATUSB_SYNCBUSY_Pos 7 /**< \brief (AC_STATUSB) Synchronization Busy */ |
Kojto | 111:4336505e4b1c | 342 | #define AC_STATUSB_SYNCBUSY (0x1ul << AC_STATUSB_SYNCBUSY_Pos) |
Kojto | 111:4336505e4b1c | 343 | #define AC_STATUSB_MASK 0x83ul /**< \brief (AC_STATUSB) MASK Register */ |
Kojto | 111:4336505e4b1c | 344 | |
Kojto | 111:4336505e4b1c | 345 | /* -------- AC_STATUSC : (AC Offset: 0x0A) (R/ 8) Status C -------- */ |
Kojto | 111:4336505e4b1c | 346 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
Kojto | 111:4336505e4b1c | 347 | typedef union { |
Kojto | 111:4336505e4b1c | 348 | struct { |
Kojto | 111:4336505e4b1c | 349 | uint8_t STATE0:1; /*!< bit: 0 Comparator 0 Current State */ |
Kojto | 111:4336505e4b1c | 350 | uint8_t STATE1:1; /*!< bit: 1 Comparator 1 Current State */ |
Kojto | 111:4336505e4b1c | 351 | uint8_t :2; /*!< bit: 2.. 3 Reserved */ |
Kojto | 111:4336505e4b1c | 352 | uint8_t WSTATE0:2; /*!< bit: 4.. 5 Window 0 Current State */ |
Kojto | 111:4336505e4b1c | 353 | uint8_t :2; /*!< bit: 6.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 354 | } bit; /*!< Structure used for bit access */ |
Kojto | 111:4336505e4b1c | 355 | struct { |
Kojto | 111:4336505e4b1c | 356 | uint8_t STATE:2; /*!< bit: 0.. 1 Comparator x Current State */ |
Kojto | 111:4336505e4b1c | 357 | uint8_t :6; /*!< bit: 2.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 358 | } vec; /*!< Structure used for vec access */ |
Kojto | 111:4336505e4b1c | 359 | uint8_t reg; /*!< Type used for register access */ |
Kojto | 111:4336505e4b1c | 360 | } AC_STATUSC_Type; |
Kojto | 111:4336505e4b1c | 361 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
Kojto | 111:4336505e4b1c | 362 | |
Kojto | 111:4336505e4b1c | 363 | #define AC_STATUSC_OFFSET 0x0A /**< \brief (AC_STATUSC offset) Status C */ |
Kojto | 111:4336505e4b1c | 364 | #define AC_STATUSC_RESETVALUE 0x00ul /**< \brief (AC_STATUSC reset_value) Status C */ |
Kojto | 111:4336505e4b1c | 365 | |
Kojto | 111:4336505e4b1c | 366 | #define AC_STATUSC_STATE0_Pos 0 /**< \brief (AC_STATUSC) Comparator 0 Current State */ |
Kojto | 111:4336505e4b1c | 367 | #define AC_STATUSC_STATE0 (1 << AC_STATUSC_STATE0_Pos) |
Kojto | 111:4336505e4b1c | 368 | #define AC_STATUSC_STATE1_Pos 1 /**< \brief (AC_STATUSC) Comparator 1 Current State */ |
Kojto | 111:4336505e4b1c | 369 | #define AC_STATUSC_STATE1 (1 << AC_STATUSC_STATE1_Pos) |
Kojto | 111:4336505e4b1c | 370 | #define AC_STATUSC_STATE_Pos 0 /**< \brief (AC_STATUSC) Comparator x Current State */ |
Kojto | 111:4336505e4b1c | 371 | #define AC_STATUSC_STATE_Msk (0x3ul << AC_STATUSC_STATE_Pos) |
Kojto | 111:4336505e4b1c | 372 | #define AC_STATUSC_STATE(value) ((AC_STATUSC_STATE_Msk & ((value) << AC_STATUSC_STATE_Pos))) |
Kojto | 111:4336505e4b1c | 373 | #define AC_STATUSC_WSTATE0_Pos 4 /**< \brief (AC_STATUSC) Window 0 Current State */ |
Kojto | 111:4336505e4b1c | 374 | #define AC_STATUSC_WSTATE0_Msk (0x3ul << AC_STATUSC_WSTATE0_Pos) |
Kojto | 111:4336505e4b1c | 375 | #define AC_STATUSC_WSTATE0(value) ((AC_STATUSC_WSTATE0_Msk & ((value) << AC_STATUSC_WSTATE0_Pos))) |
Kojto | 111:4336505e4b1c | 376 | #define AC_STATUSC_WSTATE0_ABOVE_Val 0x0ul /**< \brief (AC_STATUSC) Signal is above window */ |
Kojto | 111:4336505e4b1c | 377 | #define AC_STATUSC_WSTATE0_INSIDE_Val 0x1ul /**< \brief (AC_STATUSC) Signal is inside window */ |
Kojto | 111:4336505e4b1c | 378 | #define AC_STATUSC_WSTATE0_BELOW_Val 0x2ul /**< \brief (AC_STATUSC) Signal is below window */ |
Kojto | 111:4336505e4b1c | 379 | #define AC_STATUSC_WSTATE0_ABOVE (AC_STATUSC_WSTATE0_ABOVE_Val << AC_STATUSC_WSTATE0_Pos) |
Kojto | 111:4336505e4b1c | 380 | #define AC_STATUSC_WSTATE0_INSIDE (AC_STATUSC_WSTATE0_INSIDE_Val << AC_STATUSC_WSTATE0_Pos) |
Kojto | 111:4336505e4b1c | 381 | #define AC_STATUSC_WSTATE0_BELOW (AC_STATUSC_WSTATE0_BELOW_Val << AC_STATUSC_WSTATE0_Pos) |
Kojto | 111:4336505e4b1c | 382 | #define AC_STATUSC_MASK 0x33ul /**< \brief (AC_STATUSC) MASK Register */ |
Kojto | 111:4336505e4b1c | 383 | |
Kojto | 111:4336505e4b1c | 384 | /* -------- AC_WINCTRL : (AC Offset: 0x0C) (R/W 8) Window Control -------- */ |
Kojto | 111:4336505e4b1c | 385 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
Kojto | 111:4336505e4b1c | 386 | typedef union { |
Kojto | 111:4336505e4b1c | 387 | struct { |
Kojto | 111:4336505e4b1c | 388 | uint8_t WEN0:1; /*!< bit: 0 Window 0 Mode Enable */ |
Kojto | 111:4336505e4b1c | 389 | uint8_t WINTSEL0:2; /*!< bit: 1.. 2 Window 0 Interrupt Selection */ |
Kojto | 111:4336505e4b1c | 390 | uint8_t :5; /*!< bit: 3.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 391 | } bit; /*!< Structure used for bit access */ |
Kojto | 111:4336505e4b1c | 392 | uint8_t reg; /*!< Type used for register access */ |
Kojto | 111:4336505e4b1c | 393 | } AC_WINCTRL_Type; |
Kojto | 111:4336505e4b1c | 394 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
Kojto | 111:4336505e4b1c | 395 | |
Kojto | 111:4336505e4b1c | 396 | #define AC_WINCTRL_OFFSET 0x0C /**< \brief (AC_WINCTRL offset) Window Control */ |
Kojto | 111:4336505e4b1c | 397 | #define AC_WINCTRL_RESETVALUE 0x00ul /**< \brief (AC_WINCTRL reset_value) Window Control */ |
Kojto | 111:4336505e4b1c | 398 | |
Kojto | 111:4336505e4b1c | 399 | #define AC_WINCTRL_WEN0_Pos 0 /**< \brief (AC_WINCTRL) Window 0 Mode Enable */ |
Kojto | 111:4336505e4b1c | 400 | #define AC_WINCTRL_WEN0 (0x1ul << AC_WINCTRL_WEN0_Pos) |
Kojto | 111:4336505e4b1c | 401 | #define AC_WINCTRL_WINTSEL0_Pos 1 /**< \brief (AC_WINCTRL) Window 0 Interrupt Selection */ |
Kojto | 111:4336505e4b1c | 402 | #define AC_WINCTRL_WINTSEL0_Msk (0x3ul << AC_WINCTRL_WINTSEL0_Pos) |
Kojto | 111:4336505e4b1c | 403 | #define AC_WINCTRL_WINTSEL0(value) ((AC_WINCTRL_WINTSEL0_Msk & ((value) << AC_WINCTRL_WINTSEL0_Pos))) |
Kojto | 111:4336505e4b1c | 404 | #define AC_WINCTRL_WINTSEL0_ABOVE_Val 0x0ul /**< \brief (AC_WINCTRL) Interrupt on signal above window */ |
Kojto | 111:4336505e4b1c | 405 | #define AC_WINCTRL_WINTSEL0_INSIDE_Val 0x1ul /**< \brief (AC_WINCTRL) Interrupt on signal inside window */ |
Kojto | 111:4336505e4b1c | 406 | #define AC_WINCTRL_WINTSEL0_BELOW_Val 0x2ul /**< \brief (AC_WINCTRL) Interrupt on signal below window */ |
Kojto | 111:4336505e4b1c | 407 | #define AC_WINCTRL_WINTSEL0_OUTSIDE_Val 0x3ul /**< \brief (AC_WINCTRL) Interrupt on signal outside window */ |
Kojto | 111:4336505e4b1c | 408 | #define AC_WINCTRL_WINTSEL0_ABOVE (AC_WINCTRL_WINTSEL0_ABOVE_Val << AC_WINCTRL_WINTSEL0_Pos) |
Kojto | 111:4336505e4b1c | 409 | #define AC_WINCTRL_WINTSEL0_INSIDE (AC_WINCTRL_WINTSEL0_INSIDE_Val << AC_WINCTRL_WINTSEL0_Pos) |
Kojto | 111:4336505e4b1c | 410 | #define AC_WINCTRL_WINTSEL0_BELOW (AC_WINCTRL_WINTSEL0_BELOW_Val << AC_WINCTRL_WINTSEL0_Pos) |
Kojto | 111:4336505e4b1c | 411 | #define AC_WINCTRL_WINTSEL0_OUTSIDE (AC_WINCTRL_WINTSEL0_OUTSIDE_Val << AC_WINCTRL_WINTSEL0_Pos) |
Kojto | 111:4336505e4b1c | 412 | #define AC_WINCTRL_MASK 0x07ul /**< \brief (AC_WINCTRL) MASK Register */ |
Kojto | 111:4336505e4b1c | 413 | |
Kojto | 111:4336505e4b1c | 414 | /* -------- AC_COMPCTRL : (AC Offset: 0x10) (R/W 32) Comparator Control n -------- */ |
Kojto | 111:4336505e4b1c | 415 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
Kojto | 111:4336505e4b1c | 416 | typedef union { |
Kojto | 111:4336505e4b1c | 417 | struct { |
Kojto | 111:4336505e4b1c | 418 | uint32_t ENABLE:1; /*!< bit: 0 Enable */ |
Kojto | 111:4336505e4b1c | 419 | uint32_t SINGLE:1; /*!< bit: 1 Single-Shot Mode */ |
Kojto | 111:4336505e4b1c | 420 | uint32_t SPEED:2; /*!< bit: 2.. 3 Speed Selection */ |
Kojto | 111:4336505e4b1c | 421 | uint32_t :1; /*!< bit: 4 Reserved */ |
Kojto | 111:4336505e4b1c | 422 | uint32_t INTSEL:2; /*!< bit: 5.. 6 Interrupt Selection */ |
Kojto | 111:4336505e4b1c | 423 | uint32_t :1; /*!< bit: 7 Reserved */ |
Kojto | 111:4336505e4b1c | 424 | uint32_t MUXNEG:3; /*!< bit: 8..10 Negative Input Mux Selection */ |
Kojto | 111:4336505e4b1c | 425 | uint32_t :1; /*!< bit: 11 Reserved */ |
Kojto | 111:4336505e4b1c | 426 | uint32_t MUXPOS:2; /*!< bit: 12..13 Positive Input Mux Selection */ |
Kojto | 111:4336505e4b1c | 427 | uint32_t :1; /*!< bit: 14 Reserved */ |
Kojto | 111:4336505e4b1c | 428 | uint32_t SWAP:1; /*!< bit: 15 Swap Inputs and Invert */ |
Kojto | 111:4336505e4b1c | 429 | uint32_t OUT:2; /*!< bit: 16..17 Output */ |
Kojto | 111:4336505e4b1c | 430 | uint32_t :1; /*!< bit: 18 Reserved */ |
Kojto | 111:4336505e4b1c | 431 | uint32_t HYST:1; /*!< bit: 19 Hysteresis Enable */ |
Kojto | 111:4336505e4b1c | 432 | uint32_t :4; /*!< bit: 20..23 Reserved */ |
Kojto | 111:4336505e4b1c | 433 | uint32_t FLEN:3; /*!< bit: 24..26 Filter Length */ |
Kojto | 111:4336505e4b1c | 434 | uint32_t :5; /*!< bit: 27..31 Reserved */ |
Kojto | 111:4336505e4b1c | 435 | } bit; /*!< Structure used for bit access */ |
Kojto | 111:4336505e4b1c | 436 | uint32_t reg; /*!< Type used for register access */ |
Kojto | 111:4336505e4b1c | 437 | } AC_COMPCTRL_Type; |
Kojto | 111:4336505e4b1c | 438 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
Kojto | 111:4336505e4b1c | 439 | |
Kojto | 111:4336505e4b1c | 440 | #define AC_COMPCTRL_OFFSET 0x10 /**< \brief (AC_COMPCTRL offset) Comparator Control n */ |
Kojto | 111:4336505e4b1c | 441 | #define AC_COMPCTRL_RESETVALUE 0x00000000ul /**< \brief (AC_COMPCTRL reset_value) Comparator Control n */ |
Kojto | 111:4336505e4b1c | 442 | |
Kojto | 111:4336505e4b1c | 443 | #define AC_COMPCTRL_ENABLE_Pos 0 /**< \brief (AC_COMPCTRL) Enable */ |
Kojto | 111:4336505e4b1c | 444 | #define AC_COMPCTRL_ENABLE (0x1ul << AC_COMPCTRL_ENABLE_Pos) |
Kojto | 111:4336505e4b1c | 445 | #define AC_COMPCTRL_SINGLE_Pos 1 /**< \brief (AC_COMPCTRL) Single-Shot Mode */ |
Kojto | 111:4336505e4b1c | 446 | #define AC_COMPCTRL_SINGLE (0x1ul << AC_COMPCTRL_SINGLE_Pos) |
Kojto | 111:4336505e4b1c | 447 | #define AC_COMPCTRL_SPEED_Pos 2 /**< \brief (AC_COMPCTRL) Speed Selection */ |
Kojto | 111:4336505e4b1c | 448 | #define AC_COMPCTRL_SPEED_Msk (0x3ul << AC_COMPCTRL_SPEED_Pos) |
Kojto | 111:4336505e4b1c | 449 | #define AC_COMPCTRL_SPEED(value) ((AC_COMPCTRL_SPEED_Msk & ((value) << AC_COMPCTRL_SPEED_Pos))) |
Kojto | 111:4336505e4b1c | 450 | #define AC_COMPCTRL_SPEED_LOW_Val 0x0ul /**< \brief (AC_COMPCTRL) Low speed */ |
Kojto | 111:4336505e4b1c | 451 | #define AC_COMPCTRL_SPEED_HIGH_Val 0x1ul /**< \brief (AC_COMPCTRL) High speed */ |
Kojto | 111:4336505e4b1c | 452 | #define AC_COMPCTRL_SPEED_LOW (AC_COMPCTRL_SPEED_LOW_Val << AC_COMPCTRL_SPEED_Pos) |
Kojto | 111:4336505e4b1c | 453 | #define AC_COMPCTRL_SPEED_HIGH (AC_COMPCTRL_SPEED_HIGH_Val << AC_COMPCTRL_SPEED_Pos) |
Kojto | 111:4336505e4b1c | 454 | #define AC_COMPCTRL_INTSEL_Pos 5 /**< \brief (AC_COMPCTRL) Interrupt Selection */ |
Kojto | 111:4336505e4b1c | 455 | #define AC_COMPCTRL_INTSEL_Msk (0x3ul << AC_COMPCTRL_INTSEL_Pos) |
Kojto | 111:4336505e4b1c | 456 | #define AC_COMPCTRL_INTSEL(value) ((AC_COMPCTRL_INTSEL_Msk & ((value) << AC_COMPCTRL_INTSEL_Pos))) |
Kojto | 111:4336505e4b1c | 457 | #define AC_COMPCTRL_INTSEL_TOGGLE_Val 0x0ul /**< \brief (AC_COMPCTRL) Interrupt on comparator output toggle */ |
Kojto | 111:4336505e4b1c | 458 | #define AC_COMPCTRL_INTSEL_RISING_Val 0x1ul /**< \brief (AC_COMPCTRL) Interrupt on comparator output rising */ |
Kojto | 111:4336505e4b1c | 459 | #define AC_COMPCTRL_INTSEL_FALLING_Val 0x2ul /**< \brief (AC_COMPCTRL) Interrupt on comparator output falling */ |
Kojto | 111:4336505e4b1c | 460 | #define AC_COMPCTRL_INTSEL_EOC_Val 0x3ul /**< \brief (AC_COMPCTRL) Interrupt on end of comparison (single-shot mode only) */ |
Kojto | 111:4336505e4b1c | 461 | #define AC_COMPCTRL_INTSEL_TOGGLE (AC_COMPCTRL_INTSEL_TOGGLE_Val << AC_COMPCTRL_INTSEL_Pos) |
Kojto | 111:4336505e4b1c | 462 | #define AC_COMPCTRL_INTSEL_RISING (AC_COMPCTRL_INTSEL_RISING_Val << AC_COMPCTRL_INTSEL_Pos) |
Kojto | 111:4336505e4b1c | 463 | #define AC_COMPCTRL_INTSEL_FALLING (AC_COMPCTRL_INTSEL_FALLING_Val << AC_COMPCTRL_INTSEL_Pos) |
Kojto | 111:4336505e4b1c | 464 | #define AC_COMPCTRL_INTSEL_EOC (AC_COMPCTRL_INTSEL_EOC_Val << AC_COMPCTRL_INTSEL_Pos) |
Kojto | 111:4336505e4b1c | 465 | #define AC_COMPCTRL_MUXNEG_Pos 8 /**< \brief (AC_COMPCTRL) Negative Input Mux Selection */ |
Kojto | 111:4336505e4b1c | 466 | #define AC_COMPCTRL_MUXNEG_Msk (0x7ul << AC_COMPCTRL_MUXNEG_Pos) |
Kojto | 111:4336505e4b1c | 467 | #define AC_COMPCTRL_MUXNEG(value) ((AC_COMPCTRL_MUXNEG_Msk & ((value) << AC_COMPCTRL_MUXNEG_Pos))) |
Kojto | 111:4336505e4b1c | 468 | #define AC_COMPCTRL_MUXNEG_PIN0_Val 0x0ul /**< \brief (AC_COMPCTRL) I/O pin 0 */ |
Kojto | 111:4336505e4b1c | 469 | #define AC_COMPCTRL_MUXNEG_PIN1_Val 0x1ul /**< \brief (AC_COMPCTRL) I/O pin 1 */ |
Kojto | 111:4336505e4b1c | 470 | #define AC_COMPCTRL_MUXNEG_PIN2_Val 0x2ul /**< \brief (AC_COMPCTRL) I/O pin 2 */ |
Kojto | 111:4336505e4b1c | 471 | #define AC_COMPCTRL_MUXNEG_PIN3_Val 0x3ul /**< \brief (AC_COMPCTRL) I/O pin 3 */ |
Kojto | 111:4336505e4b1c | 472 | #define AC_COMPCTRL_MUXNEG_GND_Val 0x4ul /**< \brief (AC_COMPCTRL) Ground */ |
Kojto | 111:4336505e4b1c | 473 | #define AC_COMPCTRL_MUXNEG_VSCALE_Val 0x5ul /**< \brief (AC_COMPCTRL) VDD scaler */ |
Kojto | 111:4336505e4b1c | 474 | #define AC_COMPCTRL_MUXNEG_BANDGAP_Val 0x6ul /**< \brief (AC_COMPCTRL) Internal bandgap voltage */ |
Kojto | 111:4336505e4b1c | 475 | #define AC_COMPCTRL_MUXNEG_DAC_Val 0x7ul /**< \brief (AC_COMPCTRL) DAC output */ |
Kojto | 111:4336505e4b1c | 476 | #define AC_COMPCTRL_MUXNEG_PIN0 (AC_COMPCTRL_MUXNEG_PIN0_Val << AC_COMPCTRL_MUXNEG_Pos) |
Kojto | 111:4336505e4b1c | 477 | #define AC_COMPCTRL_MUXNEG_PIN1 (AC_COMPCTRL_MUXNEG_PIN1_Val << AC_COMPCTRL_MUXNEG_Pos) |
Kojto | 111:4336505e4b1c | 478 | #define AC_COMPCTRL_MUXNEG_PIN2 (AC_COMPCTRL_MUXNEG_PIN2_Val << AC_COMPCTRL_MUXNEG_Pos) |
Kojto | 111:4336505e4b1c | 479 | #define AC_COMPCTRL_MUXNEG_PIN3 (AC_COMPCTRL_MUXNEG_PIN3_Val << AC_COMPCTRL_MUXNEG_Pos) |
Kojto | 111:4336505e4b1c | 480 | #define AC_COMPCTRL_MUXNEG_GND (AC_COMPCTRL_MUXNEG_GND_Val << AC_COMPCTRL_MUXNEG_Pos) |
Kojto | 111:4336505e4b1c | 481 | #define AC_COMPCTRL_MUXNEG_VSCALE (AC_COMPCTRL_MUXNEG_VSCALE_Val << AC_COMPCTRL_MUXNEG_Pos) |
Kojto | 111:4336505e4b1c | 482 | #define AC_COMPCTRL_MUXNEG_BANDGAP (AC_COMPCTRL_MUXNEG_BANDGAP_Val << AC_COMPCTRL_MUXNEG_Pos) |
Kojto | 111:4336505e4b1c | 483 | #define AC_COMPCTRL_MUXNEG_DAC (AC_COMPCTRL_MUXNEG_DAC_Val << AC_COMPCTRL_MUXNEG_Pos) |
Kojto | 111:4336505e4b1c | 484 | #define AC_COMPCTRL_MUXPOS_Pos 12 /**< \brief (AC_COMPCTRL) Positive Input Mux Selection */ |
Kojto | 111:4336505e4b1c | 485 | #define AC_COMPCTRL_MUXPOS_Msk (0x3ul << AC_COMPCTRL_MUXPOS_Pos) |
Kojto | 111:4336505e4b1c | 486 | #define AC_COMPCTRL_MUXPOS(value) ((AC_COMPCTRL_MUXPOS_Msk & ((value) << AC_COMPCTRL_MUXPOS_Pos))) |
Kojto | 111:4336505e4b1c | 487 | #define AC_COMPCTRL_MUXPOS_PIN0_Val 0x0ul /**< \brief (AC_COMPCTRL) I/O pin 0 */ |
Kojto | 111:4336505e4b1c | 488 | #define AC_COMPCTRL_MUXPOS_PIN1_Val 0x1ul /**< \brief (AC_COMPCTRL) I/O pin 1 */ |
Kojto | 111:4336505e4b1c | 489 | #define AC_COMPCTRL_MUXPOS_PIN2_Val 0x2ul /**< \brief (AC_COMPCTRL) I/O pin 2 */ |
Kojto | 111:4336505e4b1c | 490 | #define AC_COMPCTRL_MUXPOS_PIN3_Val 0x3ul /**< \brief (AC_COMPCTRL) I/O pin 3 */ |
Kojto | 111:4336505e4b1c | 491 | #define AC_COMPCTRL_MUXPOS_PIN0 (AC_COMPCTRL_MUXPOS_PIN0_Val << AC_COMPCTRL_MUXPOS_Pos) |
Kojto | 111:4336505e4b1c | 492 | #define AC_COMPCTRL_MUXPOS_PIN1 (AC_COMPCTRL_MUXPOS_PIN1_Val << AC_COMPCTRL_MUXPOS_Pos) |
Kojto | 111:4336505e4b1c | 493 | #define AC_COMPCTRL_MUXPOS_PIN2 (AC_COMPCTRL_MUXPOS_PIN2_Val << AC_COMPCTRL_MUXPOS_Pos) |
Kojto | 111:4336505e4b1c | 494 | #define AC_COMPCTRL_MUXPOS_PIN3 (AC_COMPCTRL_MUXPOS_PIN3_Val << AC_COMPCTRL_MUXPOS_Pos) |
Kojto | 111:4336505e4b1c | 495 | #define AC_COMPCTRL_SWAP_Pos 15 /**< \brief (AC_COMPCTRL) Swap Inputs and Invert */ |
Kojto | 111:4336505e4b1c | 496 | #define AC_COMPCTRL_SWAP (0x1ul << AC_COMPCTRL_SWAP_Pos) |
Kojto | 111:4336505e4b1c | 497 | #define AC_COMPCTRL_OUT_Pos 16 /**< \brief (AC_COMPCTRL) Output */ |
Kojto | 111:4336505e4b1c | 498 | #define AC_COMPCTRL_OUT_Msk (0x3ul << AC_COMPCTRL_OUT_Pos) |
Kojto | 111:4336505e4b1c | 499 | #define AC_COMPCTRL_OUT(value) ((AC_COMPCTRL_OUT_Msk & ((value) << AC_COMPCTRL_OUT_Pos))) |
Kojto | 111:4336505e4b1c | 500 | #define AC_COMPCTRL_OUT_OFF_Val 0x0ul /**< \brief (AC_COMPCTRL) The output of COMPn is not routed to the COMPn I/O port */ |
Kojto | 111:4336505e4b1c | 501 | #define AC_COMPCTRL_OUT_ASYNC_Val 0x1ul /**< \brief (AC_COMPCTRL) The asynchronous output of COMPn is routed to the COMPn I/O port */ |
Kojto | 111:4336505e4b1c | 502 | #define AC_COMPCTRL_OUT_SYNC_Val 0x2ul /**< \brief (AC_COMPCTRL) The synchronous output (including filtering) of COMPn is routed to the COMPn I/O port */ |
Kojto | 111:4336505e4b1c | 503 | #define AC_COMPCTRL_OUT_OFF (AC_COMPCTRL_OUT_OFF_Val << AC_COMPCTRL_OUT_Pos) |
Kojto | 111:4336505e4b1c | 504 | #define AC_COMPCTRL_OUT_ASYNC (AC_COMPCTRL_OUT_ASYNC_Val << AC_COMPCTRL_OUT_Pos) |
Kojto | 111:4336505e4b1c | 505 | #define AC_COMPCTRL_OUT_SYNC (AC_COMPCTRL_OUT_SYNC_Val << AC_COMPCTRL_OUT_Pos) |
Kojto | 111:4336505e4b1c | 506 | #define AC_COMPCTRL_HYST_Pos 19 /**< \brief (AC_COMPCTRL) Hysteresis Enable */ |
Kojto | 111:4336505e4b1c | 507 | #define AC_COMPCTRL_HYST (0x1ul << AC_COMPCTRL_HYST_Pos) |
Kojto | 111:4336505e4b1c | 508 | #define AC_COMPCTRL_FLEN_Pos 24 /**< \brief (AC_COMPCTRL) Filter Length */ |
Kojto | 111:4336505e4b1c | 509 | #define AC_COMPCTRL_FLEN_Msk (0x7ul << AC_COMPCTRL_FLEN_Pos) |
Kojto | 111:4336505e4b1c | 510 | #define AC_COMPCTRL_FLEN(value) ((AC_COMPCTRL_FLEN_Msk & ((value) << AC_COMPCTRL_FLEN_Pos))) |
Kojto | 111:4336505e4b1c | 511 | #define AC_COMPCTRL_FLEN_OFF_Val 0x0ul /**< \brief (AC_COMPCTRL) No filtering */ |
Kojto | 111:4336505e4b1c | 512 | #define AC_COMPCTRL_FLEN_MAJ3_Val 0x1ul /**< \brief (AC_COMPCTRL) 3-bit majority function (2 of 3) */ |
Kojto | 111:4336505e4b1c | 513 | #define AC_COMPCTRL_FLEN_MAJ5_Val 0x2ul /**< \brief (AC_COMPCTRL) 5-bit majority function (3 of 5) */ |
Kojto | 111:4336505e4b1c | 514 | #define AC_COMPCTRL_FLEN_OFF (AC_COMPCTRL_FLEN_OFF_Val << AC_COMPCTRL_FLEN_Pos) |
Kojto | 111:4336505e4b1c | 515 | #define AC_COMPCTRL_FLEN_MAJ3 (AC_COMPCTRL_FLEN_MAJ3_Val << AC_COMPCTRL_FLEN_Pos) |
Kojto | 111:4336505e4b1c | 516 | #define AC_COMPCTRL_FLEN_MAJ5 (AC_COMPCTRL_FLEN_MAJ5_Val << AC_COMPCTRL_FLEN_Pos) |
Kojto | 111:4336505e4b1c | 517 | #define AC_COMPCTRL_MASK 0x070BB76Ful /**< \brief (AC_COMPCTRL) MASK Register */ |
Kojto | 111:4336505e4b1c | 518 | |
Kojto | 111:4336505e4b1c | 519 | /* -------- AC_SCALER : (AC Offset: 0x20) (R/W 8) Scaler n -------- */ |
Kojto | 111:4336505e4b1c | 520 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
Kojto | 111:4336505e4b1c | 521 | typedef union { |
Kojto | 111:4336505e4b1c | 522 | struct { |
Kojto | 111:4336505e4b1c | 523 | uint8_t VALUE:6; /*!< bit: 0.. 5 Scaler Value */ |
Kojto | 111:4336505e4b1c | 524 | uint8_t :2; /*!< bit: 6.. 7 Reserved */ |
Kojto | 111:4336505e4b1c | 525 | } bit; /*!< Structure used for bit access */ |
Kojto | 111:4336505e4b1c | 526 | uint8_t reg; /*!< Type used for register access */ |
Kojto | 111:4336505e4b1c | 527 | } AC_SCALER_Type; |
Kojto | 111:4336505e4b1c | 528 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
Kojto | 111:4336505e4b1c | 529 | |
Kojto | 111:4336505e4b1c | 530 | #define AC_SCALER_OFFSET 0x20 /**< \brief (AC_SCALER offset) Scaler n */ |
Kojto | 111:4336505e4b1c | 531 | #define AC_SCALER_RESETVALUE 0x00ul /**< \brief (AC_SCALER reset_value) Scaler n */ |
Kojto | 111:4336505e4b1c | 532 | |
Kojto | 111:4336505e4b1c | 533 | #define AC_SCALER_VALUE_Pos 0 /**< \brief (AC_SCALER) Scaler Value */ |
Kojto | 111:4336505e4b1c | 534 | #define AC_SCALER_VALUE_Msk (0x3Ful << AC_SCALER_VALUE_Pos) |
Kojto | 111:4336505e4b1c | 535 | #define AC_SCALER_VALUE(value) ((AC_SCALER_VALUE_Msk & ((value) << AC_SCALER_VALUE_Pos))) |
Kojto | 111:4336505e4b1c | 536 | #define AC_SCALER_MASK 0x3Ful /**< \brief (AC_SCALER) MASK Register */ |
Kojto | 111:4336505e4b1c | 537 | |
Kojto | 111:4336505e4b1c | 538 | /** \brief AC hardware registers */ |
Kojto | 111:4336505e4b1c | 539 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
Kojto | 111:4336505e4b1c | 540 | typedef struct { |
Kojto | 111:4336505e4b1c | 541 | __IO AC_CTRLA_Type CTRLA; /**< \brief Offset: 0x00 (R/W 8) Control A */ |
Kojto | 111:4336505e4b1c | 542 | __O AC_CTRLB_Type CTRLB; /**< \brief Offset: 0x01 ( /W 8) Control B */ |
Kojto | 111:4336505e4b1c | 543 | __IO AC_EVCTRL_Type EVCTRL; /**< \brief Offset: 0x02 (R/W 16) Event Control */ |
Kojto | 111:4336505e4b1c | 544 | __IO AC_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x04 (R/W 8) Interrupt Enable Clear */ |
Kojto | 111:4336505e4b1c | 545 | __IO AC_INTENSET_Type INTENSET; /**< \brief Offset: 0x05 (R/W 8) Interrupt Enable Set */ |
Kojto | 111:4336505e4b1c | 546 | __IO AC_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x06 (R/W 8) Interrupt Flag Status and Clear */ |
Kojto | 111:4336505e4b1c | 547 | RoReg8 Reserved1[0x1]; |
Kojto | 111:4336505e4b1c | 548 | __I AC_STATUSA_Type STATUSA; /**< \brief Offset: 0x08 (R/ 8) Status A */ |
Kojto | 111:4336505e4b1c | 549 | __I AC_STATUSB_Type STATUSB; /**< \brief Offset: 0x09 (R/ 8) Status B */ |
Kojto | 111:4336505e4b1c | 550 | __I AC_STATUSC_Type STATUSC; /**< \brief Offset: 0x0A (R/ 8) Status C */ |
Kojto | 111:4336505e4b1c | 551 | RoReg8 Reserved2[0x1]; |
Kojto | 111:4336505e4b1c | 552 | __IO AC_WINCTRL_Type WINCTRL; /**< \brief Offset: 0x0C (R/W 8) Window Control */ |
Kojto | 111:4336505e4b1c | 553 | RoReg8 Reserved3[0x3]; |
Kojto | 111:4336505e4b1c | 554 | __IO AC_COMPCTRL_Type COMPCTRL[2]; /**< \brief Offset: 0x10 (R/W 32) Comparator Control n */ |
Kojto | 111:4336505e4b1c | 555 | RoReg8 Reserved4[0x8]; |
Kojto | 111:4336505e4b1c | 556 | __IO AC_SCALER_Type SCALER[2]; /**< \brief Offset: 0x20 (R/W 8) Scaler n */ |
Kojto | 111:4336505e4b1c | 557 | } Ac; |
Kojto | 111:4336505e4b1c | 558 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
Kojto | 111:4336505e4b1c | 559 | |
Kojto | 111:4336505e4b1c | 560 | /*@}*/ |
Kojto | 111:4336505e4b1c | 561 | |
Kojto | 111:4336505e4b1c | 562 | #endif /* _SAMD21_AC_COMPONENT_ */ |