Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
humid_sht_uart.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2017 The Paparazzi team
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
30 #ifndef HUMID_SHT_H
31 #define HUMID_SHT_H
32 
33 #include "std.h"
34 
35 #ifndef SITL
36 #include "mcu_periph/uart.h"
37 
38 #define MetLinkDevice (&(MET_LINK).device)
39 
40 #define MetBuffer() MetLinkDevice->char_available(MetLinkDevice->periph)
41 #define MetGetch() MetLinkDevice->get_byte(MetLinkDevice->periph)
42 #define ReadMetBuffer() { while (MetBuffer()&&!met_msg_received) parse_met_buffer(MetGetch()); }
43 #define MetSend1(c) MetLinkDevice->put_byte(MetLinkDevice->periph, 0, c)
44 #define MetUartSend1(c) MetSend1(c)
45 #define MetSend(_dat,_len) { for (uint8_t i = 0; i< (_len); i++) MetSend1(_dat[i]); };
46 #define MetUartSetBaudrate(_b) uart_periph_set_baudrate(&(MET_LINK), _b)
47 #define MetUartRunning (MET_LINK).tx_running
48 
49 #endif
52 extern float fhumidsht, ftempsht;
53 extern bool humid_sht_available;
55 
56 void humid_sht_uart_init(void);
57 void humid_sht_uart_periodic(void);
58 void humid_sht_uart_event(void);
59 
60 #endif /* HUMID_SHT_H */
uint8_t humid_sht_status
Definition: humid_sht.c:89
void humid_sht_uart_periodic(void)
uint16_t humidsht
!SITL
Definition: humid_sht.c:86
void humid_sht_uart_event(void)
float fhumidsht
Definition: humid_sht.c:87
bool humid_sht_available
Definition: humid_sht.c:88
float ftempsht
void humid_sht_uart_init(void)
uint16_t tempsht
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
Definition: vl53l1_types.h:88
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98