summaryrefslogtreecommitdiff
path: root/decoders/onewire_network
diff options
context:
space:
mode:
authorIztok Jeras <iztok.jeras@gmail.com>2012-07-17 21:42:53 +0200
committerIztok Jeras <iztok.jeras@gmail.com>2012-07-17 21:42:53 +0200
commit758d2ea98ad32adca6d1b76b982ec101ad363ac7 (patch)
treea572bb585d50c3ca2fb76086a99288e1270f17ee /decoders/onewire_network
parent4633e258a4885a455a82c32548f7bb4d4b293e2e (diff)
downloadlibsigrokdecode-758d2ea98ad32adca6d1b76b982ec101ad363ac7.tar.gz
libsigrokdecode-758d2ea98ad32adca6d1b76b982ec101ad363ac7.zip
onewire: added new transport layer commands
Diffstat (limited to 'decoders/onewire_network')
-rw-r--r--decoders/onewire_network/__init__.py2
-rw-r--r--decoders/onewire_network/onewire_network.py18
2 files changed, 11 insertions, 9 deletions
diff --git a/decoders/onewire_network/__init__.py b/decoders/onewire_network/__init__.py
index 56a5eb5..9b6e510 100644
--- a/decoders/onewire_network/__init__.py
+++ b/decoders/onewire_network/__init__.py
@@ -26,7 +26,7 @@ ground) between a single master and one or multiple slaves. The protocol is
layered.
- Link layer (reset, presence detection, reading/writing bits)
- Network layer (skip/search/match device ROM addresses)
-- Transport layer (transfer data between 1-Wire master and device)
+- Transport layer (transport data between 1-Wire master and device)
Network layer
diff --git a/decoders/onewire_network/onewire_network.py b/decoders/onewire_network/onewire_network.py
index 18e9525..9e641fd 100644
--- a/decoders/onewire_network/onewire_network.py
+++ b/decoders/onewire_network/onewire_network.py
@@ -23,14 +23,16 @@
import sigrokdecode as srd
# a dictionary of ROM commands and their names, next state
-command = {0x33: ["READ ROM" , "GET ROM" ],
- 0x0f: ["CONDITIONAL READ ROM" , "GET ROM" ],
- 0xcc: ["SKIP ROM" , "TRANSPORT" ],
- 0x55: ["MATCH ROM" , "GET ROM" ],
- 0xf0: ["SEARCH ROM" , "SEARCH ROM"],
- 0xec: ["CONDITIONAL SEARCH ROM", "SEARCH ROM"],
- 0x3c: ["OVERDRIVE SKIP ROM" , "TRANSPORT" ],
- 0x6d: ["OVERDRIVE MATCH ROM" , "GET ROM" ]}
+command = {
+ 0x33: ["READ ROM" , "GET ROM" ],
+ 0x0f: ["CONDITIONAL READ ROM" , "GET ROM" ],
+ 0xcc: ["SKIP ROM" , "TRANSPORT" ],
+ 0x55: ["MATCH ROM" , "GET ROM" ],
+ 0xf0: ["SEARCH ROM" , "SEARCH ROM"],
+ 0xec: ["CONDITIONAL SEARCH ROM", "SEARCH ROM"],
+ 0x3c: ["OVERDRIVE SKIP ROM" , "TRANSPORT" ],
+ 0x6d: ["OVERDRIVE MATCH ROM" , "GET ROM" ]
+}
class Decoder(srd.Decoder):
api_version = 1