How To Use GPIO to Simulate I2C-Bus

Contents
[hide]
Contents
[hide]

1.Add  kmod-i2c-gpio-custom 

# make menuconfig

Kernel modules  —>  

      I2C support  —> 

              <*> kmod-i2c-gpio-custom. 

2.Rebuild the firmware.

# make V=s J=8

3.Flash new firmware then insmod module

root@OpenWrt:/# insmod i2c-dev

[   76.360000] i2c /dev entries driver

root@OpenWrt:/# insmod i2c-gpio-custom bus0=0,8,7

[  156.730000] Custom GPIO-based I2C driver version 0.1.1

[  156.750000] i2c-gpio i2c-gpio.0: using pins 8 (SDA) and 7 (SCL)

Comments

So empty here ... leave a comment!

Leave a Reply

Your email address will not be published. Required fields are marked *

Sidebar