Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
|
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 "subsystems/datalink/downlink.h"
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 |
GFI wind speed/direction sensor interface.
Uses HEDS-5540_A06, HCTL-2017_A00 and PCF8575.
Definition in file wind_gfi.c.
#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().
void wind_gfi_event | ( | void | ) |
Definition at line 72 of file wind_gfi.c.
References i2c_transaction::buf, DefaultChannel, DefaultDevice, i2c_receive(), i2c_transmit(), I2CTransDone, I2CTransSuccess, pcf_direction, PCF_I2C_DEV, PCF_IDLE, PCF_READ_LSB, PCF_READ_MSB, PCF_SET_OE_LSB, PCF_SET_OE_MSB, PCF_SLAVE_ADDR, pcf_status, pcf_trans, i2c_transaction::status, and ZERO_OFFSET_DEGREES.
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 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.
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().