rockbox/utils/hwstub/tools/lua/i2c_scan.lua
Amaury Pouly 9ed9807854 hwstub: rework i2c completely
Change-Id: I1e5f87f15f0ca9586d8185316ffcaeef6d9d4d38
2013-10-22 00:34:44 +02:00

11 lines
No EOL
233 B
Lua

I2CSCAN = {}
function I2CSCAN.scan()
STMP.i2c.init()
STMP.i2c.set_speed(true)
for i = 2, 254, 2 do
if STMP.i2c.transmit(i, {}, true) then
print(string.format("%#x OK", i))
end
end
end