Further question about I2C and BTTV

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



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!!!

_________________________________________________________
最新鈴聲推介:十面埋伏,多謝失戀,心淡...
http://ringtone.yahoo.com.hk




[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