msb-430-common/drivers/include/sht11-board.h
Go to the documentation of this file.
1 /*
2  * Copyright 2013, Freie Universitaet Berlin (FUB). All rights reserved.
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #ifndef SHT11_BOARD_H
10 #define SHT11_BOARD_H
11 
24 #include <msp430x16x.h>
25 #include "bitarithm.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 /* SCK = P3B5
32  * DATA = P3B4
33  */
34 
35 #define SHT11_SCK_LOW P3OUT &= ~(BIT5);
36 #define SHT11_SCK_HIGH P3OUT |= BIT5;
37 #define SHT11_DATA (P3IN & BIT5)
38 #define SHT11_DATA_LOW P3OUT &= ~(BIT5);
39 #define SHT11_DATA_HIGH P3OUT |= BIT5;
40 #define SHT11_DATA_IN P3DIR &= ~(BIT5);
41 #define SHT11_DATA_OUT P3DIR |= BIT5;
42 #define SHT11_INIT P3DIR |= BIT5; /* FIO1DIR |= BIT25; PINSEL3 &= ~(BIT14|BIT15 | BIT16|BIT17); */
43 
44 #ifdef __cplusplus
45 }
46 #endif
47 
49 #endif /* SHT11_BOARD_H */
Helper functions for bit arithmetic.