Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
humid_sht_uart.h File Reference
#include "std.h"
#include "mcu_periph/uart.h"
+ Include dependency graph for humid_sht_uart.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MetLinkDevice   (&(MET_LINK).device)
 
#define MetBuffer()   MetLinkDevice->char_available(MetLinkDevice->periph)
 
#define MetGetch()   MetLinkDevice->get_byte(MetLinkDevice->periph)
 
#define ReadMetBuffer()   { while (MetBuffer()&&!met_msg_received) parse_met_buffer(MetGetch()); }
 
#define MetSend1(c)   MetLinkDevice->put_byte(MetLinkDevice->periph, 0, c)
 
#define MetUartSend1(c)   MetSend1(c)
 
#define MetSend(_dat, _len)   { for (uint8_t i = 0; i< (_len); i++) MetSend1(_dat[i]); };
 
#define MetUartSetBaudrate(_b)   uart_periph_set_baudrate(&(MET_LINK), _b)
 
#define MetUartRunning   (MET_LINK).tx_running
 

Functions

void humid_sht_uart_init (void)
 
void humid_sht_uart_periodic (void)
 
void humid_sht_uart_event (void)
 

Variables

uint16_t humidsht
 !SITL More...
 
uint16_t tempsht
 
float fhumidsht
 
float ftempsht
 
bool humid_sht_available
 
uint8_t humid_sht_status
 

Detailed Description

SHTxx sensor interface.

This reads the values for humidity and temperature from the SHTxx sensor through an uart.

Definition in file humid_sht_uart.h.

Macro Definition Documentation

◆ MetBuffer

#define MetBuffer ( )    MetLinkDevice->char_available(MetLinkDevice->periph)

Definition at line 40 of file humid_sht_uart.h.

◆ MetGetch

#define MetGetch ( )    MetLinkDevice->get_byte(MetLinkDevice->periph)

Definition at line 41 of file humid_sht_uart.h.

◆ MetLinkDevice

#define MetLinkDevice   (&(MET_LINK).device)

Definition at line 38 of file humid_sht_uart.h.

◆ MetSend

#define MetSend (   _dat,
  _len 
)    { for (uint8_t i = 0; i< (_len); i++) MetSend1(_dat[i]); };

Definition at line 45 of file humid_sht_uart.h.

◆ MetSend1

#define MetSend1 (   c)    MetLinkDevice->put_byte(MetLinkDevice->periph, 0, c)

Definition at line 43 of file humid_sht_uart.h.

◆ MetUartRunning

#define MetUartRunning   (MET_LINK).tx_running

Definition at line 47 of file humid_sht_uart.h.

◆ MetUartSend1

#define MetUartSend1 (   c)    MetSend1(c)

Definition at line 44 of file humid_sht_uart.h.

◆ MetUartSetBaudrate

#define MetUartSetBaudrate (   _b)    uart_periph_set_baudrate(&(MET_LINK), _b)

Definition at line 46 of file humid_sht_uart.h.

◆ ReadMetBuffer

#define ReadMetBuffer ( )    { while (MetBuffer()&&!met_msg_received) parse_met_buffer(MetGetch()); }

Definition at line 42 of file humid_sht_uart.h.

Function Documentation

◆ humid_sht_uart_event()

void humid_sht_uart_event ( void  )

Definition at line 109 of file humid_sht_uart.c.

References humid_sht_uart_parse(), MetBuffer, and MetGetch.

+ Here is the call graph for this function:

◆ humid_sht_uart_init()

void humid_sht_uart_init ( void  )

Definition at line 105 of file humid_sht_uart.c.

◆ humid_sht_uart_periodic()

void humid_sht_uart_periodic ( void  )

Definition at line 76 of file humid_sht_uart.c.

Variable Documentation

◆ fhumidsht

float fhumidsht

Definition at line 87 of file humid_sht.c.

Referenced by humid_sht_periodic(), and humid_sht_uart_parse().

◆ ftempsht

float ftempsht

Definition at line 52 of file humid_sht_uart.h.

◆ humid_sht_available

bool humid_sht_available

Definition at line 88 of file humid_sht.c.

Referenced by humid_sht_init(), and humid_sht_periodic().

◆ humid_sht_status

uint8_t humid_sht_status

Definition at line 89 of file humid_sht.c.

Referenced by humid_sht_init(), and humid_sht_periodic().

◆ humidsht

uint16_t humidsht

!SITL

Definition at line 86 of file humid_sht.c.

Referenced by humid_sht_periodic(), and humid_sht_uart_parse().

◆ tempsht

uint16_t tempsht

Definition at line 51 of file humid_sht_uart.h.