Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Sharp GP2Y1010AU dust sensor interface. More...
#include "modules/meteo/dust_gp2y.h"
#include "mcu_periph/i2c.h"
#include "mcu_periph/sys_time.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 | GP2Y_I2C_DEV i2c0 |
#define | GP2Y_SLAVE_ADDR 0xED |
Functions | |
void | dust_gp2y_init (void) |
void | dust_gp2y_periodic (void) |
void | dust_gp2y_event (void) |
Variables | |
uint8_t | dust_gp2y_status |
uint16_t | dust_gp2y_density |
float | dust_gp2y_density_f |
struct i2c_transaction | gp2y_trans |
Sharp GP2Y1010AU dust sensor interface.
This reads the values for dust density from the Sharp GP2Y1010AU0F sensor through I2C (needs I2C ADC at the sensor).
Definition in file dust_gp2y.c.
#define GP2Y_I2C_DEV i2c0 |
Definition at line 46 of file dust_gp2y.c.
#define GP2Y_SLAVE_ADDR 0xED |
Definition at line 49 of file dust_gp2y.c.
void dust_gp2y_event | ( | void | ) |
Definition at line 65 of file dust_gp2y.c.
References i2c_transaction::buf, DefaultChannel, DefaultDevice, dust_gp2y_density, dust_gp2y_density_f, gp2y_trans, I2CTransDone, I2CTransSuccess, and i2c_transaction::status.
void dust_gp2y_init | ( | void | ) |
Definition at line 51 of file dust_gp2y.c.
References dust_gp2y_status, and DUST_GP2Y_UNINIT.
void dust_gp2y_periodic | ( | void | ) |
Definition at line 56 of file dust_gp2y.c.
References DUST_GP2Y_IDLE, dust_gp2y_status, DUST_GP2Y_UNINIT, GP2Y_I2C_DEV, GP2Y_SLAVE_ADDR, gp2y_trans, i2c_receive(), and sys_time::nb_sec.
uint16_t dust_gp2y_density |
Definition at line 39 of file dust_gp2y.c.
Referenced by dust_gp2y_event().
float dust_gp2y_density_f |
Definition at line 40 of file dust_gp2y.c.
Referenced by dust_gp2y_event().
uint8_t dust_gp2y_status |
Definition at line 38 of file dust_gp2y.c.
Referenced by dust_gp2y_init(), and dust_gp2y_periodic().
struct i2c_transaction gp2y_trans |
Definition at line 42 of file dust_gp2y.c.
Referenced by dust_gp2y_event(), and dust_gp2y_periodic().