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