Merge pull request #2747 from Eltrick/stylise-dormakaba
[RRG-proxmark3.git] / armsrc / Standalone / lf_skeleton.c
blob4272cfc7e3f622e4700326903c44a7382fc06f33
1 //-----------------------------------------------------------------------------
2 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // See LICENSE.txt for the text of the license.
15 //-----------------------------------------------------------------------------
16 // main code for skeleton by Iceman
17 //-----------------------------------------------------------------------------
18 #include "standalone.h" // standalone definitions
19 #include "proxmark3_arm.h"
20 #include "appmain.h"
21 #include "fpgaloader.h"
22 #include "util.h"
23 #include "dbprint.h"
25 void ModInfo(void) {
26 DbpString(" LF skeleton mode - aka Skeleton (iceman)");
29 void RunMod(void) {
30 StandAloneMode();
31 Dbprintf("[=] LF skeleton code a.k.a Skeleton started");
32 FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
34 // the main loop for your standalone mode
35 for (;;) {
36 WDT_HIT();
38 // exit from RunMod, send a usbcommand.
39 if (data_available()) break;
41 // Was our button held down or pressed?
42 int button_pressed = BUTTON_HELD(1000);
44 Dbprintf("button %d", button_pressed);
46 if (button_pressed != BUTTON_NO_CLICK)
47 break;
50 DbpString("[=] exiting");
51 LEDsoff();