Re: Question about I2C and BTTV

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



well, but the i2c in the bt8x8 chips are a separated bus isnt it?
implemented thru the chip itself?

I dont know if im right..
i want to do some testing with i2c too.. i'll take a look in fbtv (part of xawtv) all tv tuners
are connected in the bt8x8 i2c bus so i guess its a good starting point.

-hexa

----- Original Message ----- 
From: "Justin Schoeman" <justin@xxxxxxxxxxxxxxxxxxxx>
To: <video4linux-list@xxxxxxxxxx>
Sent: Wednesday, July 23, 2003 5:43 AM
Subject: Re: Question about I2C and BTTV


> The code I included was code I used to control an i2c display plugged
> into my bt848 based capture card, on the bt848 i2c bus.
> 
> The Linux i2c layer is generic, and can be used for any i2c bus on the
> system.
> 
> -justin
> 
> ho ho wrote:
> > Dear Justin Schoeman:
> > 
> > Thank you very much for your information.  I took a
> > look at the web site of LM_Sensors project and found
> > that they control the componts on a motherboard using
> > I2C.  I wonder if it makes any different in I2C
> > control between directly on motherboard and thru PCI
> > under Linux?
> > 
> > Thanks again for your time and help.
> > 
> > hobobcat
> > 
> >  --- Justin Schoeman <justin@xxxxxxxxxxxxxxxxxxxx>
> > 的郵件內容:> Have a look at the lmsensors project
> > (sorry - don't
> > 
> >>have the URL handy).
> >> There are some simple example i2c programs there,
> >>but basically
> >>something like this works just fine:
> >>
> >>  #include <linux/i2c-dev.h>
> >>
> >>  /* open i2c bus */
> >>  if ((file = open("/dev/i2c/0",O_RDWR)) < 0) {
> >>     perror("open");
> >>     return -1;
> >>  }
> >>  /* set i2c slave address */
> >>  i = 0x28; /* i2c client address */
> >>  if (ioctl(file,I2C_SLAVE, i) < 0) {
> >>    perror("slave");
> >>    return -1;
> >>  }
> >>  /* write to i2c bus */
> >>  if(write(file, buf, strlen(buf)) < 0) {
> >>    perror("write");
> >>    return -1;
> >>  }
> >>  while(1) {
> >>          /* read from i2c bus */
> >>          if(read(file, &c, 1) < 0) {
> >>            perror("read");
> >>            return -1;
> >>          }
> >>        fprintf(stderr, "%d: %c\n", c, c);
> >>  }
> >>  /* close i2c bus */
> >>  close(file);
> >>
> >>-justin
> >>
> >>ho ho wrote:
> >>
> >>>Hello.  I'm trying write an application program to
> >>>control/program a Philips chip on a PCI card. 
> >>
> >>This
> >>
> >>>chip is connected to a BT878 chip which connects
> >>
> >>to
> >>
> >>>the computer with a PCI bus.  I would like to
> >>
> >>control
> >>
> >>>the Philips chip using I2C bus(BT878 is master and
> >>>Philips is slave).  My question is how can I do it
> >>
> >>in
> >>
> >>>Linux (RedHat 9.0)?  Could anyone tell me where I
> >>>should start looking?  
> >>>
> >>>I guess I need to control the Philips thru the
> >>
> >>BT878,
> >>
> >>>and I found there's a call "extern int
> >>
> >>bttv_I2CWrite"
> >>
> >>>under bttv.h.  Can I just include this bttv.h and
> >>
> >>call
> >>
> >>>this in my application program?
> >>>
> >>>Thank you.
> >>>                                                  
> >>
> >>   
> >>
> >>>                         
> >>>hobobcat
> >>>
> >>>
> >>>
> >>
> > _________________________________________________________
> > 
> >>>最新鈴聲推介:十面埋伏,多謝失戀,心淡...
> >>>http://ringtone.yahoo.com.hk
> >>>
> >>>
> >>>--
> >>>video4linux-list mailing list
> >>>Unsubscribe
> >>
> > mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
> > 
> > https://www.redhat.com/mailman/listinfo/video4linux-list
> > 
> >>
> >>--
> >>video4linux-list mailing list
> >>Unsubscribe
> >>
> > 
> > mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
> > 
> > https://www.redhat.com/mailman/listinfo/video4linux-list 
> > 
> > _________________________________________________________
> > 最新鈴聲推介:十面埋伏,多謝失戀,心淡...
> > http://ringtone.yahoo.com.hk
> > 
> > 
> > --
> > video4linux-list mailing list
> > Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
> > https://www.redhat.com/mailman/listinfo/video4linux-list
> > 
> 
> 
> 




[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux