/* ###################################################################
**     This component module is generated by Processor Expert. Do not modify it.
**     Filename    : ADC1.c
**     Project     : MAPS-MC-2IN1_DualServo_release
**     Processor   : MC56F84789VLL
**     Component   : Init_ADC
**     Version     : Component 01.350, Driver 01.26, CPU db: 3.50.001
**     Compiler    : CodeWarrior DSP C Compiler
**     Date/Time   : 2019-04-03, 17:51, # CodeGen: 0
**     Abstract    :
**         This "Init_ADC" Peripheral Inspector implements the
**         Analog-to-Digital converter module (ADC), basic 
**         initialization and settings.
**     Settings    :
**          Component name                                 : ADC1
**          Device                                         : ADC12
**          Settings                                       : 
**            Clock setting                                : 
**              Clock divisor select value                 : 5
**              A/D Frequency                              : 20 MHz
**              Speed control                              : clock frequency =< 20MHz
**              Clock divisor select value 1               : 5
**              A/D Frequency 1                            : 20 MHz
**              Speed control 1                            : clock frequency =< 20MHz
**            Stop mode (0)                                : no
**            Stop mode 1                                  : yes
**            ADC mode                                     : Triggered Parallel
**            Parallel mode                                : simultaneous
**            Trigger mode (0)                             : SYNC input or START bit
**            Trigger mode 1                               : SYNC input or START bit
**            Sampling time (0)                            : 5 ADC clocks
**            Sampling time 1                              : 5 ADC clocks
**            Power savings mode                           : Disabled
**            Power-up delay                               : 26
**            Auto standby                                 : Disabled
**            DMA trigger source                           : EOSI
**            High volt. ref. source 0                     : internal
**            Low volt. ref. source 0                      : internal
**            High volt. ref. source 1                     : internal
**            Low volt. ref. source 1                      : internal
**            A/D Channels                                 : 
**              Channels configuration                     : 
**                ANA0-ANA1                                : Single ended mode
**                ANA2-ANA3                                : Single ended mode
**                ANB0-ANB1                                : Single ended mode
**                ANB2-ANB3                                : Single ended mode
**                ANA4-ANA5                                : Single ended mode
**                ANA6-ANA7                                : Single ended mode
**                ANB4-ANB5                                : Single ended mode
**                ANB6-ANB7                                : Single ended mode
**              Sample 0                                   : Enabled
**                Channel                                  : GPIOA0/ANA0/CMPA_IN3/CMPC_O
**                Channel signal                           : 
**                Negative input                           : Disabled
**              Sample 1                                   : Enabled
**                Channel                                  : GPIOA1/ANA1/CMPA_IN0
**                Channel signal                           : 
**                Negative input                           : Disabled
**              Sample 2                                   : Enabled
**                Channel                                  : GPIOA0/ANA0/CMPA_IN3/CMPC_O
**                Channel signal                           : 
**                Negative input                           : Disabled
**              Sample 3                                   : Enabled
**                Channel                                  : GPIOA4/ANA4/ANC8/CMPD_IN0
**                Channel signal                           : 
**                Negative input                           : Disabled
**              Sample 4                                   : Enabled
**                Channel                                  : GPIOA5/ANA5/ANC9
**                Channel signal                           : 
**                Negative input                           : Disabled
**              Sample 5                                   : Enabled
**                Channel                                  : GPIOA5/ANA5/ANC9
**                Channel signal                           : 
**                Negative input                           : Disabled
**              Sample 6                                   : Disabled
**              Sample 7                                   : Disabled
**              Sample 8                                   : Enabled
**                Channel                                  : GPIOB0/ANB0/CMPB_IN3
**                Channel signal                           : 
**                Negative input                           : Disabled
**              Sample 9                                   : Enabled
**                Channel                                  : GPIOB1/ANB1/CMPB_IN0
**                Channel signal                           : 
**                Negative input                           : Disabled
**              Sample 10                                  : Enabled
**                Channel                                  : GPIOB2/ANB2/CMPC_IN3
**                Channel signal                           : 
**                Negative input                           : Disabled
**              Sample 11                                  : Enabled
**                Channel                                  : GPIOB4/ANB4/ANC12/CMPC_IN1
**                Channel signal                           : 
**                Negative input                           : Disabled
**              Sample 12                                  : Enabled
**                Channel                                  : GPIOB5/ANB5/ANC13/CMPC_IN2
**                Channel signal                           : 
**                Negative input                           : Disabled
**              Sample 13                                  : Enabled
**                Channel                                  : GPIOB6/ANB6/ANC14/CMPB_IN1
**                Channel signal                           : 
**                Negative input                           : Disabled
**              Sample 14                                  : Disabled
**              Sample 15                                  : Disabled
**              Internal trigger (0)                       : Enabled
**                Trigger input                            : AOI_Function0_Out
**                Trigger input signal                     : 
**              Internal trigger 1                         : Disabled
**            Zero crossing                                : 
**              Sample 0                                   : disabled
**              Sample 1                                   : disabled
**              Sample 2                                   : disabled
**              Sample 3                                   : disabled
**              Sample 4                                   : disabled
**              Sample 5                                   : disabled
**              Sample 6                                   : disabled
**              Sample 7                                   : disabled
**              Sample 8                                   : disabled
**              Sample 9                                   : disabled
**              Sample 10                                  : disabled
**              Sample 11                                  : disabled
**              Sample 12                                  : disabled
**              Sample 13                                  : disabled
**              Sample 14                                  : disabled
**              Sample 15                                  : disabled
**            Low limit                                    : 
**              Low limit register 0                       : 0
**              Low limit register 1                       : 0
**              Low limit register 2                       : 0
**              Low limit register 3                       : 0
**              Low limit register 4                       : 0
**              Low limit register 5                       : 0
**              Low limit register 6                       : 0
**              Low limit register 7                       : 0
**              Low limit register 8                       : 0
**              Low limit register 9                       : 0
**              Low limit register 10                      : 0
**              Low limit register 11                      : 0
**              Low limit register 12                      : 0
**              Low limit register 13                      : 0
**              Low limit register 14                      : 0
**              Low limit register 15                      : 0
**            High limit                                   : 
**              High limit register 0                      : 7FF8
**              High limit register 1                      : 7FF8
**              High limit register 2                      : 7FF8
**              High limit register 3                      : 7FF8
**              High limit register 4                      : 7FF8
**              High limit register 5                      : 7FF8
**              High limit register 6                      : 7FF8
**              High limit register 7                      : 7FF8
**              High limit register 8                      : 7FF8
**              High limit register 9                      : 7FF8
**              High limit register 10                     : 7FF8
**              High limit register 11                     : 7FF8
**              High limit register 12                     : 7FF8
**              High limit register 13                     : 7FF8
**              High limit register 14                     : 7FF8
**              High limit register 15                     : 7FF8
**            Offset                                       : 
**              Offset register 0                          : 0
**              Offset register 1                          : 0
**              Offset register 2                          : 0
**              Offset register 3                          : 0
**              Offset register 4                          : 0
**              Offset register 5                          : 0
**              Offset register 6                          : 0
**              Offset register 7                          : 0
**              Offset register 8                          : 0
**              Offset register 9                          : 0
**              Offset register 10                         : 0
**              Offset register 11                         : 0
**              Offset register 12                         : 0
**              Offset register 13                         : 0
**              Offset register 14                         : 0
**              Offset register 15                         : 0
**            Gain control                                 : 
**              ANA0                                       : x1 amplification
**              ANA1                                       : x1 amplification
**              ANA2                                       : x1 amplification
**              ANA3                                       : x1 amplification
**              ANA4                                       : x1 amplification
**              ANA5                                       : x1 amplification
**              ANA6                                       : x1 amplification
**              ANA7                                       : x1 amplification
**              ANB0                                       : x1 amplification
**              ANB1                                       : x1 amplification
**              ANB2                                       : x1 amplification
**              ANB3                                       : x1 amplification
**              ANB4                                       : x1 amplification
**              ANB5                                       : x1 amplification
**              ANB6                                       : x1 amplification
**              ANB7                                       : x1 amplification
**            Scan control                                 : 
**              Sample 0                                   : Continue
**              Sample 1                                   : Continue
**              Sample 2                                   : Continue
**              Sample 3                                   : Pause
**              Sample 4                                   : Continue
**              Sample 5                                   : Continue
**              Sample 6                                   : Continue
**              Sample 7                                   : Continue
**              Sample 8                                   : Continue
**              Sample 9                                   : Continue
**              Sample 10                                  : Continue
**              Sample 11                                  : Continue
**              Sample 12                                  : Continue
**              Sample 13                                  : Continue
**              Sample 14                                  : Continue
**              Sample 15                                  : Continue
**          Interrupts/DMA                                 : 
**            Conversion complete (0)                      : 
**              Interrupt                                  : INT_ADC12_CC0
**              End of scan interrupt                      : Enabled
**              Interrupt priority                         : 1
**              ISR name                                   : M2_isr
**              DMA request                                : Disabled
**            Conversion complete 1                        : 
**              Interrupt                                  : INT_ADC12_CC1
**              End of scan interrupt                      : Disabled
**              Interrupt priority                         : default
**              ISR name                                   : 
**              DMA request                                : Disabled
**            Scan halted interrupt enable                 : 
**              Sample 0                                   : Disabled
**              Sample 1                                   : Disabled
**              Sample 2                                   : Disabled
**              Sample 3                                   : Disabled
**              Sample 4                                   : Disabled
**              Sample 5                                   : Disabled
**              Sample 6                                   : Disabled
**              Sample 7                                   : Disabled
**              Sample 8                                   : Disabled
**              Sample 9                                   : Disabled
**              Sample 10                                  : Disabled
**              Sample 11                                  : Disabled
**              Sample 12                                  : Disabled
**              Sample 13                                  : Disabled
**              Sample 14                                  : Disabled
**              Sample 15                                  : Disabled
**            Zero crossing or limit error                 : 
**              Interrupt                                  : INT_ADC12_ERR
**              Zero crossing interrupt                    : Disabled
**              Low limit error interrupt                  : Disabled
**              High limit error interrupt                 : Disabled
**              Interrupt priority                         : default
**              ISR name                                   : 
**          Initialization                                 : 
**            Call Init method                             : yes
**            Enable peripheral clock                      : yes
**            Start ADC conversion (0)                     : no
**            Start ADC conversion 1                       : no
**            Power down ADC 0                             : no
**            Power down ADC 1                             : no
**     Contents    :
**         Init - void ADC1_Init(void);
**
**     Copyright : 1997 - 2014 Freescale Semiconductor, Inc. 
**     All Rights Reserved.
**     
**     Redistribution and use in source and binary forms, with or without modification,
**     are permitted provided that the following conditions are met:
**     
**     o Redistributions of source code must retain the above copyright notice, this list
**       of conditions and the following disclaimer.
**     
**     o Redistributions in binary form must reproduce the above copyright notice, this
**       list of conditions and the following disclaimer in the documentation and/or
**       other materials provided with the distribution.
**     
**     o Neither the name of Freescale Semiconductor, Inc. nor the names of its
**       contributors may be used to endorse or promote products derived from this
**       software without specific prior written permission.
**     
**     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
**     ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
**     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
**     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
**     ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
**     (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
**     LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
**     ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
**     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
**     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**     
**     http: www.freescale.com
**     mail: support@freescale.com
** ###################################################################*/
/*!
** @file ADC1.c
** @version 01.26
** @brief
**         This "Init_ADC" Peripheral Inspector implements the
**         Analog-to-Digital converter module (ADC), basic 
**         initialization and settings.
*/         
/*!
**  @addtogroup ADC1_module ADC1 module documentation
**  @{
*/         

