]> sigrok.org Git - libsigrokdecode.git/blame - decoders/onewire_transport/__init__.py
onewire: updated documentation
[libsigrokdecode.git] / decoders / onewire_transport / __init__.py
CommitLineData
a81787f6
IJ
1##
2## This file is part of the sigrok project.
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'''
221-Wire protocol decoder.
23
24The 1-Wire protocol enables bidirectional communication over a single wire (and
25ground) between a single master and one or multiple slaves. The protocol is
4633e258 26layered.
a81787f6 27- Link layer (reset, presence detection, reading/writing bits)
4633e258
IJ
28- Network layer (skip/search/match device ROM addresses)
29- Transport layer (transfer data between 1-Wire master and device)
a81787f6 30
4633e258 31Transport layer
a81787f6 32
4633e258
IJ
33The transport layer is the largest and most complex part of the protocol, since
34it is very device specific. The decoder is parsing only a small part of the
35protocol.
a81787f6
IJ
36
37Annotations:
4633e258
IJ
38The next link layer annotations are shown:
39- RESET/PRESENCE True/False
40 The event is marked from the signal negative edge to the end of the reset
41 high period. It is also reported if there are any devices attached to the
42 bus.
43The next network layer annotations are shown:
44- ROM val
45 The 64bit value of the addressed device is displayed:
46 family code (1B) + serial number (6B) + CRC (1B)
47- FUNCTION COMMAND val name
48 The requested FUNCTION command is displayed as an 8bit HEX value and by name.
49- DATA val
50 Data intended for the transport layer is displayed as an 8bit HEX value.
a81787f6
IJ
51
52TODO:
4633e258 53- add CRC checks for transport layer
a81787f6
IJ
54'''
55
56from .onewire_transport import *