- config = tonumber(config,16)
- local writecommand = Command:new{cmd = cmds.CMD_T55XX_WRITE_BLOCK, arg1 = config ,arg2 = 0, arg3 = 0}
- local err = core.SendCommand(writecommand:getBytes())
- if err then return oops(err) end
- local response = core.WaitForResponseTimeout(cmds.CMD_ACK,TIMEOUT)
- else
- dbg(cmd)
- core.console( cmd )
+ elseif _ == 1 then
+
+ dbg("Writing to T55x7 TAG")
+
+ local config = cmd:format(bitrate, modulation, clockrate)
+ dbg(('lf t55xx write 0 %s'):format(config))
+
+ config = tonumber(config,16)
+ local writecommand = Command:new{cmd = cmds.CMD_T55XX_WRITE_BLOCK, arg1 = config ,arg2 = 0, arg3 = 0}
+ local err = core.SendCommand(writecommand:getBytes())
+ if err then return oops(err) end
+ local response = core.WaitForResponseTimeout(cmds.CMD_ACK,TIMEOUT)
+ else
+ dbg(cmd)
+ core.console( cmd )
+ end