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 readCMOS
 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))
 $rslt = bin2hex($rslt)
 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 170 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 202 of file i2c.php.

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

Definition at line 201 of file i2c.php.

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

Definition at line 200 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 112 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 213 of file i2c.php.

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

Definition at line 184 of file i2c.php.

$rslt = bin2hex($rslt)

Definition at line 152 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 113 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.10 2008/07/16 23:18:54 spectr_rain ! option cmd=readCMOS - just read w/o modification of camera time ! ! 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 157 of file i2c.php.

$wprot = -1

Definition at line 63 of file i2c.php.

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

Definition at line 142 of file i2c.php.

case adr

Definition at line 122 of file i2c.php.

break

Definition at line 182 of file i2c.php.

break

Definition at line 178 of file i2c.php.

break

Definition at line 154 of file i2c.php.

break

Definition at line 134 of file i2c.php.

break

Definition at line 131 of file i2c.php.

break

Definition at line 127 of file i2c.php.

break

Definition at line 123 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 109 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 95 of file i2c.php.

break

Definition at line 90 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 119 of file i2c.php.

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

case ctl

Definition at line 181 of file i2c.php.

case data

Definition at line 133 of file i2c.php.

Referenced by broadcom_check_duplex(), broadcom_check_speed(), CreateBootCmds(), cris_ide_start_dma(), crisv32_eth_check_speed(), crisv32_eth_get_mdio_reg(), crisv32_eth_ioctl(), crisv32_eth_negotiate(), crisv32_eth_reset_tranceiver(), crisv32_eth_send_mdio_cmd(), do_one_xcvr(), etrax_gpio_wake_up_check(), fi2c_ioctl(), finish_data(), generic_check_duplex(), generic_check_speed(), gpio_poll(), gpio_write(), i2c_ioctl(), intel_check_duplex(), intel_check_speed(), iop_usb_get_frame(), iop_usb_port_stat(), jtag_send(), jtag_write_bits(), log(), main(), mdio_read(), mdio_write(), mpu_rh_port_request(), national_check_duplex(), national_check_speed(), PHP_FUNCTION(), Video::process(), read_done(), setCYField(), tdk_check_duplex(), tdk_check_speed(), vitesse_check_duplex(), vitesse_check_speed(), wait_mpu_reg_data(), xi2c_getbit(), and xi2c_getscl().

case fromEEPROM

Definition at line 94 of file i2c.php.

case model

Definition at line 99 of file i2c.php.

Referenced by checkSclSda().

case raw

Definition at line 111 of file i2c.php.

Referenced by i2c_receive(), i2c_send(), receive_i2c(), receive_i2c_4(), receive_i2c_n(), send_i2c(), send_i2c_4(), send_i2c_4_nc(), and send_i2c_4a().

case readCMOS

Definition at line 86 of file i2c.php.

case rev

Definition at line 102 of file i2c.php.

case rp

Definition at line 129 of file i2c.php.

Referenced by circbuf_lseek(), fpga_jtag_read(), fpga_jtag_release(), framePointersXML(), jpeghead_lseek(), JTAG_configure(), update_rx_stats(), x313_dma_forget_jpeg(), and X313_dma_update().

case serial

Definition at line 105 of file i2c.php.

case time

Definition at line 108 of file i2c.php.

Referenced by add_host_filesystem_entry(), arping(), grab_and_send(), i2c_setCMOSClock(), main(), parse_special(), send_buf_image(), and send_jpegfile_image().

case toCMOS

Definition at line 89 of file i2c.php.

case toEEPROM

Definition at line 157 of file i2c.php.

case width

Definition at line 116 of file i2c.php.

case wp

Definition at line 125 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 157 of file i2c.php.

Referenced by JTAG_configure(), and main().


Generated on Thu Aug 7 16:20:58 2008 for elphel by  doxygen 1.5.1