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
155 #ifdef PCAP01_LOAD_FIRMWARE
200 #ifdef PCAP01_STANDARD
221 #ifdef PCAP01_STANDARD
void sys_time_usleep(uint32_t us)
sys_time_usleep(uint32_t us)
Common code for AP and FBW telemetry.
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
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.
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.
@ I2CTransSuccess
transaction successfully finished by I2C driver
@ I2CTransDone
transaction set to done by user level
@ I2CTransPending
transaction is pending in queue
I2C transaction structure.
void pcap01_periodic(void)
pcap01_readData
void PCAP01_Control(uint8_t control)
PCAP01_Control.
void pcap01readRegister(uint8_t reg)
void pcap01writeRegister(uint8_t reg, uint32_t value)
void writePCAP01_SRAM(uint8_t data, uint16_t s_add)
struct i2c_transaction pcap01_trans
uint8_t readPCAP01_SRAM(uint16_t s_add)
uint8_t pcap01_meas_started
ACAM Picocap Single-chip Solution for Capacitance Measurement.
#define PCAP01_REG18_VALUE
#define PCAP01_REG6_VALUE
#define PCAP01_REG8_VALUE
#define PCAP01_REG4_VALUE
#define PCAP01_REG14_VALUE
#define PCAP01_REG11_VALUE
#define PCAP01_REG15_VALUE
#define PCAP01_REG9_VALUE
void writePCAP01_firmware(void)
#define PCAP01_REG16_VALUE
#define PCAP01_REG5_VALUE
#define PCAP01_REG20_VALUE
#define PCAP01_REG3_VALUE
#define PCAP01_REG7_VALUE
#define PCAP01_REG1_VALUE
#define PCAP01_REG10_VALUE
#define PCAP01_REG2_VALUE
#define PCAP01_REG17_VALUE
#define PCAP01_REG19_VALUE
#define PCAP01_REG12_VALUE
#define PCAP01_REG0_VALUE
#define PCAP01_REG13_VALUE
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
arch independent LED (Light Emitting Diodes) API
Architecture independent timing functions.
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.