/* MODULE ADC1. */

#include "ADC1.h"

/*
** ###################################################################
**
**  The interrupt service routine(s) must be implemented
**  by user in one of the following user modules.
**
**  If the "Generate ISR" option is enabled, Processor Expert generates
**  ISR templates in the CPU event module.
**
**  User modules:
**      main.c
**      Events.c
**
** ###################################################################
#if defined(M2_isr_FAST_INT)
#pragma interrupt fast
#elif defined(M2_isr_VECT_TABLE_ISR_FAST_INT)
#pragma define_section interrupt_fast "interrupt_fast.text"  RX
#pragma section interrupt_fast begin
#pragma interrupt fast
#else
#pragma interrupt saveall
#endif
void M2_isr(void)
{
// NOTE: The routine should include actions to clear the appropriate
//       interrupt flags.
//
}
*/
  
/*
** ===================================================================
**     Method      :  ADC1_Init (component Init_ADC)
**     Description :
**         This method initializes registers of the ADC module
**         according to this Peripheral Initialization settings. Call
**         this method in the user code to initialize the module. By
**         default, the method is called by PE automatically; see "Call
**         Init method" property of the component for more details.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void ADC1_Init(void)
{
  /* ADC12_SDIS: DS=0xC0C0 */
  setReg16(ADC12_SDIS, 0xC0C0U);       /* Set sample disable register */ 
  /* ADC12_CLIST1: SAMPLE3=4,SAMPLE2=0,SAMPLE1=1,SAMPLE0=0 */
  setReg16(ADC12_CLIST1, 0x4010U);     /* Set channel list register 1 */ 
  /* ADC12_CLIST2: SAMPLE7=0,SAMPLE6=0,SAMPLE5=5,SAMPLE4=5 */
  setReg16(ADC12_CLIST2, 0x55U);       /* Set channel list register 2 */ 
  /* ADC12_CLIST3: SAMPLE11=0x0C,SAMPLE10=0x0A,SAMPLE9=9,SAMPLE8=8 */
  setReg16(ADC12_CLIST3, 0xCA98U);     /* Set channel list register 3 */ 
  /* ADC12_CLIST4: SAMPLE15=0,SAMPLE14=0,SAMPLE13=0x0E,SAMPLE12=0x0D */
  setReg16(ADC12_CLIST4, 0xEDU);       /* Set channel list register 4 */ 
  /* ADC12_LOLIM0: ??=0,LLMT=0,??=0,??=0,??=0 */
  setReg16(ADC12_LOLIM0, 0x00U);       /* Set low limit register 0 */ 
  /* ADC12_LOLIM1: ??=0,LLMT=0,??=0,??=0,??=0 */
  setReg16(ADC12_LOLIM1, 0x00U);       /* Set low limit register 1 */ 
  /* ADC12_LOLIM2: ??=0,LLMT=0,??=0,??=0,??=0 */
  setReg16(ADC12_LOLIM2, 0x00U);       /* Set low limit register 2 */ 
  /* ADC12_LOLIM3: ??=0,LLMT=0,??=0,??=0,??=0 */
  setReg16(ADC12_LOLIM3, 0x00U);       /* Set low limit register 3 */ 
  /* ADC12_LOLIM4: ??=0,LLMT=0,??=0,??=0,??=0 */
  setReg16(ADC12_LOLIM4, 0x00U);       /* Set low limit register 4 */ 
  /* ADC12_LOLIM5: ??=0,LLMT=0,??=0,??=0,??=0 */
  setReg16(ADC12_LOLIM5, 0x00U);       /* Set low limit register 5 */ 
  /* ADC12_LOLIM6: ??=0,LLMT=0,??=0,??=0,??=0 */
  setReg16(ADC12_LOLIM6, 0x00U);       /* Set low limit register 6 */ 
  /* ADC12_LOLIM7: ??=0,LLMT=0,??=0,??=0,??=0 */
  setReg16(ADC12_LOLIM7, 0x00U);       /* Set low limit register 7 */ 
  /* ADC12_LOLIM8: ??=0,LLMT=0,??=0,??=0,??=0 */
  setReg16(ADC12_LOLIM8, 0x00U);       /* Set low limit register 8 */ 
  /* ADC12_LOLIM9: ??=0,LLMT=0,??=0,??=0,??=0 */
  setReg16(ADC12_LOLIM9, 0x00U);       /* Set low limit register 9 */ 
  /* ADC12_LOLIM10: ??=0,LLMT=0,??=0,??=0,??=0 */
  setReg16(ADC12_LOLIM10, 0x00U);      /* Set low limit register 10 */ 
  /* ADC12_LOLIM11: ??=0,LLMT=0,??=0,??=0,??=0 */
  setReg16(ADC12_LOLIM11, 0x00U);      /* Set low limit register 11 */ 
  /* ADC12_LOLIM12: ??=0,LLMT=0,??=0,??=0,??=0 */
  setReg16(ADC12_LOLIM12, 0x00U);      /* Set low limit register 12 */ 
  /* ADC12_LOLIM13: ??=0,LLMT=0,??=0,??=0,??=0 */
  setReg16(ADC12_LOLIM13, 0x00U);      /* Set low limit register 13 */ 
  /* ADC12_LOLIM14: ??=0,LLMT=0,??=0,??=0,??=0 */
  setReg16(ADC12_LOLIM14, 0x00U);      /* Set low limit register 14 */ 
  /* ADC12_LOLIM15: ??=0,LLMT=0,??=0,??=0,??=0 */
  setReg16(ADC12_LOLIM15, 0x00U);      /* Set low limit register 15 */ 
  /* ADC12_HILIM0: ??=0,HLMT=0x0FFF,??=0,??=0,??=0 */
  setReg16(ADC12_HILIM0, 0x7FF8U);     /* Set high limit register 0 */ 
  /* ADC12_HILIM1: ??=0,HLMT=0x0FFF,??=0,??=0,??=0 */
  setReg16(ADC12_HILIM1, 0x7FF8U);     /* Set high limit register 1 */ 
  /* ADC12_HILIM2: ??=0,HLMT=0x0FFF,??=0,??=0,??=0 */
  setReg16(ADC12_HILIM2, 0x7FF8U);     /* Set high limit register 2 */ 
  /* ADC12_HILIM3: ??=0,HLMT=0x0FFF,??=0,??=0,??=0 */
  setReg16(ADC12_HILIM3, 0x7FF8U);     /* Set high limit register 3 */ 
  /* ADC12_HILIM4: ??=0,HLMT=0x0FFF,??=0,??=0,??=0 */
  setReg16(ADC12_HILIM4, 0x7FF8U);     /* Set high limit register 4 */ 
  /* ADC12_HILIM5: ??=0,HLMT=0x0FFF,??=0,??=0,??=0 */
  setReg16(ADC12_HILIM5, 0x7FF8U);     /* Set high limit register 5 */ 
  /* ADC12_HILIM6: ??=0,HLMT=0x0FFF,??=0,??=0,??=0 */
  setReg16(ADC12_HILIM6, 0x7FF8U);     /* Set high limit register 6 */ 
  /* ADC12_HILIM7: ??=0,HLMT=0x0FFF,??=0,??=0,??=0 */
  setReg16(ADC12_HILIM7, 0x7FF8U);     /* Set high limit register 7 */ 
  /* ADC12_HILIM8: ??=0,HLMT=0x0FFF,??=0,??=0,??=0 */
  setReg16(ADC12_HILIM8, 0x7FF8U);     /* Set high limit register 8 */ 
  /* ADC12_HILIM9: ??=0,HLMT=0x0FFF,??=0,??=0,??=0 */
  setReg16(ADC12_HILIM9, 0x7FF8U);     /* Set high limit register 9 */ 
  /* ADC12_HILIM10: ??=0,HLMT=0x0FFF,??=0,??=0,??=0 */
  setReg16(ADC12_HILIM10, 0x7FF8U);    /* Set high limit register 10 */ 
  /* ADC12_HILIM11: ??=0,HLMT=0x0FFF,??=0,??=0,??=0 */
  setReg16(ADC12_HILIM11, 0x7FF8U);    /* Set high limit register 11 */ 
  /* ADC12_HILIM12: ??=0,HLMT=0x0FFF,??=0,??=0,??=0 */
  setReg16(ADC12_HILIM12, 0x7FF8U);    /* Set high limit register 12 */ 
  /* ADC12_HILIM13: ??=0,HLMT=0x0FFF,??=0,??=0,??=0 */
  setReg16(ADC12_HILIM13, 0x7FF8U);    /* Set high limit register 13 */ 
  /* ADC12_HILIM14: ??=0,HLMT=0x0FFF,??=0,??=0,??=0 */
  setReg16(ADC12_HILIM14, 0x7FF8U);    /* Set high limit register 14 */ 
  /* ADC12_HILIM15: ??=0,HLMT=0x0FFF,??=0,??=0,??=0 */
  setReg16(ADC12_HILIM15, 0x7FF8U);    /* Set high limit register 15 */ 
  /* ADC12_OFFST0: ??=0,OFFSET=0,??=0,??=0,??=0 */
  setReg16(ADC12_OFFST0, 0x00U);       /* Set offset register 0 */ 
  /* ADC12_OFFST1: ??=0,OFFSET=0,??=0,??=0,??=0 */
  setReg16(ADC12_OFFST1, 0x00U);       /* Set offset register 1 */ 
  /* ADC12_OFFST2: ??=0,OFFSET=0,??=0,??=0,??=0 */
  setReg16(ADC12_OFFST2, 0x00U);       /* Set offset register 2 */ 
  /* ADC12_OFFST3: ??=0,OFFSET=0,??=0,??=0,??=0 */
  setReg16(ADC12_OFFST3, 0x00U);       /* Set offset register 3 */ 
  /* ADC12_OFFST4: ??=0,OFFSET=0,??=0,??=0,??=0 */
  setReg16(ADC12_OFFST4, 0x00U);       /* Set offset register 4 */ 
  /* ADC12_OFFST5: ??=0,OFFSET=0,??=0,??=0,??=0 */
  setReg16(ADC12_OFFST5, 0x00U);       /* Set offset register 5 */ 
  /* ADC12_OFFST6: ??=0,OFFSET=0,??=0,??=0,??=0 */
  setReg16(ADC12_OFFST6, 0x00U);       /* Set offset register 6 */ 
  /* ADC12_OFFST7: ??=0,OFFSET=0,??=0,??=0,??=0 */
  setReg16(ADC12_OFFST7, 0x00U);       /* Set offset register 7 */ 
  /* ADC12_OFFST8: ??=0,OFFSET=0,??=0,??=0,??=0 */
  setReg16(ADC12_OFFST8, 0x00U);       /* Set offset register 8 */ 
  /* ADC12_OFFST9: ??=0,OFFSET=0,??=0,??=0,??=0 */
  setReg16(ADC12_OFFST9, 0x00U);       /* Set offset register 9 */ 
  /* ADC12_OFFST10: ??=0,OFFSET=0,??=0,??=0,??=0 */
  setReg16(ADC12_OFFST10, 0x00U);      /* Set offset register 10 */ 
  /* ADC12_OFFST11: ??=0,OFFSET=0,??=0,??=0,??=0 */
  setReg16(ADC12_OFFST11, 0x00U);      /* Set offset register 11 */ 
  /* ADC12_OFFST12: ??=0,OFFSET=0,??=0,??=0,??=0 */
  setReg16(ADC12_OFFST12, 0x00U);      /* Set offset register 12 */ 
  /* ADC12_OFFST13: ??=0,OFFSET=0,??=0,??=0,??=0 */
  setReg16(ADC12_OFFST13, 0x00U);      /* Set offset register 13 */ 
  /* ADC12_OFFST14: ??=0,OFFSET=0,??=0,??=0,??=0 */
  setReg16(ADC12_OFFST14, 0x00U);      /* Set offset register 14 */ 
  /* ADC12_OFFST15: ??=0,OFFSET=0,??=0,??=0,??=0 */
  setReg16(ADC12_OFFST15, 0x00U);      /* Set offset register 15 */ 
  /* ADC12_ZXCTRL1: ZCE7=0,ZCE6=0,ZCE5=0,ZCE4=0,ZCE3=0,ZCE2=0,ZCE1=0,ZCE0=0 */
  setReg16(ADC12_ZXCTRL1, 0x00U);      /* Set zero crossing control register */ 
  /* ADC12_ZXCTRL2: ZCE15=0,ZCE14=0,ZCE13=0,ZCE12=0,ZCE11=0,ZCE10=0,ZCE9=0,ZCE8=0 */
  setReg16(ADC12_ZXCTRL2, 0x00U);      /* Set zero crossing control register */ 
  /* ADC12_GC1: GAIN7=0,GAIN6=0,GAIN5=0,GAIN4=0,GAIN3=0,GAIN2=0,GAIN1=0,GAIN0=0 */
  setReg16(ADC12_GC1, 0x00U);          /* Set gain control 1 register */ 
  /* ADC12_GC2: GAIN15=0,GAIN14=0,GAIN13=0,GAIN12=0,GAIN11=0,GAIN10=0,GAIN9=0,GAIN8=0 */
  setReg16(ADC12_GC2, 0x00U);          /* Set gain control 2 register */ 
  /* ADC12_SCTRL: SC=8 */
  setReg16(ADC12_SCTRL, 0x08U);        /* Set scan control register */ 
  /* ADC12_SCHLTEN: SCHLTEN=0 */
  setReg16(ADC12_SCHLTEN, 0x00U);      /* Set scan halted interrupt enable register */ 
  /* ADC12_CAL: SEL_VREFH_B=0,SEL_VREFLO_B=0,SEL_VREFH_A=0,SEL_VREFLO_A=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0 */
  setReg16(ADC12_CAL, 0x00U);          /* Set AD calibration mode and references */ 
  /* ADC12_PWR2: ??=0,??=0,DIV1=4,??=0,??=0,??=0,??=0,SPEEDB=3,SPEEDA=3 */
  setReg16(ADC12_PWR2, 0x040FU);       /* Set Power 2 register */ 
  /* ADC12_CTRL3: ??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,DMASRC=0,SCNT1=3,SCNT0=3 */
  setReg16(ADC12_CTRL3, 0x1BU);        /* Set control register 3 */ 
  /* ADC12_CTRL2: DMAEN1=0,STOP1=1,START1=0,SYNC1=1,EOSIE1=0,CHNCFG_H=0,SIMULT=1,DIV0=4 */
  setReg16(ADC12_CTRL2, 0x5044U);      /* Set control register 2 */ 
  /* ADC12_CTRL1: DMAEN0=0,STOP0=0,START0=0,SYNC0=1,EOSIE0=1,ZCIE=0,LLMTIE=0,HLMTIE=0,CHNCFG_L=0,??=0,SMODE=5 */
  setReg16(ADC12_CTRL1, 0x1805U);      /* Set control register 1 */ 
  /* ADC12_STAT: CIP0=0,CIP1=0,??=0,EOSI1=0,EOSI0=1,ZCI=0,LLMTI=0,HLMTI=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0 */
  setReg16(ADC12_STAT, 0x0800U);       /* Clear EOSI flag(s) */ 
  /* ADC12_HILIMSTAT: HLS=0xFFFF */
  setReg16(ADC12_HILIMSTAT, 0xFFFFU);  /* Clear limit status flags */ 
  /* ADC12_LOLIMSTAT: LLS=0xFFFF */
  setReg16(ADC12_LOLIMSTAT, 0xFFFFU);  /* Clear limit status flags */ 
  /* ADC12_ZXSTAT: ZCS=0xFFFF */
  setReg16(ADC12_ZXSTAT, 0xFFFFU);     /* Clear limit status flags */ 
  /* ADC12_PWR: ASB=0,??=0,??=0,??=0,PSTS1=0,PSTS0=0,PUDELAY=0x1A,APD=0,??=0,PD1=0,PD0=0 */
  setReg16(ADC12_PWR, 0x01A0U);        /* Set power control register */ 
}

/* END ADC1. */

/*!
** @}
*/
/*
** ###################################################################
**
**     This file was created by Processor Expert 10.3 [05.09]
**     for the Freescale 56800 series of microcontrollers.
**
** ###################################################################
*/
