Contiki 2.6

sht15.h

00001 /* Copyright (c) 2009  ARAGO SYSTEMS
00002    All rights reserved.
00003 
00004    Redistribution and use in source and binary forms, with or without
00005    modification, are permitted provided that the following conditions are met:
00006 
00007    * Redistributions of source code must retain the above copyright
00008      notice, this list of conditions and the following disclaimer.
00009    * Redistributions in binary form must reproduce the above copyright
00010      notice, this list of conditions and the following disclaimer in
00011      the documentation and/or other materials provided with the
00012      distribution.
00013    * Neither the name of the copyright holders nor the names of
00014      contributors may be used to endorse or promote products derived
00015      from this software without specific prior written permission.
00016 
00017   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00018   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00019   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00020   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00021   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00022   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00023   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00024   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00025   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00026   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00027   POSSIBILITY OF SUCH DAMAGE.
00028 */
00029 /*
00030   $Id: v 0.1 2011/02/15 tchapelle Exp $
00031 */
00032 
00033 
00034 /**
00035       SHT15/75 Driver
00036 
00037 !!!   be advise that the SHT15 and SHT75 are not i2C compliant sensors
00038       they are just designed to not disturb i2C devices on a 2 wire bus
00039       this driver allow to drive the sensor with GPIO and delay
00040 */
00041 #include "contiki.h"
00042 
00043 /***********************************************************************************
00044 *   SHT15 functions
00045 */
00046 void sht15_init();
00047 void sht15_measure_temp();
00048 void sht15_measure_hum();
00049 void sht15_wait_measure();
00050 void sht15_read_status();
00051 void sht15_write_status();
00052 void sht15_soft_reset();
00053 uint16_t sht15_read16();
00054 void sht15_write8(uint8_t val);