Subversion Repositories HomeAutomation

Rev

Rev 139 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  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);
  27. unsigned long adcGetRaw(void);
  28.  
  29. #endif
  30.