Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
charge_sens.c File Reference

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"
+ Include dependency graph for charge_sens.c:

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
 

Detailed Description

I2C interface for University of Reading charge sensor.

Definition in file charge_sens.c.

Macro Definition Documentation

#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().

Function Documentation

void charge_sens_event ( void  )
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().

+ Here is the call graph for this function:

Variable Documentation

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 42 of file charge_sens.c.

Referenced by charge_sens_event(), and charge_sens_periodic().