diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2012-07-04 19:52:29 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2012-07-06 01:30:03 +0200 |
commit | 86aac5f0a866f7a5bf5280ea44a291549554d661 (patch) | |
tree | 123a193b1f8087e74a9ebef5f262e31cba8315e4 /decoders | |
parent | 5b30440e7eea86e4d7e5ebc40aa738faf4899970 (diff) | |
download | libsigrokdecode-86aac5f0a866f7a5bf5280ea44a291549554d661.tar.gz libsigrokdecode-86aac5f0a866f7a5bf5280ea44a291549554d661.zip |
srd: lm75: Warn about temperature reg. being read-only.
Diffstat (limited to 'decoders')
-rw-r--r-- | decoders/lm75/lm75.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/decoders/lm75/lm75.py b/decoders/lm75/lm75.py index ef3191b..338086a 100644 --- a/decoders/lm75/lm75.py +++ b/decoders/lm75/lm75.py @@ -109,6 +109,11 @@ class Decoder(srd.Decoder): self.putb([0, ['%s: %.1f °C' % (s, celsius)]]) self.putb([1, ['%s: %.1f °K' % (s, kelvin)]]) + # Warn about the temperature register (0x00) being read-only. + if s == 'Temperature' and rw == 'WRITE': + s = 'Warning: The temperature register is read-only!' + self.putb([4, [s]]) + # Keep some statistics. Can be output in report(), for example. if celsius < self.mintemp: self.mintemp = celsius |