mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
Added explanation of how dankarmulti works
This commit is contained in:
parent
0b2726619d
commit
380670bd21
1 changed files with 22 additions and 0 deletions
|
@ -31,6 +31,28 @@
|
||||||
* to create the list of modes. You need to use the same names
|
* to create the list of modes. You need to use the same names
|
||||||
* here as defined earlier.
|
* here as defined earlier.
|
||||||
*
|
*
|
||||||
|
* How this works:
|
||||||
|
* The basic idea is to simply include several c-files with additional
|
||||||
|
* modes into this file. Hopefully the only collision of symbols are
|
||||||
|
* the RunMod and ModInfo, and these are solved by dankarmulti.h.
|
||||||
|
*
|
||||||
|
* First, dankarmulti.h is included once by itself to define some macros
|
||||||
|
* used later.
|
||||||
|
*
|
||||||
|
* For each mode to be included we define MODE_NAME which is a unique
|
||||||
|
* name to give the mode and MODE_FILE which is the name of the C-file
|
||||||
|
* for the mode. dankarmulti.h will make sure that RunMod and
|
||||||
|
* ModInfo is renamed to RunMod_NAME where name is what we defined. It
|
||||||
|
* will also include the actual mode source code and create a struct
|
||||||
|
* with function pointer to the run and info functions of the mode.
|
||||||
|
* At the end of dankarmulti.h it does #undef on MODE_NAME and MODE_FILE
|
||||||
|
* so that they can be redefined for the next mode to include.
|
||||||
|
*
|
||||||
|
* To create a list of the modes we now have available, it is necessary
|
||||||
|
* to use the START_MODE_LIST, ADD_MODE and END_MODE_LIST macros. This
|
||||||
|
* could also have been done with some linker magic and a new section,
|
||||||
|
* or by some other dirty hack. But this works for now.
|
||||||
|
*
|
||||||
* Usage:
|
* Usage:
|
||||||
* Single press to cycle between the modes.
|
* Single press to cycle between the modes.
|
||||||
* The LEDs will show the currently selected mode.
|
* The LEDs will show the currently selected mode.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue