30 lines
705 B
C
30 lines
705 B
C
|
|
#ifndef TEMP_H_QWERTY
|
|
#define TEMP_H_QWERTY
|
|
|
|
#include <avr/io.h>
|
|
|
|
#define DS18B20_PORT PORTB
|
|
#define DS18B20_DDR DDRB
|
|
#define DS18B20_PIN PINB
|
|
#define DS18B20_PB PB3
|
|
|
|
#define DS18B20_CMD_CONVERTTEMP 0x44
|
|
#define DS18B20_CMD_RSCRATCHPAD 0xBE
|
|
#define DS18B20_CMD_WSCRATCHPAD 0x4E
|
|
#define DS18B20_CMD_CPYSCRATCHPAD 0x48
|
|
#define DS18B20_CMD_RECEEPROM 0xB8
|
|
#define DS18B20_CMD_RPWRSUPPLY 0xB4
|
|
#define DS18B20_CMD_SEARCHROM 0xF0
|
|
#define DS18B20_CMD_READROM 0x33
|
|
#define DS18B20_CMD_MATCHROM 0x55
|
|
#define DS18B20_CMD_SKIPROM 0xCC
|
|
#define DS18B20_CMD_ALARMSEARCH 0xEC
|
|
|
|
//#define DS18B20_STOPINT 1
|
|
|
|
uint16_t ds18b20_get_temp(void);
|
|
uint8_t ds18b20_reset(void);
|
|
|
|
#endif
|