Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
TI TMP102 I2C sensor interface. More...
#include "modules/meteo/temp_tmp102.h"
#include "mcu_periph/i2c.h"
#include "led.h"
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "modules/datalink/downlink.h"
Go to the source code of this file.
Macros | |
#define | TMP_I2C_DEV i2c0 |
#define | TMP102_SLAVE_ADDR 0x90 |
#define | TMP102_CONF1 0x60 |
#define | TMP102_CONF2 0xF0 |
Functions | |
void | tmp102_init (void) |
void | tmp102_periodic (void) |
void | tmp102_event (void) |
Variables | |
uint8_t | tmp_meas_started |
float | ftmp_temperature |
struct i2c_transaction | tmp_trans |
TI TMP102 I2C sensor interface.
This reads the values for temperature from the TI TMP201 sensor through I2C.
Definition in file temp_tmp102.c.
#define TMP102_CONF1 0x60 |
Definition at line 58 of file temp_tmp102.c.
#define TMP102_CONF2 0xF0 |
Definition at line 60 of file temp_tmp102.c.
#define TMP102_SLAVE_ADDR 0x90 |
Definition at line 54 of file temp_tmp102.c.
#define TMP_I2C_DEV i2c0 |
Definition at line 44 of file temp_tmp102.c.
void tmp102_event | ( | void | ) |
Definition at line 80 of file temp_tmp102.c.
References i2c_transaction::buf, DefaultChannel, DefaultDevice, ftmp_temperature, I2CTransDone, I2CTransSuccess, i2c_transaction::status, tmp_meas_started, tmp_trans, and TRUE.
void tmp102_init | ( | void | ) |
Definition at line 63 of file temp_tmp102.c.
References i2c_transaction::buf, i2c_transmit(), TMP102_CONF1, TMP102_CONF2, TMP102_CONF_REG, TMP102_SLAVE_ADDR, TMP_I2C_DEV, tmp_meas_started, and tmp_trans.
void tmp102_periodic | ( | void | ) |
Definition at line 73 of file temp_tmp102.c.
References i2c_transaction::buf, i2c_transceive(), TMP102_SLAVE_ADDR, TMP102_TEMP_REG, TMP_I2C_DEV, tmp_meas_started, and tmp_trans.
float ftmp_temperature |
Definition at line 40 of file temp_tmp102.c.
Referenced by tmp102_event().
uint8_t tmp_meas_started |
Definition at line 39 of file temp_tmp102.c.
Referenced by tmp102_event(), tmp102_init(), and tmp102_periodic().
struct i2c_transaction tmp_trans |
Definition at line 40 of file temp_tmp102.c.
Referenced by tmp102_event(), tmp102_init(), and tmp102_periodic().