/*********************************************************************
*
* Header file for ADC routines.
*
*********************************************************************
* FileName: $HeadURL: https://svn.auml.se/svn/HomeAutomation/branches/modules/EmbeddedSoftware/PIC/Include/adc.h $
* Last changed: $LastChangedDate: 2007-02-25 20:51:08 +0100 (Sun, 25 Feb 2007) $
* By: $LastChangedBy: johboh $
* Revision: $Revision: 339 $
********************************************************************/
#ifndef ADC_H
#define ADC_H
#include <stackTasks.h>
#include <typedefs.h>
#include <delays.h>
#include <compiler.h>
#define TEMP_SAMPLES 50 // Number of samples
void adcInit(BOOL useExtRef,BYTE portCfg);
void adcISR(void);
BOOL adcConvert(BYTE channel);
void temperatureRead(char *tenth, BYTE *decimal);
int adcRead(void);
BOOL adcDone(void);
unsigned long adcGetRaw(void);
#endif