Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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 "pprzlink/messages.h"
#include "modules/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

◆ PCF_I2C_DEV

#define PCF_I2C_DEV   i2c0

Definition at line 45 of file wind_gfi.c.

◆ PCF_SLAVE_ADDR

#define PCF_SLAVE_ADDR   0x40

Definition at line 51 of file wind_gfi.c.

◆ ZERO_OFFSET_DEGREES

#define ZERO_OFFSET_DEGREES   45.

Definition at line 41 of file wind_gfi.c.

Function Documentation

◆ wind_gfi_event()

◆ wind_gfi_init()

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.

◆ wind_gfi_periodic()

void wind_gfi_periodic ( void  )

Definition at line 63 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

◆ pcf_direction

uint32_t pcf_direction

Definition at line 54 of file wind_gfi.c.

Referenced by wind_gfi_event().

◆ pcf_status

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

◆ pcf_trans

struct i2c_transaction pcf_trans

Definition at line 1 of file wind_gfi.c.

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