Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
wind_gfi.c File Reference

GFI wind speed/direction sensor interface. More...

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

Go to the source code of this file.

Macros

#define ZERO_OFFSET_DEGREES   45.
 
#define PCF_I2C_DEV   i2c0
 
#define PCF_SLAVE_ADDR   0x40
 

Functions

void wind_gfi_init (void)
 
void wind_gfi_periodic (void)
 
void wind_gfi_event (void)
 

Variables

struct i2c_transaction pcf_trans
 
uint32_t pcf_direction
 
uint8_t pcf_status
 

Detailed Description

GFI wind speed/direction sensor interface.

Uses HEDS-5540_A06, HCTL-2017_A00 and PCF8575.

Definition in file wind_gfi.c.

Macro Definition Documentation

#define PCF_I2C_DEV   i2c0

Definition at line 45 of file wind_gfi.c.

Referenced by wind_gfi_event(), and wind_gfi_periodic().

#define PCF_SLAVE_ADDR   0x40

Definition at line 51 of file wind_gfi.c.

Referenced by wind_gfi_event(), and wind_gfi_periodic().

#define ZERO_OFFSET_DEGREES   45.

Definition at line 41 of file wind_gfi.c.

Referenced by wind_gfi_event().

Function Documentation

void wind_gfi_init ( void  )

Definition at line 57 of file wind_gfi.c.

References I2CTransDone, PCF_IDLE, pcf_status, pcf_trans, and i2c_transaction::status.

void wind_gfi_periodic ( void  )

Definition at line 62 of file wind_gfi.c.

References i2c_transaction::buf, i2c_transmit(), PCF_I2C_DEV, PCF_SET_OE_LSB, PCF_SLAVE_ADDR, pcf_status, and pcf_trans.

+ Here is the call graph for this function:

Variable Documentation

uint32_t pcf_direction

Definition at line 54 of file wind_gfi.c.

Referenced by wind_gfi_event().

uint8_t pcf_status

Definition at line 55 of file wind_gfi.c.

Referenced by wind_gfi_event(), wind_gfi_init(), and wind_gfi_periodic().

struct i2c_transaction pcf_trans

Definition at line 38 of file wind_gfi.c.

Referenced by wind_gfi_event(), wind_gfi_init(), and wind_gfi_periodic().