]> sigrok.org Git - libsigrokdecode.git/blame - decoders/onewire_network/__init__.py
rfm12: Avoid using the Python 'range' keyword as variable.
[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
17## along with this program; if not, write to the Free Software
18## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19##
20
21'''
4c3b1846
UH
22This decoder stacks on top of the 'onewire_link' PD and decodes the
231-Wire protocol (network layer).
51990c45 24
6188e4e4
UH
25The 1-Wire protocol enables bidirectional communication over a single wire
26(and ground) between a single master and one or multiple slaves. The protocol
27is layered:
a2b13347 28
6188e4e4
UH
29 - Link layer (reset, presence detection, reading/writing bits)
30 - Network layer (skip/search/match device ROM addresses)
31 - Transport layer (transport data between 1-Wire master and device)
32
33Network layer:
34
6188e4e4
UH
35The following link layer annotations are shown:
36
37 - RESET/PRESENCE True/False
38 The event is marked from the signal negative edge to the end of the reset
39 high period. It is also reported if there are any devices attached to the
40 bus.
41
42The following network layer annotations are shown:
43
44 - ROM command <val> <name>
45 The requested ROM command is displayed as an 8bit hex value and by name.
46 - ROM <val>
47 The 64bit value of the addressed device is displayed:
48 Family code (1 byte) + serial number (6 bytes) + CRC (1 byte)
49 - Data <val>
50 Data intended for the transport layer is displayed as an 8bit hex value.
a2b13347 51
c08aea7e 52TODO:
6188e4e4
UH
53 - Add CRC checks, to see if there were communication errors on the wire.
54 - Add reporting original/complement address values from the search algorithm.
51990c45
IJ
55'''
56
24c74fd3 57from .pd import *