Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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

#define TMP102_CONF1   0x60

Definition at line 58 of file temp_tmp102.c.

Referenced by tmp102_init().

#define TMP102_CONF2   0xF0

Definition at line 60 of file temp_tmp102.c.

Referenced by tmp102_init().

#define TMP102_SLAVE_ADDR   0x90

Definition at line 54 of file temp_tmp102.c.

Referenced by tmp102_init(), and tmp102_periodic().

#define TMP_I2C_DEV   i2c0

Definition at line 44 of file temp_tmp102.c.

Referenced by tmp102_init(), and tmp102_periodic().

Function Documentation

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:

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

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 41 of file temp_tmp102.c.

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