Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures 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 "messages.h"
#include "subsystems/datalink/downlink.h"
+ Include dependency graph for temp_tmp102.c:

Go to the source code of this file.

Macros

#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE
 
#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 DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE

Definition at line 39 of file temp_tmp102.c.

#define TMP102_CONF1   0x60

Definition at line 61 of file temp_tmp102.c.

Referenced by tmp102_init().

#define TMP102_CONF2   0xF0

Definition at line 63 of file temp_tmp102.c.

Referenced by tmp102_init().

#define TMP102_SLAVE_ADDR   0x90

Definition at line 57 of file temp_tmp102.c.

Referenced by tmp102_init(), and tmp102_periodic().

#define TMP_I2C_DEV   i2c0

Definition at line 47 of file temp_tmp102.c.

Referenced by tmp102_init(), and tmp102_periodic().

Function Documentation

void tmp102_init ( void  )

Definition at line 66 of file temp_tmp102.c.

References i2c_transaction::buf, FALSE, 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 75 of file temp_tmp102.c.

References i2c_transaction::buf, i2c_transceive(), TMP102_SLAVE_ADDR, TMP102_TEMP_REG, TMP_I2C_DEV, tmp_meas_started, tmp_trans, and TRUE.

+ Here is the call graph for this function:

Variable Documentation

float ftmp_temperature

Definition at line 43 of file temp_tmp102.c.

Referenced by tmp102_event().

uint8_t tmp_meas_started

Definition at line 42 of file temp_tmp102.c.

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

struct i2c_transaction tmp_trans

Definition at line 44 of file temp_tmp102.c.

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