2009-10-29 11:24:54     i2c read access query

Document created by Aaronwu Employee on Aug 19, 2013
Version 1Show Document
  • View in full screen mode

2009-10-29 11:24:54     i2c read access query

Appalayagari Sreedhar (INDIA)

Message: 81872   

 

Hi,

I am working with uClinux distribution 2009 R1-RC1. BF527 Rev 0.2 custom board.

 

One of the components on our custom board is AD7999. It is TWI with BF527.

 

The read format of the AD7999 is as below.

 

S  Addr Rd  SlaveAck  DataMSB  MasterAck  DataLSB  P

 

You can download/view the datasheet from the below link.

  www.alldatasheet.com/datasheet-pdf/pdf/166937/AD/AD7999YRJZ-1.html

 

 

I could not find the readily available apis for the direct usage for i2c communication with this slave device. i searched the documentation for i2c.

 

Could you please send me the details if there is any API is available for this read format.

 

Thank you.

QuoteReplyEditDelete

 

 

2009-10-29 11:31:27     Re: i2c read access query

Mike Frysinger (UNITED STATES)

Message: 81873   

 

looks like a normal i2c transaction to me like the i2c documentation explains pretty clearly

 

linux-2.6.x/Documentation/i2c/i2c-protocol

QuoteReplyEditDelete

 

 

2009-10-29 11:41:38     Re: i2c read access query

Appalayagari Sreedhar (INDIA)

Message: 81875   

 

Dear Mike,

 

Thank you for the quick response.

 

Can we make use of the i2c_master_recv  function from the application space? is there any equivalent api for this from the user space usage by creating the device node.

 

Thank you.

QuoteReplyEditDelete

 

 

2009-10-29 12:06:24     Re: i2c read access query

Mike Frysinger (UNITED STATES)

Message: 81876   

 

i get the feeling you havent read the documentation at all or looked at the device driver in question.  a three second glance at i2c-dev.c would have told you that the char read/write operations connect directly to the i2c master recv/send functions.

QuoteReplyEditDelete

 

 

2009-10-29 12:06:41     Re: i2c read access query

Michael Hennerich (GERMANY)

Message: 81877    >

 

Take a look at:

uclinux-dist-trunk/user/blkfin-test/ppifcd-test/i2c.c

 

-Michael

QuoteReplyEditDelete

 

 

2009-10-29 12:11:39     Re: i2c read access query

Appalayagari Sreedhar (INDIA)

Message: 81878   

 

Thankyou Mike and Micheal

 

I will try this and let you know.

Attachments

    Outcomes