Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
humid_sht_i2c.c File Reference

Sensirion SHT25 humidity/temperature sensor interface. More...

#include "modules/meteo/humid_sht_i2c.h"
#include "mcu_periph/i2c.h"
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "modules/datalink/downlink.h"
+ Include dependency graph for humid_sht_i2c.c:

Go to the source code of this file.

Macros

#define SHT_I2C_DEV   i2c0
 
#define SHT_SLAVE_ADDR   0x80
 

Functions

int8_t humid_sht_crc (volatile uint8_t *data)
 
void humid_sht_init_i2c (void)
 
void humid_sht_periodic_i2c (void)
 
void humid_sht_p_temp (void)
 
void humid_sht_p_humid (void)
 
void humid_sht_event_i2c (void)
 

Variables

struct i2c_transaction sht_trans
 
uint8_t sht_status
 
uint8_t sht_serial [8] = {0}
 
uint32_t sht_serial1 = 0
 
uint32_t sht_serial2 = 0
 
uint16_t humidsht_i2c
 
uint16_t tempsht_i2c
 
float fhumidsht_i2c
 
float ftempsht_i2c
 

Detailed Description

Sensirion SHT25 humidity/temperature sensor interface.

Definition in file humid_sht_i2c.c.

Macro Definition Documentation

◆ SHT_I2C_DEV

#define SHT_I2C_DEV   i2c0

Definition at line 38 of file humid_sht_i2c.c.

◆ SHT_SLAVE_ADDR

#define SHT_SLAVE_ADDR   0x80

Definition at line 41 of file humid_sht_i2c.c.

Function Documentation

◆ humid_sht_crc()

int8_t humid_sht_crc ( volatile uint8_t data)

Definition at line 50 of file humid_sht_i2c.c.

References logger_uart_parse::crc.

Referenced by humid_sht_event_i2c().

+ Here is the caller graph for this function:

◆ humid_sht_event_i2c()

◆ humid_sht_init_i2c()

void humid_sht_init_i2c ( void  )

Definition at line 71 of file humid_sht_i2c.c.

References SHT2_UNINIT, and sht_status.

◆ humid_sht_p_humid()

void humid_sht_p_humid ( void  )

Definition at line 121 of file humid_sht_i2c.c.

References i2c_receive(), SHT2_GET_HUMID, SHT2_READ_HUMID, SHT_I2C_DEV, SHT_SLAVE_ADDR, sht_status, and sht_trans.

+ Here is the call graph for this function:

◆ humid_sht_p_temp()

void humid_sht_p_temp ( void  )

Definition at line 111 of file humid_sht_i2c.c.

References i2c_receive(), SHT2_GET_TEMP, SHT2_READ_TEMP, SHT_I2C_DEV, SHT_SLAVE_ADDR, sht_status, and sht_trans.

+ Here is the call graph for this function:

◆ humid_sht_periodic_i2c()

Variable Documentation

◆ fhumidsht_i2c

float fhumidsht_i2c

Definition at line 48 of file humid_sht_i2c.c.

Referenced by humid_sht_event_i2c().

◆ ftempsht_i2c

float ftempsht_i2c

Definition at line 48 of file humid_sht_i2c.c.

Referenced by humid_sht_event_i2c().

◆ humidsht_i2c

uint16_t humidsht_i2c

Definition at line 47 of file humid_sht_i2c.c.

Referenced by humid_sht_event_i2c().

◆ sht_serial

uint8_t sht_serial[8] = {0}

Definition at line 45 of file humid_sht_i2c.c.

Referenced by humid_sht_event_i2c().

◆ sht_serial1

uint32_t sht_serial1 = 0

Definition at line 46 of file humid_sht_i2c.c.

Referenced by humid_sht_event_i2c(), and humid_sht_periodic_i2c().

◆ sht_serial2

uint32_t sht_serial2 = 0

Definition at line 46 of file humid_sht_i2c.c.

Referenced by humid_sht_event_i2c(), and humid_sht_periodic_i2c().

◆ sht_status

◆ sht_trans

◆ tempsht_i2c

uint16_t tempsht_i2c

Definition at line 47 of file humid_sht_i2c.c.

Referenced by humid_sht_event_i2c().