I2C Slave

41 views
Skip to first unread message

Christopher Stack

unread,
Jul 20, 2015, 8:50:49 AM7/20/15
to libbu...@googlegroups.com
Glad to see the website is back up!

Is there a method to setup I2C as a slave or is that not yet supported? It doesn't appear to be a common feature, but it would be very helpful.

Datenheld

unread,
Jul 20, 2015, 9:11:30 AM7/20/15
to libbu...@googlegroups.com
Hi,

I do not think this is natively supported on Linux. The best one could do is probably a bit banged protocol (aka dirty Hack). It would probably only work for low I2C clockspeeds as well.

Christopher Stack

unread,
Jul 20, 2015, 9:21:02 AM7/20/15
to libbu...@googlegroups.com
Drivers and the linux kernel are at the edge of my understanding, but I believe it is supported now: https://www.kernel.org/doc/Documentation/i2c/slave-interface. Not sure which kernel it became available in, but I believe this is the example that goes along with the documentation: http://lxr.free-electrons.com/source/drivers/i2c/i2c-slave-eeprom.c

Obviously that's the C example, to get it working in Java I would have to change the device overlay and then there would need to be JNI code that worked with that interface is that right?


The other option I'm looking into is using a I2C slave to UART chip.
Reply all
Reply to author
Forward
0 new messages