/* ds1820.h

Copyright (C) Alex S. (mailto: md5sum@alexsp.ru)

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details
http://www.gnu.org/licenses/gpl-2.0.html.

You should have received a copy of the GNU General Public License
along with this program in the file gpl-2.0.txt;
if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/


#ifndef DS1820_H_
#define DS1820_H_

//#include "hardware.h"
#include <util/atomic.h>
#include <util/delay.h>

typedef enum{SUCCESS=0,ERROR,CRC,SHORT,OPEN,WAIT} hw_ret_status;
typedef hw_ret_status ds1820_ret_status;

ds1820_ret_status ds1820_start(volatile uint8_t *__DDRx_p,uint8_t _MASK);
ds1820_ret_status ds1820_get_temp(volatile uint8_t *__DDRx_p,uint8_t _MASK,int16_t *temp);

#endif /* DS1820_H_ */
