]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/nrf24l01/pd.py
decoders: Add/update tags for each PD.
[libsigrokdecode.git] / decoders / nrf24l01 / pd.py
index d46eea45a80783af28a6688544610a6dfda9e9cd..3781155eb43d84c5d47dd81aa047cb82a5a6bcda 100644 (file)
@@ -14,8 +14,7 @@
 ## GNU General Public License for more details.
 ##
 ## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+## along with this program; if not, see <http://www.gnu.org/licenses/>.
 ##
 
 import sigrokdecode as srd
@@ -60,7 +59,7 @@ xn297_regs = {
 }
 
 class Decoder(srd.Decoder):
-    api_version = 2
+    api_version = 3
     id = 'nrf24l01'
     name = 'nRF24L01(+)'
     longname = 'Nordic Semiconductor nRF24L01/nRF24L01+'
@@ -68,6 +67,7 @@ class Decoder(srd.Decoder):
     license = 'gplv2+'
     inputs = ['spi']
     outputs = ['nrf24l01']
+    tags = ['IC', 'Wireless/RF']
     options = (
         {'id': 'chip', 'desc': 'Chip type',
             'default': 'nrf24l01', 'values': ('nrf24l01', 'xn297')},
@@ -95,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