Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Write and read a device register

Help
Jonoe
2009-04-03
2013-03-12
  • Jonoe
    Jonoe
    2009-04-03

    Hello,

    I am doing an application which read and write an accelerometer register. Application should write the value 0x05 in register $16.

    I wrote a function called write_register(int a, int b), so I wrote write_register(0x16,0x05). Is it correct? Should I declared them as characters?

    Thanks for your help

     
    • aozima
      aozima
      2009-04-04

      Can you write down the function write_register(int a, int b)??

      Because is int a,int b. So write_register(0x16,0x05) ==> write_register(0x0016,0x0005)
      Not as characters!