PiyushPatle26 commented on PR #19005:
URL: https://github.com/apache/nuttx/pull/19005#issuecomment-5064666695

   Now actual communication also works 
   ```
   nsh> i2c bus
    BUS   EXISTS?
   Bus 0: YES
   Bus 1: NO
   Bus 2: YES
   Bus 3: NO
   nsh> i2c dev -b 0 0x03 0x77
   NOTE: Some devices may not appear with this scan.
   You may also try a scan with the -z flag to discover more devices using a 
zero-byte write request.
        0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
   00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
   10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   70: -- -- -- -- -- -- -- --                         
   nsh> i2c get -a 0x20 -r 3
   READ Bus: 0 Addr: 20 Subaddr: 03 Value: 00
   nsh> i2c get -r 0
   READ Bus: 0 Addr: 20 Subaddr: 00 Value: 00
   nsh> i2c get -a 0x50 -r 0
   READ Bus: 0 Addr: 50 Subaddr: 00 Value: ff
   nsh> i2c dump -r 0 32
   DUMP Bus: 0 Addr: 50 Subaddr: 00
   00000000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  
|................|
   00000010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  
|................|
   nsh> i2c get -a 0x21 -r 0
   i2ctool: get: Transfer failed: 1
   nsh> i2c get -a 0x20 -r 0
   READ Bus: 0 Addr: 20 Subaddr: 00 Value: 00
   nsh> i2c get -s -r 3
   READ Bus: 0 Addr: 20 Subaddr: 03 Value: 00
   nsh> i2c get -n -r 3
   READ Bus: 0 Addr: 20 Subaddr: 03 Value: 00
   ```
   address 21 fails which is correct as there is no device


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to