]>
Commit | Line | Data |
---|---|---|
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 | ''' | |
6188e4e4 | 22 | 1-Wire protocol decoder (network layer). |
51990c45 | 23 | |
6188e4e4 UH |
24 | The 1-Wire protocol enables bidirectional communication over a single wire |
25 | (and ground) between a single master and one or multiple slaves. The protocol | |
26 | is 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 | ||
32 | Network layer: | |
33 | ||
34 | Protocol output format: | |
35 | TODO. | |
a2b13347 IJ |
36 | |
37 | Annotations: | |
6188e4e4 UH |
38 | |
39 | The following link layer annotations are shown: | |
40 | ||
41 | - RESET/PRESENCE True/False | |
42 | The event is marked from the signal negative edge to the end of the reset | |
43 | high period. It is also reported if there are any devices attached to the | |
44 | bus. | |
45 | ||
46 | The following network layer annotations are shown: | |
47 | ||
48 | - ROM command <val> <name> | |
49 | The requested ROM command is displayed as an 8bit hex value and by name. | |
50 | - ROM <val> | |
51 | The 64bit value of the addressed device is displayed: | |
52 | Family code (1 byte) + serial number (6 bytes) + CRC (1 byte) | |
53 | - Data <val> | |
54 | Data intended for the transport layer is displayed as an 8bit hex value. | |
a2b13347 | 55 | |
c08aea7e | 56 | TODO: |
6188e4e4 UH |
57 | - Add CRC checks, to see if there were communication errors on the wire. |
58 | - Add reporting original/complement address values from the search algorithm. | |
51990c45 IJ |
59 | ''' |
60 | ||
24c74fd3 | 61 | from .pd import * |
6188e4e4 | 62 |