Paparazzi UAS  v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
baro_scp_i2c.c File Reference

VTI SCP1000 I2C sensor interface. More...

#include "baro_scp_i2c.h"
#include "mcu_periph/sys_time.h"
#include "mcu_periph/i2c.h"
#include "modules/core/abi.h"
#include "led.h"
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "modules/datalink/downlink.h"
+ Include dependency graph for baro_scp_i2c.c:

Go to the source code of this file.


#define SCP_I2C_DEV   i2c0
#define SCP1000_SLAVE_ADDR   0x22


static void baro_scp_start_high_res_measurement (void)
void baro_scp_init (void)
void baro_scp_periodic (void)
void baro_scp_event (void)


uint8_t baro_scp_status
uint32_t baro_scp_pressure
uint16_t baro_scp_temperature
struct i2c_transaction scp_trans

Detailed Description

VTI SCP1000 I2C sensor interface.

This reads the values for pressure and temperature from the VTI SCP1000 sensor through I2C.

Definition in file baro_scp_i2c.c.

Macro Definition Documentation


#define SCP1000_SLAVE_ADDR   0x22

Definition at line 34 of file baro_scp_i2c.c.


#define SCP_I2C_DEV   i2c0

Definition at line 31 of file baro_scp_i2c.c.

Function Documentation

◆ baro_scp_event()

◆ baro_scp_init()

void baro_scp_init ( void  )

Definition at line 44 of file baro_scp_i2c.c.

References baro_scp_status, and BARO_SCP_UNINIT.

◆ baro_scp_periodic()

void baro_scp_periodic ( void  )

◆ baro_scp_start_high_res_measurement()

static void baro_scp_start_high_res_measurement ( void  )

Definition at line 36 of file baro_scp_i2c.c.

References i2c_transaction::buf, i2c_transmit(), SCP1000_HIGH_RES, SCP1000_OPERATION, SCP1000_SLAVE_ADDR, SCP_I2C_DEV, and scp_trans.

Referenced by baro_scp_periodic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ baro_scp_pressure

uint32_t baro_scp_pressure

Definition at line 25 of file baro_scp_i2c.c.

Referenced by baro_scp_event().

◆ baro_scp_status

uint8_t baro_scp_status

Definition at line 24 of file baro_scp_i2c.c.

Referenced by baro_scp_event(), baro_scp_init(), and baro_scp_periodic().

◆ baro_scp_temperature

uint16_t baro_scp_temperature

Definition at line 26 of file baro_scp_i2c.c.

Referenced by baro_scp_event().

◆ scp_trans

struct i2c_transaction scp_trans