diff options
author | Daniel Friesel <derf@finalrewind.org> | 2013-10-05 00:07:17 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2013-10-05 00:07:17 +0200 |
commit | ec3a3c5f18c0c088c760b7228c39e19e37e1896f (patch) | |
tree | 81abbabb4d8d143bbd4dc0cda6a50a28f0f177c2 | |
parent | d718ad97c623e618892123c2dc2e0dd26cccef24 (diff) |
overdrive support
-rwxr-xr-x | commandline/examples/ds2482-100-readrom | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/commandline/examples/ds2482-100-readrom b/commandline/examples/ds2482-100-readrom index ed3c2aa..ae4b7bd 100755 --- a/commandline/examples/ds2482-100-readrom +++ b/commandline/examples/ds2482-100-readrom @@ -1,8 +1,14 @@ #!/bin/sh # DS2482-100 Single Channel 1-Wire Master + +CONFIG=0xf0 +if [ "${1}" = overdrive ]; then + CONFIG=0x78 +fi + vusb-i2cset 0x18 0xf0 || echo "Failed to reset chip" -vusb-i2cset 0x18 0xd2 0xf0 || echo "Failed to set config" +vusb-i2cset 0x18 0xd2 $CONFIG || echo "Failed to set config" vusb-i2cset 0x18 0xb4 || echo "Failed to initiate presence detection (OWR)" ret=$(( $(vusb-i2cget 0x18 0xe1 0xf0) & 0x02 )) @@ -13,6 +19,7 @@ if [ "${ret}" = 0 ]; then fi vusb-i2cset 0x18 0xa5 0x33 || echo "failed to issue READ ROM" + vusb-i2cset 0x18 0x96 || echo "failed to initiate read" b8=$(vusb-i2cget 0x18 0xe1 0xe1) vusb-i2cset 0x18 0x96 || echo "failed to initiate read" |