From 86aac5f0a866f7a5bf5280ea44a291549554d661 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Wed, 4 Jul 2012 19:52:29 +0200 Subject: [PATCH] srd: lm75: Warn about temperature reg. being read-only. --- decoders/lm75/lm75.py | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.30.2