mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
LF: rework internal APIs
This commit is contained in:
parent
74050af8c2
commit
dfb7eaf061
51 changed files with 468 additions and 387 deletions
|
@ -152,8 +152,8 @@ static int sendTry(uint8_t format_idx, wiegand_card_t *card, uint32_t delay, boo
|
|||
//by marshmellow (based on existing demod + holiman's refactor)
|
||||
//HID Prox demod - FSK RF/50 with preamble of 00011101 (then manchester encoded)
|
||||
//print full HID Prox ID and some bit format details if found
|
||||
static int CmdHIDDemod(const char *Cmd) {
|
||||
(void)Cmd; // Cmd is not used so far
|
||||
int demodHID(bool verbose) {
|
||||
(void) verbose; // unused so far
|
||||
|
||||
// HID simulation etc uses 0/1 as signal data. This must be converted in order to demod it back again
|
||||
if (isGraphBitstream()) {
|
||||
|
@ -261,10 +261,16 @@ static int CmdHIDDemod(const char *Cmd) {
|
|||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
static int CmdHIDDemod(const char *Cmd) {
|
||||
(void)Cmd; // Cmd is not used so far
|
||||
return demodHID(true);
|
||||
}
|
||||
|
||||
// this read is the "normal" read, which download lf signal and tries to demod here.
|
||||
static int CmdHIDRead(const char *Cmd) {
|
||||
(void)Cmd; // Cmd is not used so far
|
||||
lf_read(false, 12000);
|
||||
return CmdHIDDemod(Cmd);
|
||||
return demodHID(true);
|
||||
}
|
||||
|
||||
// this read loops on device side.
|
||||
|
@ -562,7 +568,3 @@ int CmdLFHID(const char *Cmd) {
|
|||
clearCommandBuffer();
|
||||
return CmdsParse(CommandTable, Cmd);
|
||||
}
|
||||
|
||||
int demodHID(void) {
|
||||
return CmdHIDDemod("");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue