Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
humid_pcap01.c File Reference

ACAM Picocap Single-chip Solution for Capacitance Measurement. More...

#include "led.h"
#include "mcu_periph/sys_time.h"
#include "mcu_periph/i2c.h"
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#include "modules/meteo/humid_pcap01.h"
+ Include dependency graph for humid_pcap01.c:

Go to the source code of this file.

Macros

#define PCAP01_I2C_DEV   i2c0
 

Functions

void writePCAP01_SRAM (uint8_t data, uint16_t s_add)
 
uint8_t readPCAP01_SRAM (uint16_t s_add)
 
void PCAP01_Control (uint8_t control)
 PCAP01_Control. More...
 
void pcap01writeRegister (uint8_t reg, uint32_t value)
 
void pcap01_init (void)
 
void pcap01readRegister (uint8_t reg)
 
void pcap01_periodic (void)
 pcap01_readData More...
 
void pcap01_event (void)
 

Variables

uint8_t pcap01_meas_started
 
struct i2c_transaction pcap01_trans
 
PCAP01VALUE pcap01Value
 

Detailed Description

ACAM Picocap Single-chip Solution for Capacitance Measurement.

This reads the values for temperature and humidity from the ACAM capacitance and resistance measurement unit through I2C.

Definition in file humid_pcap01.c.

Macro Definition Documentation

#define PCAP01_I2C_DEV   i2c0

Function Documentation

void PCAP01_Control ( uint8_t  control)

PCAP01_Control.

Function to send control commands to the PCAP01

Parameters
controlControl command possible commands: PCAP01_PU_RESET : Hard reset of the device PCAP01_IN_RESET : Software reset PCAP01_START : Start measurement PCAP01_START : Start measurement PCAP01_TERM : Stop measurement

Definition at line 85 of file humid_pcap01.c.

References i2c_transaction::buf, i2c_transmit(), I2CTransPending, PCAP01_ADDR, PCAP01_I2C_DEV, pcap01_trans, and i2c_transaction::status.

Referenced by pcap01_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void pcap01_periodic ( void  )

pcap01_readData

function where current measurement data from pcap01 is read into global sensor variable

Definition at line 197 of file humid_pcap01.c.

References PCAP01_GET_HUMID, PCAP01_REG1, PCAP01_REG2, pcap01readRegister(), and PCAP01VALUE::status.

+ Here is the call graph for this function:

void pcap01readRegister ( uint8_t  reg)

Definition at line 184 of file humid_pcap01.c.

References i2c_transaction::buf, i2c_transceive(), PCAP01_ADDR, PCAP01_I2C_DEV, and pcap01_trans.

Referenced by pcap01_event(), and pcap01_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void pcap01writeRegister ( uint8_t  reg,
uint32_t  value 
)

Definition at line 96 of file humid_pcap01.c.

References i2c_transaction::buf, i2c_transmit(), I2CTransPending, PCAP01_ADDR, PCAP01_I2C_DEV, pcap01_trans, PCAP01_WRITE_REG, and i2c_transaction::status.

Referenced by pcap01_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint8_t readPCAP01_SRAM ( uint16_t  s_add)

Definition at line 61 of file humid_pcap01.c.

References i2c_transaction::buf, i2c_transceive(), I2CTransPending, PCAP01_ADDR, PCAP01_I2C_DEV, pcap01_trans, and i2c_transaction::status.

+ Here is the call graph for this function:

void writePCAP01_SRAM ( uint8_t  data,
uint16_t  s_add 
)

Definition at line 51 of file humid_pcap01.c.

References i2c_transaction::buf, i2c_transmit(), I2CTransPending, PCAP01_ADDR, PCAP01_I2C_DEV, pcap01_trans, and i2c_transaction::status.

+ Here is the call graph for this function:

Variable Documentation

uint8_t pcap01_meas_started

Definition at line 43 of file humid_pcap01.c.

PCAP01VALUE pcap01Value

Definition at line 45 of file humid_pcap01.c.