Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
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"
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 |
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.
#define PCAP01_I2C_DEV i2c0 |
Definition at line 48 of file humid_pcap01.c.
Referenced by PCAP01_Control(), pcap01readRegister(), pcap01writeRegister(), readPCAP01_SRAM(), and writePCAP01_SRAM().
void PCAP01_Control | ( | uint8_t | control | ) |
PCAP01_Control.
Function to send control commands to the PCAP01
control | Control 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().
void pcap01_event | ( | void | ) |
Definition at line 208 of file humid_pcap01.c.
References i2c_transaction::buf, PCAP01VALUE::C_ratio, DefaultChannel, DefaultDevice, I2CTransDone, I2CTransSuccess, PCAP01_GET_HUMID, PCAP01_GET_TEMP, PCAP01_IDLE, PCAP01_REG13, PCAP01_REG3, pcap01_trans, pcap01readRegister(), PCAP01VALUE::R_ratio, PCAP01VALUE::status, and i2c_transaction::status.
void pcap01_init | ( | void | ) |
Definition at line 151 of file humid_pcap01.c.
References I2CTransDone, PCAP01_Control(), PCAP01_IDLE, PCAP01_IN_RESET, PCAP01_REG0, PCAP01_REG0_VALUE, PCAP01_REG1, PCAP01_REG10, PCAP01_REG10_VALUE, PCAP01_REG11, PCAP01_REG11_VALUE, PCAP01_REG12, PCAP01_REG12_VALUE, PCAP01_REG13, PCAP01_REG13_VALUE, PCAP01_REG14, PCAP01_REG14_VALUE, PCAP01_REG15, PCAP01_REG15_VALUE, PCAP01_REG16, PCAP01_REG16_VALUE, PCAP01_REG17, PCAP01_REG17_VALUE, PCAP01_REG18, PCAP01_REG18_VALUE, PCAP01_REG19, PCAP01_REG19_VALUE, PCAP01_REG1_VALUE, PCAP01_REG2, PCAP01_REG20, PCAP01_REG20_VALUE, PCAP01_REG2_VALUE, PCAP01_REG3, PCAP01_REG3_VALUE, PCAP01_REG4, PCAP01_REG4_VALUE, PCAP01_REG5, PCAP01_REG5_VALUE, PCAP01_REG6, PCAP01_REG6_VALUE, PCAP01_REG7, PCAP01_REG7_VALUE, PCAP01_REG8, PCAP01_REG8_VALUE, PCAP01_REG9, PCAP01_REG9_VALUE, PCAP01_START, pcap01_trans, pcap01writeRegister(), PCAP01VALUE::status, i2c_transaction::status, sys_time_usleep(), and writePCAP01_firmware().
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.
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().
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().
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.
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.
uint8_t pcap01_meas_started |
Definition at line 43 of file humid_pcap01.c.
struct i2c_transaction pcap01_trans |
Definition at line 44 of file humid_pcap01.c.
Referenced by PCAP01_Control(), pcap01_event(), pcap01_init(), pcap01readRegister(), pcap01writeRegister(), readPCAP01_SRAM(), and writePCAP01_SRAM().
PCAP01VALUE pcap01Value |
Definition at line 45 of file humid_pcap01.c.