2014-08-27 18:47:31 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2013, Freie Universitaet Berlin (FUB). All rights reserved.
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
|
|
|
*/
|
2010-10-29 17:32:03 +02:00
|
|
|
|
|
|
|
#ifndef SHT11BOARD_H_
|
|
|
|
#define SHT11BOARD_H_
|
|
|
|
|
|
|
|
/**
|
2014-07-31 20:34:28 +02:00
|
|
|
* @ingroup msb_430h
|
2010-10-29 17:32:03 +02:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
2014-07-31 20:34:28 +02:00
|
|
|
* @brief SHT11 Device Driver Configuration For MSB-430 Platform
|
2010-10-29 17:32:03 +02:00
|
|
|
*
|
2013-03-07 22:42:48 +01:00
|
|
|
* @author Freie Universität Berlin, Computer Systems & Telematics, RIOT
|
2010-10-29 17:32:03 +02:00
|
|
|
*
|
|
|
|
*/
|
2013-12-16 17:54:58 +01:00
|
|
|
#include <msp430x16x.h>
|
2013-11-14 12:47:51 +01:00
|
|
|
#include "bitarithm.h"
|
2010-10-29 17:32:03 +02:00
|
|
|
|
2014-10-13 15:25:50 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2010-10-29 17:32:03 +02:00
|
|
|
/* SCK = P3B5
|
|
|
|
* DATA = P3B4
|
|
|
|
*/
|
|
|
|
|
2014-07-31 20:34:28 +02:00
|
|
|
#define SHT11_SCK_LOW P3OUT &= ~(BIT5); /**< serial clock line low */
|
|
|
|
#define SHT11_SCK_HIGH P3OUT |= BIT5; /**< serial clock line high */
|
|
|
|
#define SHT11_DATA (P3IN & BIT5) /**< read serial I/O */
|
|
|
|
#define SHT11_DATA_LOW P3OUT &= ~(BIT5); /**< serial I/O line low */
|
|
|
|
#define SHT11_DATA_HIGH P3OUT |= BIT5; /**< serial I/O line high */
|
|
|
|
#define SHT11_DATA_IN P3DIR &= ~(BIT5); /**< serial I/O as input */
|
|
|
|
#define SHT11_DATA_OUT P3DIR |= BIT5; /**< serial I/O as output */
|
|
|
|
#define SHT11_INIT P3DIR |= BIT5; /* FIO1DIR |= BIT25; PINSEL3 &= ~(BIT14|BIT15 | BIT16|BIT17); */
|
2010-10-29 17:32:03 +02:00
|
|
|
|
2014-10-13 15:25:50 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2010-10-29 17:32:03 +02:00
|
|
|
/** @} */
|
|
|
|
#endif /* SHT11BOARD_H_ */
|