Paparazzi UAS
v7.0_unstable
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 "modules/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.
#define CHARGE_SENS_DEV i2c0 |
Definition at line 36 of file charge_sens.c.
#define CHARGE_SENS_I2C_ADDR 0x78 |
Definition at line 39 of file charge_sens.c.
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(), and generic_com_periodic().
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 1 of file charge_sens.c.
Referenced by charge_sens_event(), and charge_sens_periodic().