adc.c

Go to the documentation of this file.
00001 /***************************************************************************//**
00002  *  \file   adc.c
00003  *
00004  *  \brief  This file provides all the functionalities provided by ADC driver  
00005  *          module of Freescale MPC563 power-pc MCU
00006  *
00007  *  \version    1.0A - Initial Draft
00008  *  \date       25 June 2010
00009  *
00010  *  \version    1.1A - Design changed to support run-time CCW addition and 
00011  *                      configuration
00012  *  \date       16 July 2010
00013  ******************************************************************************/
00014 
00015 /******************************************************************************
00016                                 Include Files
00017 ******************************************************************************/
00018 #include "adc_Cfg.h"
00019 #include "adc.h"
00020 
00021 
00022 /******************************************************************************
00023                                 Type defines
00024 ******************************************************************************/
00025 /** \brief  This structure defines the data for each CCW and the 
00026             Application call-back function for that conversion */
00027 typedef struct
00028 {
00029     /** Upper two bits will be used for mask configuration and lower 
00030         10 bits for CCW Info */
00031     unsigned short u16CCW_Data;
00032 }QADC_CCW_Data;
00033 
00034 /** \brief  This structure holds all global data of teh ADC module */
00035  typedef struct
00036  {
00037     unsigned short CCW_Data[ADC_MOD_CCW_TOT];
00038     /** Provides the Queue-2 CCW begin position in the Queue */
00039     unsigned char u8Q2BeginPos;
00040  }QADC_Drv;
00041 
00042 /******************************************************************************
00043                             Global Variables
00044 ******************************************************************************/
00045 /** \var    self
00046  *  \brief  This global static variable holds ADC driver related data for each
00047             ADC converter module */
00048 static QADC_Drv self[ADC_TOT_MOD];
00049 
00050 /** \brief  Module A address*/
00051 #define MOD_A_ADDR 0x500
00052 /** \brief  Module B address*/
00053 #define MOD_B_ADDR 0x1000
00054 
00055 
00056 /** \brief  This variable holds the address for register array of all the 
00057             ADC converters */
00058 struct QADC64_tag* const ModRegAddr[ADC_TOT_MOD] = 
00059                                     {MOD_A_ADDR, MOD_B_ADDR};
00060 
00061 int main()
00062 {
00063     return 0;
00064 }