]> sigrok.org Git - libsigrokdecode.git/blame - decoders/onewire_network/__init__.py
avr_isp: Add more parts
[libsigrokdecode.git] / decoders / onewire_network / __init__.py
CommitLineData
51990c45 1##
50bd5d25 2## This file is part of the libsigrokdecode project.
51990c45
IJ
3##
4## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
5##
6## This program is free software; you can redistribute it and/or modify
7## it under the terms of the GNU General Public License as published by
8## the Free Software Foundation; either version 2 of the License, or
9## (at your option) any later version.
10##
11## This program is distributed in the hope that it will be useful,
12## but WITHOUT ANY WARRANTY; without even the implied warranty of
13## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14## GNU General Public License for more details.
15##
16## You should have received a copy of the GNU General Public License
4539e9ca 17## along with this program; if not, see <http://www.gnu.org/licenses/>.
51990c45
IJ
18##
19
20'''
4c3b1846
UH
21This decoder stacks on top of the 'onewire_link' PD and decodes the
221-Wire protocol (network layer).
51990c45 23
6188e4e4
UH
24The 1-Wire protocol enables bidirectional communication over a single wire
25(and ground) between a single master and one or multiple slaves. The protocol
26is layered:
a2b13347 27
6188e4e4
UH
28 - Link layer (reset, presence detection, reading/writing bits)
29 - Network layer (skip/search/match device ROM addresses)
30 - Transport layer (transport data between 1-Wire master and device)
31
32Network layer:
33
6188e4e4
UH
34The following link layer annotations are shown:
35
36 - RESET/PRESENCE True/False
37 The event is marked from the signal negative edge to the end of the reset
38 high period. It is also reported if there are any devices attached to the
39 bus.
40
41The following network layer annotations are shown:
42
43 - ROM command <val> <name>
44 The requested ROM command is displayed as an 8bit hex value and by name.
45 - ROM <val>
46 The 64bit value of the addressed device is displayed:
47 Family code (1 byte) + serial number (6 bytes) + CRC (1 byte)
48 - Data <val>
49 Data intended for the transport layer is displayed as an 8bit hex value.
a2b13347 50
c08aea7e 51TODO:
6188e4e4
UH
52 - Add CRC checks, to see if there were communication errors on the wire.
53 - Add reporting original/complement address values from the search algorithm.
51990c45
IJ
54'''
55
95d11271 56from .pd import Decoder