fix little endian vs big endian in the macros... again... but this time correct
[RRG-proxmark3.git] / client / src / cmdlfem.c
blob378bf6729b044f7e392b831fc80ba97b922c441b
1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2020 iceman <iceman at icesql.net>
3 //
4 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
5 // at your option, any later version. See the LICENSE.txt file for the text of
6 // the license.
7 //-----------------------------------------------------------------------------
8 // Low frequency EM4x commands
9 //-----------------------------------------------------------------------------
11 #include "cmdlfem.h"
12 #include "cmdlfem410x.h"
13 #include "cmdlfem4x05.h"
14 #include "cmdlfem4x50.h"
15 #include "cmdlfem4x70.h"
17 #include <inttypes.h>
18 #include <stdlib.h>
19 #include "cmdparser.h" // command_t
20 #include "comms.h" // clearCommandBuffer
21 #include "cmdlf.h"
23 static int CmdHelp(const char *Cmd);
25 static command_t CommandTable[] = {
26 {"help", CmdHelp, AlwaysAvailable, "This help"},
27 {"410x", CmdLFEM410X, AlwaysAvailable, "{ EM 4102 commands... }"},
28 {"4x05", CmdLFEM4X05, AlwaysAvailable, "{ EM 4205 / 4305 / 4369 / 4469 commands... }"},
29 {"4x50", CmdLFEM4X50, AlwaysAvailable, "{ EM 4350 / 4450 commands... }"},
30 {"4x70", CmdLFEM4X70, AlwaysAvailable, "{ EM 4070 / 4170 commands... }"},
31 {NULL, NULL, NULL, NULL}
34 static int CmdHelp(const char *Cmd) {
35 (void)Cmd; // Cmd is not used so far
36 CmdsHelp(CommandTable);
37 return PM3_SUCCESS;
40 int CmdLFEM(const char *Cmd) {
41 clearCommandBuffer();
42 return CmdsParse(CommandTable, Cmd);