Change OV5640 Register Using I2C

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Change OV5640 Register Using I2C

1,863 Views
giritharanr
Contributor I

Hi ,

       I am new to this,please help me to solve my issue,

I want to change some  register values of ov5640.c driver file  from user space c API.

I tried this link( https://www.kernel.org/doc/Documentation/i2c/dev-interface ) .But in this c program i can't change my register value..Here i attach my i2c code.please kindly gothrough it.

 

Thanks in Advance!.

 

 

 

 

 

With REGARDS,

R.Giritharan

Original Attachment has been moved to: i2c_ov5640.c.zip

Labels (2)
Tags (3)
0 Kudos
Reply
3 Replies

1,365 Views
jimmychan
NXP TechSupport
NXP TechSupport

One suggestion:

You can read the ioctl part in driver source code ov5640.c. You can modify/add one ioctl function and then call that ioctl for changing the register value in user space.

0 Kudos
Reply

1,364 Views
giritharanr
Contributor I

Hi igor,

     Thanks for your reply.

i saw the source code which you attach.

my doubt is , for example i want to change the register 0x5000 value from 0x06 to 0xff from user space...so as per my attached code if i give the reg value of 0x5000 means it won't taken.i don't know why?

so register is not written properly.

please find any solution to over write the register values at run time.

Thanks in advance!

With Regards,

R.Giritharan

0 Kudos
Reply

1,365 Views
igorpadykov
NXP Employee
NXP Employee

Hi Giritharan

I think it is necessary to use platform specific i2c api as used

for example in unit tests (refer to attached part of it,

I2C Test With mt9v111 camera mxc_i2c_test.c), sources

can be found

http://downloads.yoctoproject.org/mirror/sources/imx-test-5.2.tar.gz

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply