Skip to content

Commit

Permalink
Complete regression tests for pn53x Chipset commands
Browse files Browse the repository at this point in the history
  • Loading branch information
nehpetsde committed Mar 20, 2017
1 parent 43b02ff commit 795134e
Show file tree
Hide file tree
Showing 5 changed files with 430 additions and 121 deletions.
12 changes: 0 additions & 12 deletions src/nfc/clf/pn532.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,18 +168,6 @@ def power_down(self, wakeup_enable, generate_irq=False):
if data[0] != 0:
self.chipset_error(data)

def in_auto_poll(self, poll_nr, period, *types):
assert len(types) <= 15
timeout = poll_nr * len(types) * period * 0.15 + 0.1
data = chr(poll_nr) + chr(period) + bytearray(types)
data = self.command(0x60, data, timeout=timeout)
targets = []
for i in data.pop(0):
tg_type = data.pop(0)
tg_data = data[:data.pop(0)]
targets.append((tg_type, tg_data))
return targets

def tg_init_as_target(self, mode, mifare_params, felica_params, nfcid3t,
general_bytes='', historical_bytes='', timeout=None):
assert type(mode) is int and mode & 0b11111000 == 0
Expand Down

0 comments on commit 795134e

Please sign in to comment.