Subversion Repositories HomeAutomation

Rev

Rev 239 | Blame | Last modification | View Log | SVN | RSS feed

  1. #ifndef TC1047_H_
  2. #define TC1047_H_
  3.  
  4. #if defined(__AVR_ATmega88__)
  5.  
  6. /*-----------------------------------------------
  7.  * Includes
  8.  * ---------------------------------------------*/
  9. #include <stdlib.h>
  10. #include <inttypes.h>
  11.  
  12. /*-----------------------------------------------
  13.  * Defines
  14.  * ---------------------------------------------*/
  15.  
  16. /*
  17.  * If using ATmega88 PDIP ADC7 wont be aviable, only on TFQP.
  18.  *
  19.  */
  20. #define ADC5
  21.  
  22. /*
  23.  * For internal Vref 1.1 volt set VREF_INT 1. For  AVcc or Aref = 5 volt
  24.  * set VREF_INT = 0
  25.  *
  26.  */
  27. #define VREF_INT 0
  28.  
  29. /*-----------------------------------------------
  30.  * Functions
  31.  * ---------------------------------------------*/
  32. void adcTemperatureInit();
  33. uint32_t getTC1047temperature();
  34. #else
  35.     #error Library still not compatible with others than mega88
  36. #endif
  37. #endif
  38.