![]() |
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Copyright (C) 2012 Gerard Toonstra. More...
Go to the source code of this file.
Macros | |
#define | EZCURRENT_ADDR 0xEF |
#define | EZCURRENT_I2C_DEV i2c1 |
#define | Uint16FromBuf(_buf, _idx) ((uint16_t)((_buf[_idx+1]<<8) | _buf[_idx])) |
#define | Int16FromBuf(_buf, _idx) ((int16_t)((_buf[_idx+1]<<8) | _buf[_idx])) |
Functions | |
void | ezcurrent_init (void) |
void | ezcurrent_read_periodic (void) |
void | ezcurrent_read_event (void) |
Variables | |
struct i2c_transaction | ezcurrent_i2c_trans |
Copyright (C) 2012 Gerard Toonstra.
This file is part of paparazzi.
paparazzi is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
paparazzi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with paparazzi; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Implementation of driver for the EzOSD Current sensor.
Notes: Connect directly to I2C1 port.
Sensor module wire assignments: Red wire: 5V Black wire: Ground DAT: SDA CLK: SCL
This file is part of paparazzi.
paparazzi is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
paparazzi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with paparazzi; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Prototypes of driver for the EzOSD Current sensor.
Notes: Connect directly to I2C1 port.
Sensor module wire assignments: Red wire: 5V Black wire: Ground DAT: SDA CLK: SCL
Definition in file ezcurrent.c.
#define EZCURRENT_ADDR 0xEF |
Definition at line 42 of file ezcurrent.c.
Definition at line 45 of file ezcurrent.c.
Definition at line 64 of file ezcurrent.c.
Definition at line 63 of file ezcurrent.c.
Definition at line 50 of file ezcurrent.c.
References EZCURRENT_ADDR, ezcurrent_i2c_trans, I2CTransDone, i2c_transaction::slave_addr, and i2c_transaction::status.
Definition at line 66 of file ezcurrent.c.
References i2c_transaction::buf, Electrical::charge, Electrical::current, electrical, ezcurrent_i2c_trans, foo, I2CTransDone, I2CTransFailed, I2CTransSuccess, Int16FromBuf, i2c_transaction::status, Uint16FromBuf, and Electrical::vsupply.
Definition at line 56 of file ezcurrent.c.
References EZCURRENT_I2C_DEV, ezcurrent_i2c_trans, i2c_receive(), I2CTransDone, i2c_transaction::slave_addr, and i2c_transaction::status.
struct i2c_transaction ezcurrent_i2c_trans |
Definition at line 48 of file ezcurrent.c.
Referenced by ezcurrent_init(), ezcurrent_read_event(), and ezcurrent_read_periodic().