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

Go to the source code of this file.

Variables

 $width = 0
 $bus = 0
 $adr = -1
 $data = ""
 $nopars = false
 $raw = 0
 $wprot = -1
 $rprot = -1
 $rslt = ""
 $cmd = ""
 $model = ""
 $rev = ""
 $brand = "Elphel"
 $serial = ""
 $time = ""
 $msg = "<?xml version=\"1.0\"?>\n<i2c>\n"
 break
case toCMOS
 break
case fromEEPROM
 break
 break
case model
 break
case rev
 break
case serial
 break
case time
 break
case raw
 $raw = 1
 $width = 8
 break
case width
 break
case bus
 break
case adr
 break
case wp
 break
case rp
 break
case data
 break
 $zero = strpos($rslt,chr(0))
 break
case toEEPROM
case xa0
case $wprot
 $data = $xml->asXML()
 break
case ctl
 break
 $rslt = i2c_ctl($bus,$data)->asXML()
 $msg = "<width>".$width."</width>\n"
 $msg = "<bus>".$bus."</bus>\n"
 $msg = "<slave>".(sprintf("0x%x",($adr>>(($width==8)?7:8)) & 0xfe ))."</slave>\n"
 $rslt = i2c_send($width,$bus,$adr,$data,$raw)


Variable Documentation

$adr = -1

Definition at line 59 of file i2c.php.

$brand = "Elphel"

Definition at line 70 of file i2c.php.

$bus = 0

Definition at line 58 of file i2c.php.

$cmd = ""

Definition at line 66 of file i2c.php.

$data = $xml->asXML()

Definition at line 165 of file i2c.php.

$data = ""

Definition at line 60 of file i2c.php.

$model = ""

Definition at line 68 of file i2c.php.

$msg = "<slave>".(sprintf("0x%x",($adr>>(($width==8)?7:8)) & 0xfe ))."</slave>\n"

Definition at line 197 of file i2c.php.

$msg = "<bus>".$bus."</bus>\n"

Definition at line 196 of file i2c.php.

$msg = "<width>".$width."</width>\n"

Definition at line 195 of file i2c.php.

$msg = "<?xml version=\"1.0\"?>\n<i2c>\n"

Definition at line 73 of file i2c.php.

$nopars = false

Definition at line 61 of file i2c.php.

$raw = 1

Definition at line 109 of file i2c.php.

$raw = 0

Definition at line 62 of file i2c.php.

$rev = ""

Definition at line 69 of file i2c.php.

$rprot = -1

Definition at line 64 of file i2c.php.

$rslt = i2c_send($width,$bus,$adr,$data,$raw)

Definition at line 208 of file i2c.php.

$rslt = i2c_ctl($bus,$data)->asXML()

Definition at line 179 of file i2c.php.

$rslt = ""

Definition at line 65 of file i2c.php.

$serial = ""

Definition at line 71 of file i2c.php.

$time = ""

Definition at line 72 of file i2c.php.

Referenced by parse_seq(), seq_extract_channel(), seq_send(), and seq_table().

$width = 8

Definition at line 110 of file i2c.php.

$width = 0

*************************************************************************** ! FILE NAME : i2c.php ! DESCRIPTION: Provides single byte/short r/w from/to the i2c ! 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.php,v
! Revision 1.1.1.1 2008/11/27 20:04:03 elphel ! ! ! Revision 1.8 2008/04/24 20:32:44 elphel ! reverted, wrong edit ! ! Revision 1.7 2008/04/24 18:19:50 elphel ! changed to absolute path to i2c.inc ! ! Revision 1.6 2008/03/16 01:24:09 elphel ! Added i2c speed control interface ! ! Revision 1.5 2008/03/15 23:05:18 elphel ! split i2c.php into i2c.php and i2c.inc (to be used from other scripts) ! ! Revision 1.4 2008/03/15 18:38:21 elphel ! Implemented add-on boards EEPROM support ! ! Revision 1.3 2008/02/20 07:41:42 elphel ! report error if the date is wrong ! ! Revision 1.2 2008/02/13 00:30:01 elphel ! Added system time synchronization with "CMOS" clock ! ! Revision 1.1 2008/02/12 21:53:20 elphel ! Modified I2c to support multiple buses, added raw access (no address registers) and per-slave protection bitmasks ! !

Definition at line 57 of file i2c.php.

case $wprot

Definition at line 152 of file i2c.php.

$wprot = -1

Definition at line 63 of file i2c.php.

$zero = strpos($rslt,chr(0))

Definition at line 139 of file i2c.php.

case adr

Definition at line 119 of file i2c.php.

break

Definition at line 177 of file i2c.php.

break

Definition at line 173 of file i2c.php.

break

Definition at line 149 of file i2c.php.

break

Definition at line 131 of file i2c.php.

break

Definition at line 128 of file i2c.php.

break

Definition at line 124 of file i2c.php.

break

Definition at line 120 of file i2c.php.

break

Definition at line 117 of file i2c.php.

break

Definition at line 114 of file i2c.php.

break

Definition at line 111 of file i2c.php.

break

Definition at line 106 of file i2c.php.

break

Definition at line 103 of file i2c.php.

break

Definition at line 100 of file i2c.php.

break

Definition at line 97 of file i2c.php.

break

Definition at line 94 of file i2c.php.

break

Definition at line 92 of file i2c.php.

break

Definition at line 87 of file i2c.php.

break

Definition at line 84 of file i2c.php.

case bus

Definition at line 116 of file i2c.php.

Referenced by cris_dma_test_irq(), xi2c_open(), xi2c_read(), xi2c_release(), and xi2c_write().

case ctl

Definition at line 176 of file i2c.php.

Referenced by snd_determine_driver(), snd_func_card_id(), snd_func_pcm_args_by_class(), and snd_func_pcm_id().

case data

Definition at line 130 of file i2c.php.

case fromEEPROM

Definition at line 91 of file i2c.php.

case model

Definition at line 96 of file i2c.php.

Referenced by checkSclSda().

case raw

Definition at line 108 of file i2c.php.

Referenced by createDefaultConfig(), i2c_receive(), i2c_send(), PHP_FUNCTION(), receive_i2c(), receive_i2c_4(), receive_i2c_n(), send_i2c(), send_i2c_4(), send_i2c_4a(), and showUsage().

case rev

Definition at line 99 of file i2c.php.

case rp

Definition at line 126 of file i2c.php.

Referenced by circbuf_lseek(), fpga_jtag_read(), fpga_jtag_release(), framePointersXML(), jpeghead_lseek(), JTAG_configure(), png_do_bgr(), png_do_invert(), png_do_packswap(), png_do_read_intrapixel(), png_do_swap(), png_do_write_intrapixel(), png_read_filter_row(), png_read_image(), png_read_rows(), png_write_find_filter(), png_write_image(), png_write_rows(), and update_rx_stats().

case serial

Definition at line 102 of file i2c.php.

case time

Definition at line 105 of file i2c.php.

Referenced by add_host_filesystem_entry(), arping(), createDefaultConfig(), grab_and_send(), i2c_getCMOSClock(), i2c_setCMOSClock(), parse_special(), profileShow(), and showUsage().

case toCMOS

Definition at line 86 of file i2c.php.

case toEEPROM

Definition at line 152 of file i2c.php.

case width

Definition at line 113 of file i2c.php.

case wp

Definition at line 122 of file i2c.php.

Referenced by circbufValidPointer(), fpga_jtag_read(), fpga_jtag_release(), fpga_jtag_write(), framePointersXML(), and JTAG_configure().

case xa0

Definition at line 152 of file i2c.php.

Referenced by JTAG_configure(), and main().


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