00001 /**************************************************************************** 00002 * ds18b20.c: driver for Maxim DS18B20 thermometer chip. 00003 * 00004 * Contains generic 1-wire driver. 00005 * 00006 * Author: Clemens Valens 00007 * License: GNU General Public License 00008 * 00009 * History 00010 * 2009.11.08 ver 1.00 00011 * 00012 *****************************************************************************/ 00013 00019 #ifndef __DS18B20_H__ 00020 #define __DS18B20_H__ 00021 00022 00023 bool_t ds18b20_init(void); 00024 bool_t ds18b20_write_scratchpad(uint8_t th, uint8_t tl, uint8_t config); 00025 float ds18b20_read_temperature(void); 00026 int ds18b20_read(void *p_dst, uint32_t dst_size); 00027 int ds18b20_write(const uint8_t *p_src, uint32_t src_size); 00028 bool_t ds18b20_read_serial(uint8_t *p_serial); 00029 00030 00031 #endif // __DS18B20_H__ 00032 00033