/*******************************************************************************
*                                                                              *
* Copyright 2012 Rheinmetall Canada Inc.                                  	   *
*                                                                              *
* No part of this document may be reproduced, stored in                        *
* a retrieval system, or transmitted, in any form or by any means,             *
* electronic, mechanical, photocopying, recording, or otherwise,               *
* without the prior written permission of Rheinmetall Canada Inc.              *
*                                                                              *
*******************************************************************************/
/*
	Description:
	This is a template file for standard C header file.

*/

/* ************************************************************************** */
/* ¤Revision:
000 20120516 JFM,
	Original version.

### YYYYMMDD Initial, Bug Identification
	Change description.
 */

#ifndef ADC_H
#define ADC_H

/* ************************************************************************** */
/* Externs */

extern unsigned short egADCMotPhaseA;
extern unsigned short egADCMotPhaseB;
extern unsigned short egADCMotPhaseC;
/* ************************************************************************** */
/* Defines */
#define ADC_VOLT_PER_BIT (float)0.003222656
/* ************************************************************************** */
/* Type definitions */
enum eADCModes
{
	ADC_NORMAL_MODE,
	ADC_CBIT_MODE,
	ADC_TRACE_MODE,
	ADC_HALL_ACQ_MODE,
	ADC_MAX_MODE
};

/* ************************************************************************** */
/* Prototypes */
void InitADC(void);

int ADCStopConversion(void);
//Hall Acquisition Mode
int ADCEnterHallACQMode(void);
int ADCStartHallACQConversion(void);

//Traces Mode
int ADCEnterTracesMode(void);
int ADCStartTracesConversion(void);

//CBIT Mode
int ADCEnterCBITMode(void);
int ADCStartCBITConversion(void); 


int ADCGetMode(void);

	

#endif	//#define ADC_H
//EOF

