Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
geiger_counter.c File Reference

I2C interface for University of Reading Geiger counter. More...

#include "modules/meteo/geiger_counter.h"
#include "mcu_periph/i2c.h"
#include "mcu_periph/uart.h"
#include "messages.h"
#include "subsystems/datalink/downlink.h"
+ Include dependency graph for geiger_counter.c:

Go to the source code of this file.

Macros

#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE
 
#define GEIGER_CNT_DEV   i2c0
 
#define GEIGER_CNT_I2C_ADDR   0x76
 

Functions

void geiger_counter_init (void)
 
void geiger_counter_periodic (void)
 
void geiger_counter_event (void)
 

Variables

struct i2c_transaction geiger_trans
 
uint32_t count_geiger_1
 
uint32_t count_geiger_2
 
uint16_t volt_geiger
 

Detailed Description

I2C interface for University of Reading Geiger counter.

Definition in file geiger_counter.c.

Macro Definition Documentation

#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE

Definition at line 35 of file geiger_counter.c.

#define GEIGER_CNT_DEV   i2c0

Definition at line 39 of file geiger_counter.c.

Referenced by geiger_counter_periodic().

#define GEIGER_CNT_I2C_ADDR   0x76

Definition at line 42 of file geiger_counter.c.

Referenced by geiger_counter_periodic().

Function Documentation

void geiger_counter_init ( void  )

Definition at line 48 of file geiger_counter.c.

void geiger_counter_periodic ( void  )

Definition at line 51 of file geiger_counter.c.

References GEIGER_CNT_DEV, GEIGER_CNT_I2C_ADDR, geiger_trans, and i2c_receive().

+ Here is the call graph for this function:

Variable Documentation

uint32_t count_geiger_1

Definition at line 45 of file geiger_counter.c.

Referenced by geiger_counter_event().

uint32_t count_geiger_2

Definition at line 45 of file geiger_counter.c.

Referenced by geiger_counter_event().

struct i2c_transaction geiger_trans

Definition at line 44 of file geiger_counter.c.

Referenced by geiger_counter_event(), and geiger_counter_periodic().

uint16_t volt_geiger

Definition at line 46 of file geiger_counter.c.

Referenced by geiger_counter_event().