]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/nrf24l01/pd.py
avr_isp: Add more parts
[libsigrokdecode.git] / decoders / nrf24l01 / pd.py
index ae1cb35adf416ce24e47be26c12384a6de0d8ae4..06755ff3495b75f7beb27ba6aa320a7b4abf9d39 100644 (file)
@@ -59,28 +59,29 @@ xn297_regs = {
 }
 
 class Decoder(srd.Decoder):
-    api_version = 2
+    api_version = 3
     id = 'nrf24l01'
     name = 'nRF24L01(+)'
-    longname = 'Nordic Semiconductor nRF24L01/nRF24L01+'
-    desc = '2.4GHz transceiver chip.'
+    longname = 'Nordic Semiconductor nRF24L01(+)'
+    desc = '2.4GHz RF transceiver chip.'
     license = 'gplv2+'
     inputs = ['spi']
-    outputs = ['nrf24l01']
+    outputs = []
+    tags = ['IC', 'Wireless/RF']
     options = (
         {'id': 'chip', 'desc': 'Chip type',
             'default': 'nrf24l01', 'values': ('nrf24l01', 'xn297')},
     )
     annotations = (
         # Sent from the host to the chip.
-        ('cmd', 'Commands sent to the device'),
-        ('tx-data', 'Payload sent to the device'),
+        ('cmd', 'Command'),
+        ('tx-data', 'Payload'),
 
         # Returned by the chip.
-        ('register', 'Registers read from the device'),
-        ('rx-data', 'Payload read from the device'),
+        ('register', 'Register read'),
+        ('rx-data', 'Payload read'),
 
-        ('warning', 'Warnings'),
+        ('warning', 'Warning'),
     )
     ann_cmd = 0
     ann_tx = 1
@@ -94,6 +95,9 @@ class Decoder(srd.Decoder):
     )
 
     def __init__(self):
+        self.reset()
+
+    def reset(self):
         self.next()
         self.requirements_met = True
         self.cs_was_released = False