Subversion Repositories HomeAutomation

Rev

Blame | 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: 2006-11-20 21:31:03 +0100 (Mon, 20 Nov 2006) $
  8.  * By:              $LastChangedBy: johboh $
  9.  * Revision:        $Revision: 139 $
  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.  
  28. #endif
  29.