mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 18:57:12 +08:00
Added a lot of #ifndef , extern C, Move inside from ARMSRC -> THUMBS, which made the compiled image smaller.. I don't know if it broke anything. Moved MF_DBGLEVEL definitions into common.h Moved print_result from util.c into appmain.c Also split up some struct typedef into header files so they could be reused in other code places. ''' danger ''' this might have broken stuff...
55 lines
1.5 KiB
C
55 lines
1.5 KiB
C
//-----------------------------------------------------------------------------
|
|
// Merlok - June 2011
|
|
// Gerhard de Koning Gans - May 2008
|
|
// Hagen Fritsch - June 2010
|
|
//
|
|
// 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.
|
|
//-----------------------------------------------------------------------------
|
|
// Routines to support ISO 14443 type B.
|
|
//-----------------------------------------------------------------------------
|
|
|
|
#ifndef __ISO14443B_H
|
|
#define __ISO14443B_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "proxmark3.h"
|
|
#include "common.h" // access to global variable: MF_DBGLEVEL
|
|
#include "apps.h"
|
|
#include "util.h"
|
|
#include "string.h"
|
|
#include "iso14443crc.h"
|
|
|
|
#include "mifare.h"
|
|
#include "protocols.h"
|
|
//#include "mifareutil.h"
|
|
|
|
extern void AppendCrc14443b(uint8_t *data, int len);
|
|
void SendRawCommand14443B_Ex(UsbCommand *c);
|
|
void iso14443b_setup();
|
|
uint8_t iso14443b_apdu(uint8_t const *message, size_t message_length, uint8_t *response);
|
|
uint8_t iso14443b_select_card(iso14b_card_select_t* card);
|
|
uint8_t iso14443b_select_card_srx(iso14b_card_select_t* card);
|
|
|
|
// testfunctions
|
|
void WaitForFpgaDelayQueueIsEmpty( uint16_t delay );
|
|
void ClearFpgaShiftingRegisters(void);
|
|
|
|
// States for 14B SIM command
|
|
#define SIM_NOFIELD 0
|
|
#define SIM_IDLE 1
|
|
#define SIM_HALTED 2
|
|
#define SIM_SELECTING 3
|
|
#define SIM_HALTING 4
|
|
#define SIM_ACKNOWLEDGE 5
|
|
#define SIM_WORK 6
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __ISO14443B_H */
|