Skip to content

Instantly share code, notes, and snippets.

@cliff75426
Forked from tranthamp/u-boot - i2c
Created January 8, 2021 06:34
Show Gist options
  • Save cliff75426/6543bd3da849b17b1629ee0b35ec4e75 to your computer and use it in GitHub Desktop.
Save cliff75426/6543bd3da849b17b1629ee0b35ec4e75 to your computer and use it in GitHub Desktop.
# Select the i2c bus
i2c dev <bus>
i2c dev 0
# Probe the device
i2c probe <chip>
i2c probe 0x60
# Read from the device
i2c read <chip> <chip address> <length> <memory address>
i2c read 0x60 0x27 1 0x80200000
# Read and Display from the device
i2c md <chip> <chip address> <length>
i2c md 0x60 0x27 1
# Write to the device
i2c mw <chip> <chip address> <value> <length>
i2c mw 0x60 0x30 0x20 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment