Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros 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 47 of file wind_gfi.c.

Referenced by wind_gfi_event(), and wind_gfi_periodic().

#define PCF_SLAVE_ADDR   0x40

Definition at line 53 of file wind_gfi.c.

Referenced by wind_gfi_event(), and wind_gfi_periodic().

#define ZERO_OFFSET_DEGREES   45.

Definition at line 43 of file wind_gfi.c.

Referenced by wind_gfi_event().

Function Documentation

void wind_gfi_init ( void  )

Definition at line 59 of file wind_gfi.c.

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

void wind_gfi_periodic ( void  )

Variable Documentation

uint32_t pcf_direction

Definition at line 56 of file wind_gfi.c.

Referenced by wind_gfi_event().

uint8_t pcf_status

Definition at line 57 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 40 of file wind_gfi.c.

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