Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
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

◆ CHARGE_NB

#define CHARGE_NB   10

Definition at line 40 of file charge_sens.c.

◆ CHARGE_SENS_DEV

#define CHARGE_SENS_DEV   i2c0

Definition at line 36 of file charge_sens.c.

◆ CHARGE_SENS_I2C_ADDR

#define CHARGE_SENS_I2C_ADDR   0x78

Definition at line 39 of file charge_sens.c.

Function Documentation

◆ charge_sens_event()

void charge_sens_event ( void  )

◆ charge_sens_init()

void charge_sens_init ( void  )

Definition at line 46 of file charge_sens.c.

References charge_cnt.

◆ charge_sens_periodic()

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

◆ charge

Definition at line 43 of file charge_sens.c.

Referenced by charge_sens_event(), and generic_com_periodic().

◆ charge_cnt

int32_t charge_cnt

Definition at line 44 of file charge_sens.c.

Referenced by charge_sens_event(), and charge_sens_init().

◆ charge_trans

struct i2c_transaction charge_trans

Definition at line 42 of file charge_sens.c.

Referenced by charge_sens_event(), and charge_sens_periodic().