mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
refactoring NG
This commit is contained in:
parent
9bf961cb8a
commit
3c533db308
2 changed files with 20 additions and 29 deletions
|
@ -108,9 +108,16 @@ local function waitFor14443b()
|
|||
return nil, 'Aborted by user'
|
||||
end
|
||||
|
||||
---
|
||||
-- turns on the HF field.
|
||||
local function connect14443b()
|
||||
local c = Command:newMIX{cmd = cmds.CMD_ISO_14443B_COMMAND, arg1 = ISO14B_COMMAND.ISO14B_CONNECT}
|
||||
return c.sendMIX(true)
|
||||
end
|
||||
---
|
||||
-- Sends an instruction to do nothing, only disconnect
|
||||
local function disconnect14443b()
|
||||
local c = Command:newMIX{cmd = cmds.CMD_READER_ISO_14443b}
|
||||
local c = Command:newMIX{cmd = cmds.CMD_ISO_14443B_COMMAND, arg1 = ISO14B_COMMAND.ISO14B_DISCONNECT}
|
||||
-- We can ignore the response here, no ACK is returned for this command
|
||||
-- Check /armsrc/iso14443b.c, ReaderIso14443b() for details
|
||||
return c.sendMIX(true)
|
||||
|
@ -120,6 +127,7 @@ local library = {
|
|||
read = read14443b,
|
||||
waitFor14443b = waitFor14443b,
|
||||
parse1443b = parse1443b,
|
||||
connect = connect14443b,
|
||||
disconnect = disconnect14443b,
|
||||
ISO14B_COMMAND = ISO14B_COMMAND,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue