![]() |
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Sensirion SHT25 humidity/temperature sensor interface. More...
#include "modules/meteo/humid_sht_i2c.h"
#include "pprzlink/messages.h"
#include "modules/datalink/downlink.h"
Go to the source code of this file.
Macros | |
#define | SHT_I2C_DEV i2c0 |
#define | SHT_SLAVE_ADDR 0x80 |
#define | SHT2_WRITE_USER 0xE6 |
#define | SHT2_READ_USER 0xE7 |
#define | SHT2_TRIGGER_TEMP 0xF3 |
#define | SHT2_TRIGGER_HUMID 0xF5 |
#define | SHT2_SOFT_RESET 0xFE |
Functions | |
static void | humid_sht_thd (void *arg) |
static void | sht_read_serial (struct sht_humid_t *sht) |
static int | sht_read_temp (struct sht_humid_t *sht) |
static int | sht_read_humid (struct sht_humid_t *sht) |
static int8_t | humid_sht_crc (volatile uint8_t *data) |
void | humid_sht_init_i2c (void) |
void | humid_sht_periodic_i2c (void) |
Variables | |
static struct sht_humid_t | sht |
Sensirion SHT25 humidity/temperature sensor interface.
Definition in file humid_sht_i2c.c.
#define SHT2_READ_USER 0xE7 |
Definition at line 41 of file humid_sht_i2c.c.
#define SHT2_SOFT_RESET 0xFE |
Definition at line 44 of file humid_sht_i2c.c.
#define SHT2_TRIGGER_HUMID 0xF5 |
Definition at line 43 of file humid_sht_i2c.c.
#define SHT2_TRIGGER_TEMP 0xF3 |
Definition at line 42 of file humid_sht_i2c.c.
#define SHT2_WRITE_USER 0xE6 |
Definition at line 40 of file humid_sht_i2c.c.
Definition at line 35 of file humid_sht_i2c.c.
#define SHT_SLAVE_ADDR 0x80 |
Definition at line 38 of file humid_sht_i2c.c.
Definition at line 179 of file humid_sht_i2c.c.
References foo.
Referenced by sht_read_humid(), and sht_read_temp().
Definition at line 57 of file humid_sht_i2c.c.
References sht_humid_t::bsem_sht_status, humid_sht_thd(), pprz_bsem_init(), PPRZ_NORMAL_PRIO, pprz_thread_create(), sht, SHT2_UNINIT, sht_humid_t::sht_status, and sht_humid_t::thd_handle.
Definition at line 64 of file humid_sht_i2c.c.
References sht_humid_t::bsem_sht_status, DefaultChannel, DefaultDevice, sht_humid_t::fhumidsht_i2c, foo, sht_humid_t::ftempsht_i2c, sht_humid_t::humidsht_i2c, pprz_bsem_wait_timeout(), sht, SHT2_READING, sht_humid_t::sht_serial1, sht_humid_t::sht_serial2, sht_humid_t::sht_status, and sht_humid_t::tempsht_i2c.
Definition at line 77 of file humid_sht_i2c.c.
References sht_humid_t::bsem_sht_status, i2c_transaction::buf, i2c_blocking_transmit(), I2CTransSuccess, pprz_bsem_signal(), sht, SHT2_READING, SHT2_SOFT_RESET, SHT_I2C_DEV, sht_read_humid(), sht_read_serial(), sht_read_temp(), SHT_SLAVE_ADDR, sht_humid_t::sht_status, sht_humid_t::sht_trans, and sys_time_usleep().
Referenced by humid_sht_init_i2c().
|
static |
Definition at line 158 of file humid_sht_i2c.c.
References i2c_transaction::buf, sht_humid_t::fhumidsht_i2c, humid_sht_crc(), sht_humid_t::humidsht_i2c, i2c_blocking_receive(), i2c_blocking_transmit(), I2CTransSuccess, sht, SHT2_TRIGGER_HUMID, SHT_I2C_DEV, SHT_SLAVE_ADDR, sht_humid_t::sht_trans, and sys_time_usleep().
Referenced by humid_sht_thd().
|
static |
Definition at line 105 of file humid_sht_i2c.c.
References i2c_transaction::buf, foo, i2c_blocking_transceive(), I2CTransSuccess, sht, SHT_I2C_DEV, sht_humid_t::sht_serial1, sht_humid_t::sht_serial2, SHT_SLAVE_ADDR, sht_humid_t::sht_trans, and sys_time_usleep().
Referenced by humid_sht_thd().
|
static |
Definition at line 136 of file humid_sht_i2c.c.
References i2c_transaction::buf, sht_humid_t::ftempsht_i2c, humid_sht_crc(), i2c_blocking_receive(), i2c_blocking_transmit(), I2CTransSuccess, sht, SHT2_TRIGGER_TEMP, SHT_I2C_DEV, SHT_SLAVE_ADDR, sht_humid_t::sht_trans, sys_time_usleep(), and sht_humid_t::tempsht_i2c.
Referenced by humid_sht_thd().
|
static |
Definition at line 54 of file humid_sht_i2c.c.
Referenced by humid_sht_init_i2c(), humid_sht_periodic_i2c(), humid_sht_thd(), sht_read_humid(), sht_read_serial(), and sht_read_temp().