packages/web/353/php_top/i2c.inc File Reference

Go to the source code of this file.

Functions

 i2c_ctl ($bus, $data="")
 i2c_send ($width, $bus, $a, $d, $raw=0)
 smbus_send ($a, $d)
 i2c_receive ($width, $bus, $a, $raw=0)
 i2c_setprot ($bus, $slave, $bit, $value)
 i2c_getCMOSClock ()
 i2c_bcd ($v)
 i2c_setCMOSClock ()
 i2c_read256b ($slave=0xa0)
 i2c_write256b ($data, $slave=0xa0)


Function Documentation

i2c_bcd ( v  ) 

Definition at line 140 of file i2c.inc.

References $d, and $v.

Referenced by i2c_setCMOSClock().

i2c_ctl ( bus,
data = "" 
)

*************************************************************************** ! FILE NAME : i2c.inc ! DESCRIPTION: Provides functions to read/write over i2c buses in the camera, ! low-level R/W and additionally: ! Setting per-slave protection mask, ! Synchronizing system clock with a "CMOS" one ! Reading from/writing to EEPROM memory ! Copyright (C) 2008 Elphel, Inc ! -----------------------------------------------------------------------------** ! ! This program 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 3 of the License, or ! (at your option) any later version. ! ! This program 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 this program. If not, see <http://www.gnu.org/licenses/>. ! -----------------------------------------------------------------------------** !

Log
i2c.inc,v
! Revision 1.1.1.1 2008/11/27 20:04:03 elphel ! ! ! Revision 1.3 2008/10/04 16:09:04 elphel ! updating FPGA time with system time from CMOS ! ! Revision 1.2 2008/06/04 20:26:23 elphel ! includes SMBus operations, needed to activate USB on the 10369A board ! ! Revision 1.2 2008/03/16 01:24:09 elphel ! Added i2c speed control interface ! ! Revision 1.1 2008/03/15 23:05:18 elphel ! split i2c.php into i2c.php and i2c.inc (to be used from other scripts) ! !

$data - string of deciaml values separated by ":", empty - don't change

Definition at line 44 of file i2c.inc.

References $bus, $data, $i, $xml, and dev.

i2c_getCMOSClock (  ) 

Definition at line 118 of file i2c.inc.

References $d, $data, $i2c, $out, $v, dev, and time.

i2c_read256b ( slave = 0xa0  ) 

Definition at line 162 of file i2c.inc.

References $data, $i2c, and dev.

i2c_receive ( width,
bus,
a,
raw = 0 
)

Definition at line 95 of file i2c.inc.

References $a, $bus, $data, $i2c, $v, $width, dev, and raw.

i2c_send ( width,
bus,
a,
d,
raw = 0 
)

Definition at line 72 of file i2c.inc.

References $a, $bus, $d, $i2c, $width, dev, and raw.

i2c_setCMOSClock (  ) 

Definition at line 145 of file i2c.inc.

References $data, $i2c, dev, i2c_bcd(), and time.

i2c_setprot ( bus,
slave,
bit,
value 
)

Definition at line 107 of file i2c.inc.

References $bus, and $data.

i2c_write256b ( data,
slave = 0xa0 
)

Definition at line 171 of file i2c.inc.

References $data, $i, $i2c, $rslt, and dev.

smbus_send ( a,
d 
)

Definition at line 83 of file i2c.inc.

References $a, $cmd, $d, $i2c, and dev.


Generated on Fri Nov 28 00:08:38 2008 for elphel by  doxygen 1.5.1