35 #include "pprzlink/messages.h"
44 #define TMP_I2C_DEV i2c0
53 #ifndef TMP102_SLAVE_ADDR
54 #define TMP102_SLAVE_ADDR 0x90
58 #define TMP102_CONF1 0x60
60 #define TMP102_CONF2 0xF0
90 tmp_temperature >>= 3;
91 if (tmp_temperature & 0x1000) {
92 tmp_temperature |= 0xE000;
Common code for AP and FBW telemetry.
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_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.
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
arch independent LED (Light Emitting Diodes) API
struct i2c_transaction tmp_trans
#define TMP102_SLAVE_ADDR
void tmp102_periodic(void)
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.