1 Reply Latest reply on Dec 20, 2015 3:21 PM by allene

    mraa_i2c_address above 0x7F returns MRAA_ERROR_INVALID_HANDLE


      Here is my code

      int rtv;
      int rav;

          rtv = mraa_init();



              printf( "ER MRAA Init Failed,Return Value is %d\n",rtv);

              return -1;


          i2c = mraa_i2c_init(0);

      rav = mraa_i2c_address(i2c, ADDR);
      printf("** return value is  %d\n",rav);


      With no i2c devices connected all values of ADDR 0x7F and below return 0 and all values of ADDR above 0x80 return 5,


      My problem is that I have two i2c devices on the buss.  One is address 0x5C and the other 0X9A. The device with address 0x5C is working fine but I just get error returns for the one with address 0x9A.


      I tried it with chips installed and without chips installed.  It makes no difference.  I get error 5 with high order addresss and 0 with addresses below 0x7F and below.


      My choices of addresses are 0x9n and 0xAn.  There are lots of choices of n but only 9 or A for the first nibble.


      I also tried defining a variable of type uint8_t and using that instead of the 0x9A but no difference