33 #include "pprzlink/messages.h"
38 #define SHT_I2C_DEV i2c0
41 #define SHT_SLAVE_ADDR 0x80
54 for (i = 0; i < 2; i++) {
56 for (bit = 8; bit > 0; bit--) {
Common code for AP and FBW telemetry.
if(GpsFixValid() &&e_identification_started)
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
enum I2CTransactionStatus status
Transaction status.
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
bool i2c_receive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint16_t len)
Submit a read only transaction.
bool i2c_transceive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len_w, uint16_t len_r)
Submit a write/read transaction.
@ I2CTransSuccess
transaction successfully finished by I2C driver
@ I2CTransDone
transaction set to done by user level
I2C transaction structure.
struct i2c_transaction sht_trans
void humid_sht_periodic_i2c(void)
void humid_sht_p_temp(void)
int8_t humid_sht_crc(volatile uint8_t *data)
void humid_sht_p_humid(void)
void humid_sht_event_i2c(void)
void humid_sht_init_i2c(void)
#define SHT2_TRIGGER_TEMP
#define SHT2_TRIGGER_HUMID
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
signed char int8_t
Typedef defining 8 bit char type.