openwrt 模拟i2c驱动(一)

一:加载i2c driver

kmod-i2c-core................................................ I2C support

kmod-i2c-algo-bit............................. I2C bit-banging interfaces

kmod-i2c-algo-pca................................ I2C PCA 9564 interfaces                

kmod-i2c-algo-pcf................................ I2C PCF 8584 interfaces                

kmod-i2c-gpio.................................. GPIO-based bitbanging I2C  //这个就是模拟i2c platform  device

 

 

二:加载i2c device

kmod-i2c-gpio-custom........................ Custom GPIO-based I2C device  //这个就是 i2c platform  driver

 

三:编译固件烧写到板子

 

image

 

 

四:ismod gpio口

insmod i2c-gpio-custom bus0=0,1,2

这样以后发会发现 i2c-0设备:

image

 

五:使用i2ctools测试 i2c驱动

 

 

 

 

 

 

 

posted @ 2015-04-07 20:26  夕相待  阅读(2964)  评论(0编辑  收藏  举报