diff options
author | Iztok Jeras <iztok.jeras@gmail.com> | 2012-07-17 21:42:53 +0200 |
---|---|---|
committer | Iztok Jeras <iztok.jeras@gmail.com> | 2012-07-17 21:42:53 +0200 |
commit | 758d2ea98ad32adca6d1b76b982ec101ad363ac7 (patch) | |
tree | a572bb585d50c3ca2fb76086a99288e1270f17ee /decoders/onewire_transport | |
parent | 4633e258a4885a455a82c32548f7bb4d4b293e2e (diff) | |
download | libsigrokdecode-758d2ea98ad32adca6d1b76b982ec101ad363ac7.tar.gz libsigrokdecode-758d2ea98ad32adca6d1b76b982ec101ad363ac7.zip |
onewire: added new transport layer commands
Diffstat (limited to 'decoders/onewire_transport')
-rw-r--r-- | decoders/onewire_transport/__init__.py | 2 | ||||
-rw-r--r-- | decoders/onewire_transport/onewire_transport.py | 22 |
2 files changed, 21 insertions, 3 deletions
diff --git a/decoders/onewire_transport/__init__.py b/decoders/onewire_transport/__init__.py index 3b9577e..df4db00 100644 --- a/decoders/onewire_transport/__init__.py +++ b/decoders/onewire_transport/__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) Transport layer diff --git a/decoders/onewire_transport/onewire_transport.py b/decoders/onewire_transport/onewire_transport.py index 67f5193..5481bd7 100644 --- a/decoders/onewire_transport/onewire_transport.py +++ b/decoders/onewire_transport/onewire_transport.py @@ -23,8 +23,26 @@ import sigrokdecode as srd # a dictionary of FUNCTION commands and their names -command = {0x44: "TEMPERATURE CONVERSION", - 0xbe: "READ SCRATCHPAD"} +command = { + # scratchpad + 0x4e: "WRITE SCRATCHPAD", + 0xbe: "READ SCRATCHPAD", + 0x48: "COPY SCRATCHPAD", + # thermometer + 0x44: "CONVERT TEMPERATURE", + 0xb4: "READ POWER MODE", + 0xb8: "RECALL EEPROM", + 0xf5: "PIO ACCESS READ", + 0xA5: "PIO ACCESS WRITE", + 0x99: "CHAIN", + # memory + 0xf0: "READ MEMORY", + 0xa5: "EXTENDED READ MEMORY", + 0x0f: "WRITE MEMORY", + 0x55: "WRITE STATUS", + 0xaa: "READ STATUS", + 0xf5: "CHANNEL ACCESS" +} class Decoder(srd.Decoder): api_version = 1 |