Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
ezcurrent.c File Reference

Copyright (C) 2012 Gerard Toonstra. More...

Include dependency graph for ezcurrent.c:

Go to the source code of this file.

Macros

#define EZCURRENT_ADDR   0xEF
#define EZCURRENT_I2C_DEV   i2c1
#define Uint16FromBuf(_buf, _idx)
#define Int16FromBuf(_buf, _idx)

Functions

void ezcurrent_init (void)
void ezcurrent_read_periodic (void)
void ezcurrent_read_event (void)

Variables

struct i2c_transaction ezcurrent_i2c_trans

Detailed Description

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.

Macro Definition Documentation

◆ EZCURRENT_ADDR

#define EZCURRENT_ADDR   0xEF

Definition at line 42 of file ezcurrent.c.

Referenced by ezcurrent_init().

◆ EZCURRENT_I2C_DEV

#define EZCURRENT_I2C_DEV   i2c1

Definition at line 45 of file ezcurrent.c.

Referenced by ezcurrent_read_periodic().

◆ Int16FromBuf

#define Int16FromBuf ( _buf,
_idx )
Value:
((int16_t)((_buf[_idx+1]<<8) | _buf[_idx]))
short int16_t
Typedef defining 16 bit short type.

Definition at line 64 of file ezcurrent.c.

Referenced by ezcurrent_read_event().

◆ Uint16FromBuf

#define Uint16FromBuf ( _buf,
_idx )
Value:
((uint16_t)((_buf[_idx+1]<<8) | _buf[_idx]))
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.

Definition at line 63 of file ezcurrent.c.

Referenced by ezcurrent_read_event().

Function Documentation

◆ ezcurrent_init()

void ezcurrent_init ( void )

Definition at line 50 of file ezcurrent.c.

References EZCURRENT_ADDR, ezcurrent_i2c_trans, and I2CTransDone.

◆ ezcurrent_read_event()

void ezcurrent_read_event ( void )

◆ ezcurrent_read_periodic()

void ezcurrent_read_periodic ( void )

Definition at line 56 of file ezcurrent.c.

References EZCURRENT_I2C_DEV, ezcurrent_i2c_trans, i2c_receive(), and I2CTransDone.

Here is the call graph for this function:

Variable Documentation

◆ ezcurrent_i2c_trans

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