Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
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 "subsystems/datalink/downlink.h"
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 |
Sensirion SHT25 humidity/temperature sensor interface.
Definition in file humid_sht_i2c.c.
#define SHT_I2C_DEV i2c0 |
Definition at line 38 of file humid_sht_i2c.c.
#define SHT_SLAVE_ADDR 0x80 |
Definition at line 41 of file humid_sht_i2c.c.
Definition at line 50 of file humid_sht_i2c.c.
References crc.
Referenced by humid_sht_event_i2c().
void humid_sht_event_i2c | ( | void | ) |
Definition at line 130 of file humid_sht_i2c.c.
References i2c_transaction::buf, DefaultChannel, DefaultDevice, fhumidsht_i2c, ftempsht_i2c, humid_sht_crc(), humidsht_i2c, i2c_transceive(), i2c_transmit(), I2CTransDone, I2CTransSuccess, if(), SHT2_GET_HUMID, SHT2_GET_TEMP, SHT2_IDLE, SHT2_READ_HUMID, SHT2_READ_TEMP, SHT2_RESET, SHT2_SERIAL, SHT2_SERIAL1, SHT2_SERIAL2, SHT2_TRIG_HUMID, SHT2_TRIG_TEMP, SHT2_TRIGGER_HUMID, SHT_I2C_DEV, sht_serial, sht_serial1, sht_serial2, SHT_SLAVE_ADDR, sht_status, sht_trans, i2c_transaction::status, and tempsht_i2c.
void humid_sht_init_i2c | ( | void | ) |
Definition at line 71 of file humid_sht_i2c.c.
References SHT2_UNINIT, and sht_status.
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.
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.
void humid_sht_periodic_i2c | ( | void | ) |
Definition at line 76 of file humid_sht_i2c.c.
References i2c_transaction::buf, DefaultChannel, DefaultDevice, i2c_transceive(), i2c_transmit(), SHT2_RESET, SHT2_SERIAL, SHT2_SERIAL1, SHT2_SERIAL2, SHT2_SOFT_RESET, SHT2_TRIG_TEMP, SHT2_TRIGGER_TEMP, SHT2_UNINIT, SHT_I2C_DEV, sht_serial1, sht_serial2, SHT_SLAVE_ADDR, sht_status, and sht_trans.
float fhumidsht_i2c |
Definition at line 48 of file humid_sht_i2c.c.
Referenced by humid_sht_event_i2c().
float ftempsht_i2c |
Definition at line 48 of file humid_sht_i2c.c.
Referenced by humid_sht_event_i2c().
uint16_t humidsht_i2c |
Definition at line 47 of file humid_sht_i2c.c.
Referenced by humid_sht_event_i2c().
uint8_t sht_serial[8] = {0} |
Definition at line 45 of file humid_sht_i2c.c.
Referenced by humid_sht_event_i2c().
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().
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().
uint8_t sht_status |
Definition at line 44 of file humid_sht_i2c.c.
Referenced by humid_sht_event_i2c(), humid_sht_init_i2c(), humid_sht_p_humid(), humid_sht_p_temp(), and humid_sht_periodic_i2c().
struct i2c_transaction sht_trans |
Definition at line 43 of file humid_sht_i2c.c.
Referenced by humid_sht_event_i2c(), humid_sht_p_humid(), humid_sht_p_temp(), and humid_sht_periodic_i2c().
uint16_t tempsht_i2c |
Definition at line 47 of file humid_sht_i2c.c.
Referenced by humid_sht_event_i2c().