diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2014-02-19 18:58:09 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2014-02-23 18:58:16 +0100 |
commit | ae33d639670cd4ca6bfe683c4284dd55377e5f21 (patch) | |
tree | b36de1c7b0061379739b1e43cc50ee30a112ac92 /decoders/rtc8564 | |
parent | e85b0440b9b50b8eac7f1b04d0108cbb77bcdb02 (diff) | |
download | libsigrokdecode-ae33d639670cd4ca6bfe683c4284dd55377e5f21.tar.gz libsigrokdecode-ae33d639670cd4ca6bfe683c4284dd55377e5f21.zip |
rtc8564: Use list comprehensions.
Diffstat (limited to 'decoders/rtc8564')
-rw-r--r-- | decoders/rtc8564/pd.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/decoders/rtc8564/pd.py b/decoders/rtc8564/pd.py index ce6ef75..8a2fbf9 100644 --- a/decoders/rtc8564/pd.py +++ b/decoders/rtc8564/pd.py @@ -40,16 +40,8 @@ class Decoder(srd.Decoder): {'id': 'int', 'name': 'INT#', 'desc': 'Interrupt'}, ] options = {} - annotations = [ - ['reg-0x00', 'Register 0x00'], - ['reg-0x01', 'Register 0x01'], - ['reg-0x02', 'Register 0x02'], - ['reg-0x03', 'Register 0x03'], - ['reg-0x04', 'Register 0x04'], - ['reg-0x05', 'Register 0x05'], - ['reg-0x06', 'Register 0x06'], - ['reg-0x07', 'Register 0x07'], - ['reg-0x08', 'Register 0x08'], + annotations = \ + [['reg-0x%02x' % i, 'Register 0x%02x' % i] for i in range(8 + 1)] + [ ['read', 'Read date/time'], ['write', 'Write date/time'], ['bit-reserved', 'Reserved bit'], |