Skip to content

Instantly share code, notes, and snippets.

@MaxPayne86
Forked from tranthamp/u-boot - i2c
Last active March 11, 2021 10:13
Show Gist options
  • Select an option

  • Save MaxPayne86/eb43d4425d6b2cedacd66f7bdda60998 to your computer and use it in GitHub Desktop.

Select an option

Save MaxPayne86/eb43d4425d6b2cedacd66f7bdda60998 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