Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
temp_tmp102.c File Reference

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 "subsystems/datalink/downlink.h"
+ Include dependency graph for temp_tmp102.c:

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
 

Detailed Description

TI TMP102 I2C sensor interface.

This reads the values for temperature from the TI TMP201 sensor through I2C.

Definition in file temp_tmp102.c.

Macro Definition Documentation

◆ TMP102_CONF1

#define TMP102_CONF1   0x60

Definition at line 58 of file temp_tmp102.c.

◆ TMP102_CONF2

#define TMP102_CONF2   0xF0

Definition at line 60 of file temp_tmp102.c.

◆ TMP102_SLAVE_ADDR

#define TMP102_SLAVE_ADDR   0x90

Definition at line 54 of file temp_tmp102.c.

◆ TMP_I2C_DEV

#define TMP_I2C_DEV   i2c0

Definition at line 44 of file temp_tmp102.c.

Function Documentation

◆ tmp102_event()

◆ tmp102_init()

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.

+ Here is the call graph for this function:

◆ tmp102_periodic()

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.

+ Here is the call graph for this function:

Variable Documentation

◆ ftmp_temperature

float ftmp_temperature

Definition at line 40 of file temp_tmp102.c.

Referenced by tmp102_event().

◆ tmp_meas_started

uint8_t tmp_meas_started

Definition at line 39 of file temp_tmp102.c.

Referenced by tmp102_event(), tmp102_init(), and tmp102_periodic().

◆ tmp_trans

struct i2c_transaction tmp_trans

Definition at line 41 of file temp_tmp102.c.

Referenced by tmp102_event(), tmp102_init(), and tmp102_periodic().