From: Mariusz Bialonczyk Date: Sat, 16 Mar 2019 10:57:22 +0000 (+0100) Subject: onewire_network: add a 'Disable Test Mode' command for DS2408 X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=c29da3bb1a296ef4ad5a966644681fa908b507ad;hp=b53a9138efdcdca3d15846bb19eba1bab0407b7d;p=libsigrokdecode.git onewire_network: add a 'Disable Test Mode' command for DS2408 For details see the DS2408 datasheet, section "Power-up timing". This commit is adding this missing command so now a full decoding is possible: Annotations from 1-Wire network layer: 8990980-8991220 1-Wire network layer: : Reset/presence: true 8994163-8994437 1-Wire network layer: : ROM command: 0x96 'DS2408: Disable Test Mode' 8995026-9008178 1-Wire network layer: : ROM: 0xa30000001246a929 9008785-9009060 1-Wire network layer: : Data: 0x3c 9012290-9012530 1-Wire network layer: : Reset/presence: true And from the specific stacked DS2408 slave: 8990980-8991220 DS2408: : Reset/presence: true 8995026-9008178 DS2408: : ROM: 0xa30000001246a929 (family code 0x29) 9008785-9009060 DS2408: : Disable Test Mode (0x3c) 9012290-9012530 DS2408: : Reset/presence: true --- diff --git a/decoders/onewire_network/pd.py b/decoders/onewire_network/pd.py index c31d5f9..ef302ae 100644 --- a/decoders/onewire_network/pd.py +++ b/decoders/onewire_network/pd.py @@ -21,15 +21,16 @@ import sigrokdecode as srd # Dictionary of ROM commands and their names, next state. command = { - 0x33: ['Read ROM' , 'GET ROM' ], - 0x0f: ['Conditional read ROM' , 'GET ROM' ], - 0xcc: ['Skip ROM' , 'TRANSPORT' ], - 0x55: ['Match ROM' , 'GET ROM' ], - 0xf0: ['Search ROM' , 'SEARCH ROM'], - 0xec: ['Conditional search ROM', 'SEARCH ROM'], - 0x3c: ['Overdrive skip ROM' , 'TRANSPORT' ], - 0x69: ['Overdrive match ROM' , 'GET ROM' ], - 0xa5: ['Resume' , 'TRANSPORT' ], + 0x33: ['Read ROM' , 'GET ROM' ], + 0x0f: ['Conditional read ROM' , 'GET ROM' ], + 0xcc: ['Skip ROM' , 'TRANSPORT' ], + 0x55: ['Match ROM' , 'GET ROM' ], + 0xf0: ['Search ROM' , 'SEARCH ROM'], + 0xec: ['Conditional search ROM' , 'SEARCH ROM'], + 0x3c: ['Overdrive skip ROM' , 'TRANSPORT' ], + 0x69: ['Overdrive match ROM' , 'GET ROM' ], + 0xa5: ['Resume' , 'TRANSPORT' ], + 0x96: ['DS2408: Disable Test Mode' , 'GET ROM' ], } class Decoder(srd.Decoder):