This program is I2C read/write program under 8120.
Usage:
read command: [iaccess 1 address arg1 ]
arg1: data bytes number
write command: [iaccess 0 address arg1 arg2 arg3 ... ]
arg1: data bytes number
arg2 arg3 ...: data value
Example:
Write 8120 Standard EVB serial EEPROM (I2C read address 0xa9, write 0xa8)
#./iaccess 0 0xa8 2 0x5 0x36
Means write 2 bytes to I2C bus, according to EEPROM support,
0x5 is offset, 0x36 is writing data.
And read back the offset 0x5 to verify:
#./iaccess 0 0xa8 1 0x05
#./iaccess 1 0xa9 1
Means write 1 bytes to EEPROM I2C bus to notify the offset is 0x5.
Then read back using "iaccess 1".
评论0