The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
AnnaBridge
Date:
Wed Feb 20 20:53:29 2019 +0000
Revision:
172:65be27845400
Parent:
171:3a7713b1edbc
mbed library release version 165

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Anna Bridge 169:a7c7b631e539 1 /*******************************************************************************
Anna Bridge 169:a7c7b631e539 2 * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
Anna Bridge 169:a7c7b631e539 3 *
Anna Bridge 169:a7c7b631e539 4 * Permission is hereby granted, free of charge, to any person obtaining a
Anna Bridge 169:a7c7b631e539 5 * copy of this software and associated documentation files (the "Software"),
Anna Bridge 169:a7c7b631e539 6 * to deal in the Software without restriction, including without limitation
Anna Bridge 169:a7c7b631e539 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
Anna Bridge 169:a7c7b631e539 8 * and/or sell copies of the Software, and to permit persons to whom the
Anna Bridge 169:a7c7b631e539 9 * Software is furnished to do so, subject to the following conditions:
Anna Bridge 169:a7c7b631e539 10 *
Anna Bridge 169:a7c7b631e539 11 * The above copyright notice and this permission notice shall be included
Anna Bridge 169:a7c7b631e539 12 * in all copies or substantial portions of the Software.
Anna Bridge 169:a7c7b631e539 13 *
Anna Bridge 169:a7c7b631e539 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
Anna Bridge 169:a7c7b631e539 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Anna Bridge 169:a7c7b631e539 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Anna Bridge 169:a7c7b631e539 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
Anna Bridge 169:a7c7b631e539 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
Anna Bridge 169:a7c7b631e539 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
Anna Bridge 169:a7c7b631e539 20 * OTHER DEALINGS IN THE SOFTWARE.
Anna Bridge 169:a7c7b631e539 21 *
Anna Bridge 169:a7c7b631e539 22 * Except as contained in this notice, the name of Maxim Integrated
Anna Bridge 169:a7c7b631e539 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
Anna Bridge 169:a7c7b631e539 24 * Products, Inc. Branding Policy.
Anna Bridge 169:a7c7b631e539 25 *
Anna Bridge 169:a7c7b631e539 26 * The mere transfer of this software does not imply any licenses
Anna Bridge 169:a7c7b631e539 27 * of trade secrets, proprietary technology, copyrights, patents,
Anna Bridge 169:a7c7b631e539 28 * trademarks, maskwork rights, or any other form of intellectual
Anna Bridge 169:a7c7b631e539 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
Anna Bridge 169:a7c7b631e539 30 * ownership rights.
Anna Bridge 169:a7c7b631e539 31 ******************************************************************************/
Anna Bridge 169:a7c7b631e539 32
Anna Bridge 169:a7c7b631e539 33 #ifndef _MXC_ADC_REGS_H_
Anna Bridge 169:a7c7b631e539 34 #define _MXC_ADC_REGS_H_
Anna Bridge 169:a7c7b631e539 35
Anna Bridge 169:a7c7b631e539 36 #ifdef __cplusplus
Anna Bridge 169:a7c7b631e539 37 extern "C" {
Anna Bridge 169:a7c7b631e539 38 #endif
Anna Bridge 169:a7c7b631e539 39
Anna Bridge 169:a7c7b631e539 40 #include <stdint.h>
Anna Bridge 169:a7c7b631e539 41 #include "mxc_device.h"
Anna Bridge 169:a7c7b631e539 42
Anna Bridge 169:a7c7b631e539 43 /*
Anna Bridge 169:a7c7b631e539 44 If types are not defined elsewhere (CMSIS) define them here
Anna Bridge 169:a7c7b631e539 45 */
Anna Bridge 169:a7c7b631e539 46 #ifndef __IO
Anna Bridge 169:a7c7b631e539 47 #define __IO volatile
Anna Bridge 169:a7c7b631e539 48 #endif
Anna Bridge 169:a7c7b631e539 49 #ifndef __I
Anna Bridge 169:a7c7b631e539 50 #define __I volatile const
Anna Bridge 169:a7c7b631e539 51 #endif
Anna Bridge 169:a7c7b631e539 52 #ifndef __O
Anna Bridge 169:a7c7b631e539 53 #define __O volatile
Anna Bridge 169:a7c7b631e539 54 #endif
Anna Bridge 169:a7c7b631e539 55
Anna Bridge 169:a7c7b631e539 56
Anna Bridge 169:a7c7b631e539 57 /*
Anna Bridge 169:a7c7b631e539 58 Typedefed structure(s) for module registers (per instance or section) with direct 32-bit
Anna Bridge 169:a7c7b631e539 59 access to each register in module.
Anna Bridge 169:a7c7b631e539 60 */
Anna Bridge 169:a7c7b631e539 61
Anna Bridge 169:a7c7b631e539 62 /* Offset Register Description
Anna Bridge 169:a7c7b631e539 63 ============= ============================================================================ */
Anna Bridge 169:a7c7b631e539 64 typedef struct {
Anna Bridge 169:a7c7b631e539 65 __IO uint32_t ctrl; /* 0x0000 ADC Control */
Anna Bridge 169:a7c7b631e539 66 __IO uint32_t status; /* 0x0004 ADC Status */
Anna Bridge 169:a7c7b631e539 67 __IO uint32_t data; /* 0x0008 ADC Output Data */
Anna Bridge 169:a7c7b631e539 68 __IO uint32_t intr; /* 0x000C ADC Interrupt Control Register */
Anna Bridge 169:a7c7b631e539 69 __IO uint32_t limit[4]; /* 0x0010-0x001C ADC Limit 0..3 */
Anna Bridge 169:a7c7b631e539 70 __IO uint32_t afe_ctrl; /* 0x0020 AFE Control Register */
Anna Bridge 169:a7c7b631e539 71 __IO uint32_t ro_cal0; /* 0x0024 RO Trim Calibration Register 0 */
Anna Bridge 169:a7c7b631e539 72 __IO uint32_t ro_cal1; /* 0x0028 RO Trim Calibration Register 1 */
Anna Bridge 169:a7c7b631e539 73 __IO uint32_t ro_cal2; /* 0x002C RO Trim Calibration Register 2 */
Anna Bridge 169:a7c7b631e539 74 } mxc_adc_regs_t;
Anna Bridge 169:a7c7b631e539 75
Anna Bridge 169:a7c7b631e539 76
Anna Bridge 169:a7c7b631e539 77 /*
Anna Bridge 169:a7c7b631e539 78 Register offsets for module ADC.
Anna Bridge 169:a7c7b631e539 79 */
Anna Bridge 169:a7c7b631e539 80
Anna Bridge 169:a7c7b631e539 81 #define MXC_R_ADC_OFFS_CTRL ((uint32_t)0x00000000UL)
Anna Bridge 169:a7c7b631e539 82 #define MXC_R_ADC_OFFS_STATUS ((uint32_t)0x00000004UL)
Anna Bridge 169:a7c7b631e539 83 #define MXC_R_ADC_OFFS_DATA ((uint32_t)0x00000008UL)
Anna Bridge 169:a7c7b631e539 84 #define MXC_R_ADC_OFFS_INTR ((uint32_t)0x0000000CUL)
Anna Bridge 169:a7c7b631e539 85 #define MXC_R_ADC_OFFS_LIMIT0 ((uint32_t)0x00000010UL)
Anna Bridge 169:a7c7b631e539 86 #define MXC_R_ADC_OFFS_LIMIT1 ((uint32_t)0x00000014UL)
Anna Bridge 169:a7c7b631e539 87 #define MXC_R_ADC_OFFS_LIMIT2 ((uint32_t)0x00000018UL)
Anna Bridge 169:a7c7b631e539 88 #define MXC_R_ADC_OFFS_LIMIT3 ((uint32_t)0x0000001CUL)
Anna Bridge 169:a7c7b631e539 89 #define MXC_R_ADC_OFFS_AFE_CTRL ((uint32_t)0x00000020UL)
Anna Bridge 169:a7c7b631e539 90 #define MXC_R_ADC_OFFS_RO_CAL0 ((uint32_t)0x00000024UL)
Anna Bridge 169:a7c7b631e539 91 #define MXC_R_ADC_OFFS_RO_CAL1 ((uint32_t)0x00000028UL)
Anna Bridge 169:a7c7b631e539 92 #define MXC_R_ADC_OFFS_RO_CAL2 ((uint32_t)0x0000002CUL)
Anna Bridge 169:a7c7b631e539 93
Anna Bridge 169:a7c7b631e539 94
Anna Bridge 169:a7c7b631e539 95 /*
Anna Bridge 169:a7c7b631e539 96 Field positions and masks for module ADC.
Anna Bridge 169:a7c7b631e539 97 */
Anna Bridge 169:a7c7b631e539 98
Anna Bridge 169:a7c7b631e539 99 #define MXC_F_ADC_CTRL_CPU_ADC_START_POS 0
Anna Bridge 169:a7c7b631e539 100 #define MXC_F_ADC_CTRL_CPU_ADC_START ((uint32_t)(0x00000001UL << MXC_F_ADC_CTRL_CPU_ADC_START_POS))
Anna Bridge 169:a7c7b631e539 101 #define MXC_F_ADC_CTRL_ADC_PU_POS 1
Anna Bridge 169:a7c7b631e539 102 #define MXC_F_ADC_CTRL_ADC_PU ((uint32_t)(0x00000001UL << MXC_F_ADC_CTRL_ADC_PU_POS))
Anna Bridge 169:a7c7b631e539 103 #define MXC_F_ADC_CTRL_BUF_PU_POS 2
Anna Bridge 169:a7c7b631e539 104 #define MXC_F_ADC_CTRL_BUF_PU ((uint32_t)(0x00000001UL << MXC_F_ADC_CTRL_BUF_PU_POS))
Anna Bridge 169:a7c7b631e539 105 #define MXC_F_ADC_CTRL_ADC_REFBUF_PU_POS 3
Anna Bridge 169:a7c7b631e539 106 #define MXC_F_ADC_CTRL_ADC_REFBUF_PU ((uint32_t)(0x00000001UL << MXC_F_ADC_CTRL_ADC_REFBUF_PU_POS))
Anna Bridge 169:a7c7b631e539 107 #define MXC_F_ADC_CTRL_ADC_CHGPUMP_PU_POS 4
Anna Bridge 169:a7c7b631e539 108 #define MXC_F_ADC_CTRL_ADC_CHGPUMP_PU ((uint32_t)(0x00000001UL << MXC_F_ADC_CTRL_ADC_CHGPUMP_PU_POS))
Anna Bridge 169:a7c7b631e539 109 #define MXC_F_ADC_CTRL_BUF_CHOP_DIS_POS 5
Anna Bridge 169:a7c7b631e539 110 #define MXC_F_ADC_CTRL_BUF_CHOP_DIS ((uint32_t)(0x00000001UL << MXC_F_ADC_CTRL_BUF_CHOP_DIS_POS))
Anna Bridge 169:a7c7b631e539 111 #define MXC_F_ADC_CTRL_BUF_PUMP_DIS_POS 6
Anna Bridge 169:a7c7b631e539 112 #define MXC_F_ADC_CTRL_BUF_PUMP_DIS ((uint32_t)(0x00000001UL << MXC_F_ADC_CTRL_BUF_PUMP_DIS_POS))
Anna Bridge 169:a7c7b631e539 113 #define MXC_F_ADC_CTRL_BUF_BYPASS_POS 7
Anna Bridge 169:a7c7b631e539 114 #define MXC_F_ADC_CTRL_BUF_BYPASS ((uint32_t)(0x00000001UL << MXC_F_ADC_CTRL_BUF_BYPASS_POS))
Anna Bridge 169:a7c7b631e539 115 #define MXC_F_ADC_CTRL_ADC_REFSCL_POS 8
Anna Bridge 169:a7c7b631e539 116 #define MXC_F_ADC_CTRL_ADC_REFSCL ((uint32_t)(0x00000001UL << MXC_F_ADC_CTRL_ADC_REFSCL_POS))
Anna Bridge 169:a7c7b631e539 117 #define MXC_F_ADC_CTRL_ADC_SCALE_POS 9
Anna Bridge 169:a7c7b631e539 118 #define MXC_F_ADC_CTRL_ADC_SCALE ((uint32_t)(0x00000001UL << MXC_F_ADC_CTRL_ADC_SCALE_POS))
Anna Bridge 169:a7c7b631e539 119 #define MXC_F_ADC_CTRL_ADC_REFSEL_POS 10
Anna Bridge 169:a7c7b631e539 120 #define MXC_F_ADC_CTRL_ADC_REFSEL ((uint32_t)(0x00000001UL << MXC_F_ADC_CTRL_ADC_REFSEL_POS))
Anna Bridge 169:a7c7b631e539 121 #define MXC_F_ADC_CTRL_ADC_CLK_EN_POS 11
Anna Bridge 169:a7c7b631e539 122 #define MXC_F_ADC_CTRL_ADC_CLK_EN ((uint32_t)(0x00000001UL << MXC_F_ADC_CTRL_ADC_CLK_EN_POS))
Anna Bridge 169:a7c7b631e539 123 #define MXC_F_ADC_CTRL_ADC_CHSEL_POS 12
Anna Bridge 169:a7c7b631e539 124 #define MXC_F_ADC_CTRL_ADC_CHSEL ((uint32_t)(0x0000000FUL << MXC_F_ADC_CTRL_ADC_CHSEL_POS))
Anna Bridge 169:a7c7b631e539 125
Anna Bridge 169:a7c7b631e539 126 #if (MXC_ADC_REV == 0)
Anna Bridge 169:a7c7b631e539 127 #define MXC_F_ADC_CTRL_ADC_XREF_POS 16
Anna Bridge 169:a7c7b631e539 128 #define MXC_F_ADC_CTRL_ADC_XREF ((uint32_t)(0x00000001UL << MXC_F_ADC_CTRL_ADC_XREF_POS))
Anna Bridge 169:a7c7b631e539 129 #endif
Anna Bridge 169:a7c7b631e539 130
Anna Bridge 169:a7c7b631e539 131 #define MXC_F_ADC_CTRL_ADC_DATAALIGN_POS 17
Anna Bridge 169:a7c7b631e539 132 #define MXC_F_ADC_CTRL_ADC_DATAALIGN ((uint32_t)(0x00000001UL << MXC_F_ADC_CTRL_ADC_DATAALIGN_POS))
Anna Bridge 169:a7c7b631e539 133 #define MXC_F_ADC_CTRL_AFE_PWR_UP_DLY_POS 24
Anna Bridge 169:a7c7b631e539 134 #define MXC_F_ADC_CTRL_AFE_PWR_UP_DLY ((uint32_t)(0x000000FFUL << MXC_F_ADC_CTRL_AFE_PWR_UP_DLY_POS))
Anna Bridge 169:a7c7b631e539 135
Anna Bridge 169:a7c7b631e539 136 #define MXC_F_ADC_STATUS_ADC_ACTIVE_POS 0
Anna Bridge 169:a7c7b631e539 137 #define MXC_F_ADC_STATUS_ADC_ACTIVE ((uint32_t)(0x00000001UL << MXC_F_ADC_STATUS_ADC_ACTIVE_POS))
Anna Bridge 169:a7c7b631e539 138 #define MXC_F_ADC_STATUS_RO_CAL_ATOMIC_ACTIVE_POS 1
Anna Bridge 169:a7c7b631e539 139 #define MXC_F_ADC_STATUS_RO_CAL_ATOMIC_ACTIVE ((uint32_t)(0x00000001UL << MXC_F_ADC_STATUS_RO_CAL_ATOMIC_ACTIVE_POS))
Anna Bridge 169:a7c7b631e539 140 #define MXC_F_ADC_STATUS_AFE_PWR_UP_ACTIVE_POS 2
Anna Bridge 169:a7c7b631e539 141 #define MXC_F_ADC_STATUS_AFE_PWR_UP_ACTIVE ((uint32_t)(0x00000001UL << MXC_F_ADC_STATUS_AFE_PWR_UP_ACTIVE_POS))
Anna Bridge 169:a7c7b631e539 142 #define MXC_F_ADC_STATUS_ADC_OVERFLOW_POS 3
Anna Bridge 169:a7c7b631e539 143 #define MXC_F_ADC_STATUS_ADC_OVERFLOW ((uint32_t)(0x00000001UL << MXC_F_ADC_STATUS_ADC_OVERFLOW_POS))
Anna Bridge 169:a7c7b631e539 144
Anna Bridge 169:a7c7b631e539 145 #define MXC_F_ADC_DATA_ADC_DATA_POS 0
Anna Bridge 169:a7c7b631e539 146 #define MXC_F_ADC_DATA_ADC_DATA ((uint32_t)(0x0000FFFFUL << MXC_F_ADC_DATA_ADC_DATA_POS))
Anna Bridge 169:a7c7b631e539 147
Anna Bridge 169:a7c7b631e539 148 #define MXC_F_ADC_INTR_ADC_DONE_IE_POS 0
Anna Bridge 169:a7c7b631e539 149 #define MXC_F_ADC_INTR_ADC_DONE_IE ((uint32_t)(0x00000001UL << MXC_F_ADC_INTR_ADC_DONE_IE_POS))
Anna Bridge 169:a7c7b631e539 150 #define MXC_F_ADC_INTR_ADC_REF_READY_IE_POS 1
Anna Bridge 169:a7c7b631e539 151 #define MXC_F_ADC_INTR_ADC_REF_READY_IE ((uint32_t)(0x00000001UL << MXC_F_ADC_INTR_ADC_REF_READY_IE_POS))
Anna Bridge 169:a7c7b631e539 152 #define MXC_F_ADC_INTR_ADC_HI_LIMIT_IE_POS 2
Anna Bridge 169:a7c7b631e539 153 #define MXC_F_ADC_INTR_ADC_HI_LIMIT_IE ((uint32_t)(0x00000001UL << MXC_F_ADC_INTR_ADC_HI_LIMIT_IE_POS))
Anna Bridge 169:a7c7b631e539 154 #define MXC_F_ADC_INTR_ADC_LO_LIMIT_IE_POS 3
Anna Bridge 169:a7c7b631e539 155 #define MXC_F_ADC_INTR_ADC_LO_LIMIT_IE ((uint32_t)(0x00000001UL << MXC_F_ADC_INTR_ADC_LO_LIMIT_IE_POS))
Anna Bridge 169:a7c7b631e539 156 #define MXC_F_ADC_INTR_ADC_OVERFLOW_IE_POS 4
Anna Bridge 169:a7c7b631e539 157 #define MXC_F_ADC_INTR_ADC_OVERFLOW_IE ((uint32_t)(0x00000001UL << MXC_F_ADC_INTR_ADC_OVERFLOW_IE_POS))
Anna Bridge 169:a7c7b631e539 158 #define MXC_F_ADC_INTR_RO_CAL_DONE_IE_POS 5
Anna Bridge 169:a7c7b631e539 159 #define MXC_F_ADC_INTR_RO_CAL_DONE_IE ((uint32_t)(0x00000001UL << MXC_F_ADC_INTR_RO_CAL_DONE_IE_POS))
Anna Bridge 169:a7c7b631e539 160 #define MXC_F_ADC_INTR_ADC_DONE_IF_POS 16
Anna Bridge 169:a7c7b631e539 161 #define MXC_F_ADC_INTR_ADC_DONE_IF ((uint32_t)(0x00000001UL << MXC_F_ADC_INTR_ADC_DONE_IF_POS))
Anna Bridge 169:a7c7b631e539 162 #define MXC_F_ADC_INTR_ADC_REF_READY_IF_POS 17
Anna Bridge 169:a7c7b631e539 163 #define MXC_F_ADC_INTR_ADC_REF_READY_IF ((uint32_t)(0x00000001UL << MXC_F_ADC_INTR_ADC_REF_READY_IF_POS))
Anna Bridge 169:a7c7b631e539 164 #define MXC_F_ADC_INTR_ADC_HI_LIMIT_IF_POS 18
Anna Bridge 169:a7c7b631e539 165 #define MXC_F_ADC_INTR_ADC_HI_LIMIT_IF ((uint32_t)(0x00000001UL << MXC_F_ADC_INTR_ADC_HI_LIMIT_IF_POS))
Anna Bridge 169:a7c7b631e539 166 #define MXC_F_ADC_INTR_ADC_LO_LIMIT_IF_POS 19
Anna Bridge 169:a7c7b631e539 167 #define MXC_F_ADC_INTR_ADC_LO_LIMIT_IF ((uint32_t)(0x00000001UL << MXC_F_ADC_INTR_ADC_LO_LIMIT_IF_POS))
Anna Bridge 169:a7c7b631e539 168 #define MXC_F_ADC_INTR_ADC_OVERFLOW_IF_POS 20
Anna Bridge 169:a7c7b631e539 169 #define MXC_F_ADC_INTR_ADC_OVERFLOW_IF ((uint32_t)(0x00000001UL << MXC_F_ADC_INTR_ADC_OVERFLOW_IF_POS))
Anna Bridge 169:a7c7b631e539 170 #define MXC_F_ADC_INTR_RO_CAL_DONE_IF_POS 21
Anna Bridge 169:a7c7b631e539 171 #define MXC_F_ADC_INTR_RO_CAL_DONE_IF ((uint32_t)(0x00000001UL << MXC_F_ADC_INTR_RO_CAL_DONE_IF_POS))
Anna Bridge 169:a7c7b631e539 172 #define MXC_F_ADC_INTR_ADC_INT_PENDING_POS 22
Anna Bridge 169:a7c7b631e539 173 #define MXC_F_ADC_INTR_ADC_INT_PENDING ((uint32_t)(0x00000001UL << MXC_F_ADC_INTR_ADC_INT_PENDING_POS))
Anna Bridge 169:a7c7b631e539 174
Anna Bridge 169:a7c7b631e539 175 #define MXC_F_ADC_LIMIT0_CH_LO_LIMIT_POS 0
Anna Bridge 169:a7c7b631e539 176 #define MXC_F_ADC_LIMIT0_CH_LO_LIMIT ((uint32_t)(0x000003FFUL << MXC_F_ADC_LIMIT0_CH_LO_LIMIT_POS))
Anna Bridge 169:a7c7b631e539 177 #define MXC_F_ADC_LIMIT0_CH_HI_LIMIT_POS 12
Anna Bridge 169:a7c7b631e539 178 #define MXC_F_ADC_LIMIT0_CH_HI_LIMIT ((uint32_t)(0x000003FFUL << MXC_F_ADC_LIMIT0_CH_HI_LIMIT_POS))
Anna Bridge 169:a7c7b631e539 179 #define MXC_F_ADC_LIMIT0_CH_SEL_POS 24
Anna Bridge 169:a7c7b631e539 180 #define MXC_F_ADC_LIMIT0_CH_SEL ((uint32_t)(0x0000000FUL << MXC_F_ADC_LIMIT0_CH_SEL_POS))
Anna Bridge 169:a7c7b631e539 181 #define MXC_F_ADC_LIMIT0_CH_LO_LIMIT_EN_POS 28
Anna Bridge 169:a7c7b631e539 182 #define MXC_F_ADC_LIMIT0_CH_LO_LIMIT_EN ((uint32_t)(0x00000001UL << MXC_F_ADC_LIMIT0_CH_LO_LIMIT_EN_POS))
Anna Bridge 169:a7c7b631e539 183 #define MXC_F_ADC_LIMIT0_CH_HI_LIMIT_EN_POS 29
Anna Bridge 169:a7c7b631e539 184 #define MXC_F_ADC_LIMIT0_CH_HI_LIMIT_EN ((uint32_t)(0x00000001UL << MXC_F_ADC_LIMIT0_CH_HI_LIMIT_EN_POS))
Anna Bridge 169:a7c7b631e539 185
Anna Bridge 169:a7c7b631e539 186 #define MXC_F_ADC_LIMIT1_CH_LO_LIMIT_POS 0
Anna Bridge 169:a7c7b631e539 187 #define MXC_F_ADC_LIMIT1_CH_LO_LIMIT ((uint32_t)(0x000003FFUL << MXC_F_ADC_LIMIT1_CH_LO_LIMIT_POS))
Anna Bridge 169:a7c7b631e539 188 #define MXC_F_ADC_LIMIT1_CH_HI_LIMIT_POS 12
Anna Bridge 169:a7c7b631e539 189 #define MXC_F_ADC_LIMIT1_CH_HI_LIMIT ((uint32_t)(0x000003FFUL << MXC_F_ADC_LIMIT1_CH_HI_LIMIT_POS))
Anna Bridge 169:a7c7b631e539 190 #define MXC_F_ADC_LIMIT1_CH_SEL_POS 24
Anna Bridge 169:a7c7b631e539 191 #define MXC_F_ADC_LIMIT1_CH_SEL ((uint32_t)(0x0000000FUL << MXC_F_ADC_LIMIT1_CH_SEL_POS))
Anna Bridge 169:a7c7b631e539 192 #define MXC_F_ADC_LIMIT1_CH_LO_LIMIT_EN_POS 28
Anna Bridge 169:a7c7b631e539 193 #define MXC_F_ADC_LIMIT1_CH_LO_LIMIT_EN ((uint32_t)(0x00000001UL << MXC_F_ADC_LIMIT1_CH_LO_LIMIT_EN_POS))
Anna Bridge 169:a7c7b631e539 194 #define MXC_F_ADC_LIMIT1_CH_HI_LIMIT_EN_POS 29
Anna Bridge 169:a7c7b631e539 195 #define MXC_F_ADC_LIMIT1_CH_HI_LIMIT_EN ((uint32_t)(0x00000001UL << MXC_F_ADC_LIMIT1_CH_HI_LIMIT_EN_POS))
Anna Bridge 169:a7c7b631e539 196
Anna Bridge 169:a7c7b631e539 197 #define MXC_F_ADC_LIMIT2_CH_LO_LIMIT_POS 0
Anna Bridge 169:a7c7b631e539 198 #define MXC_F_ADC_LIMIT2_CH_LO_LIMIT ((uint32_t)(0x000003FFUL << MXC_F_ADC_LIMIT2_CH_LO_LIMIT_POS))
Anna Bridge 169:a7c7b631e539 199 #define MXC_F_ADC_LIMIT2_CH_HI_LIMIT_POS 12
Anna Bridge 169:a7c7b631e539 200 #define MXC_F_ADC_LIMIT2_CH_HI_LIMIT ((uint32_t)(0x000003FFUL << MXC_F_ADC_LIMIT2_CH_HI_LIMIT_POS))
Anna Bridge 169:a7c7b631e539 201 #define MXC_F_ADC_LIMIT2_CH_SEL_POS 24
Anna Bridge 169:a7c7b631e539 202 #define MXC_F_ADC_LIMIT2_CH_SEL ((uint32_t)(0x0000000FUL << MXC_F_ADC_LIMIT2_CH_SEL_POS))
Anna Bridge 169:a7c7b631e539 203 #define MXC_F_ADC_LIMIT2_CH_LO_LIMIT_EN_POS 28
Anna Bridge 169:a7c7b631e539 204 #define MXC_F_ADC_LIMIT2_CH_LO_LIMIT_EN ((uint32_t)(0x00000001UL << MXC_F_ADC_LIMIT2_CH_LO_LIMIT_EN_POS))
Anna Bridge 169:a7c7b631e539 205 #define MXC_F_ADC_LIMIT2_CH_HI_LIMIT_EN_POS 29
Anna Bridge 169:a7c7b631e539 206 #define MXC_F_ADC_LIMIT2_CH_HI_LIMIT_EN ((uint32_t)(0x00000001UL << MXC_F_ADC_LIMIT2_CH_HI_LIMIT_EN_POS))
Anna Bridge 169:a7c7b631e539 207
Anna Bridge 169:a7c7b631e539 208 #define MXC_F_ADC_LIMIT3_CH_LO_LIMIT_POS 0
Anna Bridge 169:a7c7b631e539 209 #define MXC_F_ADC_LIMIT3_CH_LO_LIMIT ((uint32_t)(0x000003FFUL << MXC_F_ADC_LIMIT3_CH_LO_LIMIT_POS))
Anna Bridge 169:a7c7b631e539 210 #define MXC_F_ADC_LIMIT3_CH_HI_LIMIT_POS 12
Anna Bridge 169:a7c7b631e539 211 #define MXC_F_ADC_LIMIT3_CH_HI_LIMIT ((uint32_t)(0x000003FFUL << MXC_F_ADC_LIMIT3_CH_HI_LIMIT_POS))
Anna Bridge 169:a7c7b631e539 212 #define MXC_F_ADC_LIMIT3_CH_SEL_POS 24
Anna Bridge 169:a7c7b631e539 213 #define MXC_F_ADC_LIMIT3_CH_SEL ((uint32_t)(0x0000000FUL << MXC_F_ADC_LIMIT3_CH_SEL_POS))
Anna Bridge 169:a7c7b631e539 214 #define MXC_F_ADC_LIMIT3_CH_LO_LIMIT_EN_POS 28
Anna Bridge 169:a7c7b631e539 215 #define MXC_F_ADC_LIMIT3_CH_LO_LIMIT_EN ((uint32_t)(0x00000001UL << MXC_F_ADC_LIMIT3_CH_LO_LIMIT_EN_POS))
Anna Bridge 169:a7c7b631e539 216 #define MXC_F_ADC_LIMIT3_CH_HI_LIMIT_EN_POS 29
Anna Bridge 169:a7c7b631e539 217 #define MXC_F_ADC_LIMIT3_CH_HI_LIMIT_EN ((uint32_t)(0x00000001UL << MXC_F_ADC_LIMIT3_CH_HI_LIMIT_EN_POS))
Anna Bridge 169:a7c7b631e539 218
Anna Bridge 169:a7c7b631e539 219 #define MXC_F_ADC_AFE_CTRL_TMON_INTBIAS_EN_POS 8
Anna Bridge 169:a7c7b631e539 220 #define MXC_F_ADC_AFE_CTRL_TMON_INTBIAS_EN ((uint32_t)(0x00000001UL << MXC_F_ADC_AFE_CTRL_TMON_INTBIAS_EN_POS))
Anna Bridge 169:a7c7b631e539 221 #define MXC_F_ADC_AFE_CTRL_TMON_EXTBIAS_EN_POS 9
Anna Bridge 169:a7c7b631e539 222 #define MXC_F_ADC_AFE_CTRL_TMON_EXTBIAS_EN ((uint32_t)(0x00000001UL << MXC_F_ADC_AFE_CTRL_TMON_EXTBIAS_EN_POS))
Anna Bridge 169:a7c7b631e539 223
Anna Bridge 169:a7c7b631e539 224 #define MXC_F_ADC_RO_CAL0_RO_CAL_EN_POS 0
Anna Bridge 169:a7c7b631e539 225 #define MXC_F_ADC_RO_CAL0_RO_CAL_EN ((uint32_t)(0x00000001UL << MXC_F_ADC_RO_CAL0_RO_CAL_EN_POS))
Anna Bridge 169:a7c7b631e539 226 #define MXC_F_ADC_RO_CAL0_RO_CAL_RUN_POS 1
Anna Bridge 169:a7c7b631e539 227 #define MXC_F_ADC_RO_CAL0_RO_CAL_RUN ((uint32_t)(0x00000001UL << MXC_F_ADC_RO_CAL0_RO_CAL_RUN_POS))
Anna Bridge 169:a7c7b631e539 228 #define MXC_F_ADC_RO_CAL0_RO_CAL_LOAD_POS 2
Anna Bridge 169:a7c7b631e539 229 #define MXC_F_ADC_RO_CAL0_RO_CAL_LOAD ((uint32_t)(0x00000001UL << MXC_F_ADC_RO_CAL0_RO_CAL_LOAD_POS))
Anna Bridge 169:a7c7b631e539 230 #define MXC_F_ADC_RO_CAL0_RO_CAL_ATOMIC_POS 4
Anna Bridge 169:a7c7b631e539 231 #define MXC_F_ADC_RO_CAL0_RO_CAL_ATOMIC ((uint32_t)(0x00000001UL << MXC_F_ADC_RO_CAL0_RO_CAL_ATOMIC_POS))
Anna Bridge 169:a7c7b631e539 232 #define MXC_F_ADC_RO_CAL0_DUMMY_POS 5
Anna Bridge 169:a7c7b631e539 233 #define MXC_F_ADC_RO_CAL0_DUMMY ((uint32_t)(0x00000007UL << MXC_F_ADC_RO_CAL0_DUMMY_POS))
Anna Bridge 169:a7c7b631e539 234 #define MXC_F_ADC_RO_CAL0_TRM_MU_POS 8
Anna Bridge 169:a7c7b631e539 235 #define MXC_F_ADC_RO_CAL0_TRM_MU ((uint32_t)(0x00000FFFUL << MXC_F_ADC_RO_CAL0_TRM_MU_POS))
Anna Bridge 169:a7c7b631e539 236 #define MXC_F_ADC_RO_CAL0_RO_TRM_POS 23
Anna Bridge 169:a7c7b631e539 237 #define MXC_F_ADC_RO_CAL0_RO_TRM ((uint32_t)(0x000001FFUL << MXC_F_ADC_RO_CAL0_RO_TRM_POS))
Anna Bridge 169:a7c7b631e539 238
Anna Bridge 169:a7c7b631e539 239 #define MXC_F_ADC_RO_CAL1_TRM_INIT_POS 0
Anna Bridge 169:a7c7b631e539 240 #define MXC_F_ADC_RO_CAL1_TRM_INIT ((uint32_t)(0x000001FFUL << MXC_F_ADC_RO_CAL1_TRM_INIT_POS))
Anna Bridge 169:a7c7b631e539 241 #define MXC_F_ADC_RO_CAL1_TRM_MIN_POS 10
Anna Bridge 169:a7c7b631e539 242 #define MXC_F_ADC_RO_CAL1_TRM_MIN ((uint32_t)(0x000001FFUL << MXC_F_ADC_RO_CAL1_TRM_MIN_POS))
Anna Bridge 169:a7c7b631e539 243 #define MXC_F_ADC_RO_CAL1_TRM_MAX_POS 20
Anna Bridge 169:a7c7b631e539 244 #define MXC_F_ADC_RO_CAL1_TRM_MAX ((uint32_t)(0x000001FFUL << MXC_F_ADC_RO_CAL1_TRM_MAX_POS))
Anna Bridge 169:a7c7b631e539 245
Anna Bridge 169:a7c7b631e539 246 #define MXC_F_ADC_RO_CAL2_AUTO_CAL_DONE_CNT_POS 0
Anna Bridge 169:a7c7b631e539 247 #define MXC_F_ADC_RO_CAL2_AUTO_CAL_DONE_CNT ((uint32_t)(0x000000FFUL << MXC_F_ADC_RO_CAL2_AUTO_CAL_DONE_CNT_POS))
Anna Bridge 169:a7c7b631e539 248
Anna Bridge 169:a7c7b631e539 249 #define MXC_V_ADC_CTRL_ADC_CHSEL_AIN0 ((uint32_t)(0x00000000UL))
Anna Bridge 169:a7c7b631e539 250 #define MXC_V_ADC_CTRL_ADC_CHSEL_AIN1 ((uint32_t)(0x00000001UL))
Anna Bridge 169:a7c7b631e539 251 #define MXC_V_ADC_CTRL_ADC_CHSEL_AIN2 ((uint32_t)(0x00000002UL))
Anna Bridge 169:a7c7b631e539 252 #define MXC_V_ADC_CTRL_ADC_CHSEL_AIN3 ((uint32_t)(0x00000003UL))
Anna Bridge 169:a7c7b631e539 253 #define MXC_V_ADC_CTRL_ADC_CHSEL_AIN0_DIV_5 ((uint32_t)(0x00000004UL))
Anna Bridge 169:a7c7b631e539 254 #define MXC_V_ADC_CTRL_ADC_CHSEL_AIN1_DIV_5 ((uint32_t)(0x00000005UL))
Anna Bridge 169:a7c7b631e539 255 #define MXC_V_ADC_CTRL_ADC_CHSEL_VDDB_DIV_4 ((uint32_t)(0x00000006UL))
Anna Bridge 169:a7c7b631e539 256 #define MXC_V_ADC_CTRL_ADC_CHSEL_VDD18 ((uint32_t)(0x00000007UL))
Anna Bridge 169:a7c7b631e539 257 #define MXC_V_ADC_CTRL_ADC_CHSEL_VDD12 ((uint32_t)(0x00000008UL))
Anna Bridge 169:a7c7b631e539 258 #define MXC_V_ADC_CTRL_ADC_CHSEL_VRTC_DIV_2 ((uint32_t)(0x00000009UL))
Anna Bridge 169:a7c7b631e539 259 #define MXC_V_ADC_CTRL_ADC_CHSEL_TMON ((uint32_t)(0x0000000AUL))
Anna Bridge 169:a7c7b631e539 260
Anna Bridge 169:a7c7b631e539 261 #if(MXC_ADC_REV > 0)
Anna Bridge 169:a7c7b631e539 262 #define MXC_V_ADC_CTRL_ADC_CHSEL_VDDIO_DIV_4 ((uint32_t)(0x0000000BUL))
Anna Bridge 169:a7c7b631e539 263 #define MXC_V_ADC_CTRL_ADC_CHSEL_VDDIOH_DIV_4 ((uint32_t)(0x0000000CUL))
Anna Bridge 169:a7c7b631e539 264 #endif
Anna Bridge 169:a7c7b631e539 265
Anna Bridge 169:a7c7b631e539 266 #ifdef __cplusplus
Anna Bridge 169:a7c7b631e539 267 }
Anna Bridge 169:a7c7b631e539 268 #endif
Anna Bridge 169:a7c7b631e539 269
Anna Bridge 169:a7c7b631e539 270 #endif /* _MXC_ADC_REGS_H_ */
Anna Bridge 169:a7c7b631e539 271