25 lines
380 B
C
25 lines
380 B
C
#include "defines.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"{
|
|
#endif
|
|
|
|
#define TEMP_SENSOR_VCC_DDR DDRB
|
|
#define TEMP_SENSOR_VCC_PORT PORTB
|
|
#define TEMP_SENSOR_VCC_BIT PB1
|
|
|
|
#define TEMP_SENSOR_ADMUX ( _BV(MUX1) | _BV(MUX0) ) // ADC3 / PA3
|
|
|
|
|
|
|
|
void initADC();
|
|
void stopADC();
|
|
long readADC();
|
|
|
|
long readVcc();
|
|
long readtemp();
|
|
float calctemp(long t);
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|