Thanks Justin. I've successfully got my program
running. I have one more question though. Does the
BT878 (i2c master) has an address? I found only one
i2c address after searching thru a loop using
i2c_smbus_read_byte(file). The reason I did it
becuase I could NOT find those write/read i2c slave
address for my Philips chip. So, I wasn't sure if I
was talking to the Philips chip or other device. Is
there anyway to check? Thanks again!!! :>
hobobcat.
--- Justin Schoeman <[EMAIL PROTECTED]>
���l�e�G> 1) Make sure the bttv driver is loaded.
> 2) Make sure the i2c-dev module is loaded / compiled
> into the kernel.
> 3) Make sure which bus to use (you can use the
> detection scripts from
> lm-sensors and/or the dmesg output after loading
> bttv module).
> 4) Verify which device to use - some distros only
> have /dev/i2c/0
>
> If all else fails, read the documentation at the
> lmsenors site...
>
> -justin
>
> ho ho wrote:
> > Dear Justin Schoeman and all:
> >
> > Thanks to Justin, I have some ideas of writing I2C
> for
> > my card. I've wrote a program just to open the
> i2c,
> > but the program didn't successfully go thru. The
> > following is my program:
> >
> > //
> > #include <fcntl.h>
> > #include <stdio.h>
> > #include <linux/i2c.h>
> > #include <linux/i2c-dev.h>
> >
>
> >
> > int main()
> > {
> > int file;
> > printf("Opening device...\n");
> > if ((file = open("/dev/i2c-0",O_RDWR)) < 0)
> > {
> > printf("\nError:%d\n", file);
> > perror("open() failed");
> > }
> > printf("Done\n");
> >
>
> >
> > close(file);
> > }
> > //
> > The error message is like:
> >
> > Opening device...
> >
> > Error:-1
> > open() failed: No such device
> > Done
> > //
> > I already "cat" the bus and it said:
> > i2c-0 i2c bt848 #0 Bit-shift
> > algorithm
> >
> > Does anyone know what I should do to fix it? My
> PCI
> > card is there, and a bt878 is on there. Thanks!!!
> >
> >
>
_________________________________________________________
> > �̷s�a�n����:�Q���I��A�h�¥��ʡA�߲H...
> > http://ringtone.yahoo.com.hk
> >
> >
> > --
> > video4linux-list mailing list
> > Unsubscribe
>
mailto:[EMAIL PROTECTED]
> >
>
https://www.redhat.com/mailman/listinfo/video4linux-list
> >
>
>
> --
> video4linux-list mailing list
> Unsubscribe
>
mailto:[EMAIL PROTECTED]
>
https://www.redhat.com/mailman/listinfo/video4linux-list
_________________________________________________________
�̷s�a�n����:�Q���I��A�h�¥��ʡA�߲H...
http://ringtone.yahoo.com.hk
--
video4linux-list mailing list
Unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/video4linux-list