Paparazzi UAS
v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
|
I2C interface for University of Reading charge sensor. More...
#include "modules/meteo/charge_sens.h"
#include "mcu_periph/i2c.h"
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
Go to the source code of this file.
Macros | |
#define | CHARGE_SENS_DEV i2c0 |
#define | CHARGE_SENS_I2C_ADDR 0x78 |
#define | CHARGE_NB 10 |
Functions | |
void | charge_sens_init (void) |
void | charge_sens_periodic (void) |
void | charge_sens_event (void) |
Variables | |
struct i2c_transaction | charge_trans |
uint16_t | charge [CHARGE_NB] |
int32_t | charge_cnt |
I2C interface for University of Reading charge sensor.
Definition in file charge_sens.c.
#define CHARGE_NB 10 |
Definition at line 40 of file charge_sens.c.
Referenced by charge_sens_event().
#define CHARGE_SENS_DEV i2c0 |
Definition at line 36 of file charge_sens.c.
Referenced by charge_sens_periodic().
#define CHARGE_SENS_I2C_ADDR 0x78 |
Definition at line 39 of file charge_sens.c.
Referenced by charge_sens_periodic().
void charge_sens_event | ( | void | ) |
Definition at line 56 of file charge_sens.c.
References i2c_transaction::buf, charge, charge_cnt, CHARGE_NB, charge_trans, DefaultChannel, DefaultDevice, I2CTransDone, I2CTransSuccess, and i2c_transaction::status.
void charge_sens_init | ( | void | ) |
Definition at line 46 of file charge_sens.c.
References charge_cnt.
void charge_sens_periodic | ( | void | ) |
Definition at line 51 of file charge_sens.c.
References CHARGE_SENS_DEV, CHARGE_SENS_I2C_ADDR, charge_trans, and i2c_receive().
Definition at line 43 of file charge_sens.c.
Referenced by charge_sens_event().
int32_t charge_cnt |
Definition at line 44 of file charge_sens.c.
Referenced by charge_sens_event(), and charge_sens_init().
struct i2c_transaction charge_trans |
Definition at line 42 of file charge_sens.c.
Referenced by charge_sens_event(), and charge_sens_periodic().