Difference between revisions of "Beaglebone black i2c"
From Teknologisk videncenter
m (→I2C Low level) |
m (→I2C Low level) |
||
Line 20: | Line 20: | ||
*"Number" - A n i2c device was found | *"Number" - A n i2c device was found | ||
=I2C Low level= | =I2C Low level= | ||
− | See: '''/usr/include/linux/i2c.h''' for ''' i2c_msg''' structure and flags | + | See: '''/usr/include/linux/i2c.h''' for ''' i2c_msg''' structure and flags and '''i2c_rdwr_ioctl_data''' |
=I2C device drivers= | =I2C device drivers= |
Revision as of 11:37, 11 November 2023
Detect i2c devices
Use with a little care - read the i2cdetect man page
root@beaglebone:/home/debian/bin# i2cdetect -y -r 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
- --" Means no answer on probe
- "UU" Means probing was skipped, because a device driver uses the address
- "Number" - A n i2c device was found
I2C Low level
See: /usr/include/linux/i2c.h for i2c_msg structure and flags and i2c_rdwr_ioctl_data
I2C device drivers
- Implementing I2C device drivers in userspace (From kernel.org)
- i2c dev-interface (Must read i2c or SM-bus)
- Implementing I2C device drivers