Subversion Repositories HomeAutomation

Rev

Details | Last modification | View Log | SVN | RSS feed

Rev Author Line No. Line
139 johboh 1
/*********************************************************************
2
 *
3
 *   Header file for ADC routines.
4
 *
5
 *********************************************************************
6
 * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/Include/adc.h $
7
 * Last changed:    $LastChangedDate: 2007-02-25 20:51:08 +0100 (Sun, 25 Feb 2007) $
8
 * By:              $LastChangedBy: johboh $
9
 * Revision:        $Revision: 339 $
10
 ********************************************************************/
11
#ifndef ADC_H
12
#define ADC_H
13
 
14
#include <stackTasks.h>
15
#include <typedefs.h>
16
#include <delays.h>
17
#include <compiler.h>
18
 
19
#define TEMP_SAMPLES 50 // Number of samples
20
 
21
void adcInit(BOOL useExtRef,BYTE portCfg);
22
void adcISR(void);
23
BOOL adcConvert(BYTE channel);
24
void temperatureRead(char *tenth, BYTE *decimal);
25
int adcRead(void);
26
BOOL adcDone(void);
339 johboh 27
unsigned long adcGetRaw(void);
139 johboh 28
 
29
#endif