X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/50d6e4abc154916cb4cf62f294700181bfc2abbc..54a942b05dd2a601b85e9851a5799929cbdffd5f:/client/cmdlfpcf7931.c diff --git a/client/cmdlfpcf7931.c b/client/cmdlfpcf7931.c new file mode 100644 index 00000000..13917146 --- /dev/null +++ b/client/cmdlfpcf7931.c @@ -0,0 +1,51 @@ +//----------------------------------------------------------------------------- +// Copyright (C) 2012 Chalk +// +// This code is licensed to you under the terms of the GNU GPL, version 2 or, +// at your option, any later version. See the LICENSE.txt file for the text of +// the license. +//----------------------------------------------------------------------------- +// Low frequency PCF7931 commands +//----------------------------------------------------------------------------- + +#include +#include +//#include "proxusb.h" +#include "proxmark3.h" +#include "ui.h" +#include "graph.h" +#include "cmdparser.h" +#include "cmddata.h" +#include "cmdmain.h" +#include "cmdlf.h" +#include "cmdlfpcf7931.h" + +static int CmdHelp(const char *Cmd); + +int CmdLFPCF7931Read(const char *Cmd) +{ + UsbCommand c = {CMD_PCF7931_READ}; + SendCommand(&c); + UsbCommand resp; + WaitForResponse(CMD_ACK,&resp); + return 0; +} + +static command_t CommandTable[] = +{ + {"help", CmdHelp, 1, "This help"}, + {"read", CmdLFPCF7931Read, 1, "Read content of a PCF7931 transponder"}, + {NULL, NULL, 0, NULL} +}; + +int CmdLFPCF7931(const char *Cmd) +{ + CmdsParse(CommandTable, Cmd); + return 0; +} + +int CmdHelp(const char *Cmd) +{ + CmdsHelp(CommandTable); + return 0; +}