35 #include "pprzlink/messages.h"
38 #ifdef PCAP01_LOAD_FIRMWARE
39 #include "modules/meteo/humid_pcap01_firmware.h"
47 #ifndef PCAP01_I2C_DEV
48 #define PCAP01_I2C_DEV i2c0
107 #ifdef PCAP01_LOAD_FIRMWARE
127 for (i = 0; i <
sizeof(firmware); i++) {
131 for (; i < 4029; i++) {
141 #ifdef PCAP01_STANDARD
149 #endif // PCAP01_LOAD_FIRMWARE
155 #ifdef PCAP01_LOAD_FIRMWARE
200 #ifdef PCAP01_STANDARD
214 switch (pcap01Value.
status) {
221 #ifdef PCAP01_STANDARD
233 humidity = pcap01Value.
C_ratio * (-0.0023959245437) + 516.4124438673063;
234 temperature = pcap01Value.
R_ratio * 61.927 - 259.74;
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
#define PCAP01_REG0_VALUE
void writePCAP01_SRAM(uint8_t data, uint16_t s_add)
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
transaction successfully finished by I2C driver
#define PCAP01_REG15_VALUE
void PCAP01_Control(uint8_t control)
PCAP01_Control.
#define PCAP01_REG13_VALUE
#define PCAP01_REG11_VALUE
void pcap01readRegister(uint8_t reg)
#define PCAP01_REG9_VALUE
#define PCAP01_REG17_VALUE
struct i2c_transaction pcap01_trans
#define PCAP01_REG7_VALUE
void sys_time_usleep(uint32_t us)
sys_time_usleep(uint32_t us)
#define PCAP01_REG5_VALUE
ACAM Picocap Single-chip Solution for Capacitance Measurement.
#define PCAP01_REG18_VALUE
transaction set to done by user level
Architecture independent timing functions.
void writePCAP01_firmware(void)
void pcap01writeRegister(uint8_t reg, uint32_t value)
uint8_t pcap01_meas_started
#define PCAP01_REG8_VALUE
#define PCAP01_REG19_VALUE
#define PCAP01_REG3_VALUE
#define PCAP01_REG16_VALUE
bool i2c_transceive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len_w, uint16_t len_r)
Submit a write/read transaction.
I2C transaction structure.
enum I2CTransactionStatus status
Transaction status.
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
#define PCAP01_REG12_VALUE
uint8_t readPCAP01_SRAM(uint16_t s_add)
#define PCAP01_REG2_VALUE
Common code for AP and FBW telemetry.
arch independent LED (Light Emitting Diodes) API
void pcap01_periodic(void)
pcap01_readData
#define PCAP01_REG6_VALUE
#define PCAP01_REG20_VALUE
#define PCAP01_REG10_VALUE
#define PCAP01_REG14_VALUE
#define PCAP01_REG4_VALUE
transaction is pending in queue
#define PCAP01_REG1_VALUE
Architecture independent I2C (Inter-Integrated Circuit Bus) API.