CHG: FeliCa implemenation by @satsuoni
This commit is contained in:
@@ -21,6 +21,7 @@ APP_CFLAGS = -DWITH_CRC \
|
||||
-DWITH_ISO14443b \
|
||||
-DWITH_ISO14443a \
|
||||
-DWITH_ICLASS \
|
||||
-DWITH_FELICA \
|
||||
-DWITH_HFSNOOP \
|
||||
-DWITH_HF_YOUNG \
|
||||
-fno-strict-aliasing -ffunction-sections -fdata-sections
|
||||
@@ -45,6 +46,7 @@ SRC_LF = lfops.c hitag2.c hitagS.c lfsampling.c pcf7931.c lfdemod.c
|
||||
SRC_ISO15693 = iso15693.c iso15693tools.c
|
||||
SRC_ISO14443a = iso14443a.c mifareutil.c mifarecmd.c mifaresniff.c epa.c
|
||||
SRC_ISO14443b = iso14443b.c
|
||||
SRC_FELICA = felica.c
|
||||
SRC_CRAPTO1 = crypto1.c des.c aes.c desfire_key.c desfire_crypto.c mifaredesfire.c
|
||||
SRC_CRC = iso14443crc.c crc.c crc16.c crc32.c
|
||||
SRC_EMV = tlv.c emvdataels.c emvutil.c emvcmd.c
|
||||
@@ -93,6 +95,7 @@ ARMSRC = fpgaloader.c \
|
||||
$(SRC_ICLASS) \
|
||||
$(SRC_EMV) \
|
||||
$(SRC_CRC) \
|
||||
$(SRC_FELICA) \
|
||||
parity.c \
|
||||
usb_cdc.c \
|
||||
cmd.c \
|
||||
|
||||
@@ -766,6 +766,18 @@ void UsbPacketReceived(uint8_t *packet, int len) {
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef WITH_FELICA
|
||||
case CMD_FELICA_LITE_SIM:
|
||||
HfSimLite(c->arg[0]);
|
||||
break;
|
||||
case CMD_FELICA_SNOOP:
|
||||
HfSnoopISO18(c->arg[0], c->arg[1]);
|
||||
break;
|
||||
case CMD_FELICA_LITE_DUMP:
|
||||
HfDumpFelicaLiteS();
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef WITH_ISO14443a
|
||||
case CMD_SNOOP_ISO_14443a:
|
||||
SniffIso14443a(c->arg[0]);
|
||||
|
||||
@@ -233,6 +233,11 @@ bool cmd_send(uint32_t cmd, uint32_t arg0, uint32_t arg1, uint32_t arg2, void* d
|
||||
// util.h
|
||||
void HfSnoop(int , int);
|
||||
|
||||
//felica.c
|
||||
extern void HfSnoopISO18(uint32_t samples, uint32_t triggers);
|
||||
extern void HfSimLite(uint64_t uid);
|
||||
extern void HfDumpFelicaLiteS();
|
||||
|
||||
//EMV functions
|
||||
// emvcmd.h
|
||||
extern void EMVTransaction(void);
|
||||
|
||||
@@ -85,4 +85,14 @@ extern void switch_off();
|
||||
#define FPGA_HF_ISO14443A_READER_LISTEN (3<<0)
|
||||
#define FPGA_HF_ISO14443A_READER_MOD (4<<0)
|
||||
|
||||
|
||||
//options for Felica.
|
||||
#define FPGA_MAJOR_MODE_ISO18092 (5<<5)
|
||||
#define FPGA_HF_ISO18092_FLAG_NOMOD (1<<0) //disable modulation module
|
||||
#define FPGA_HF_ISO18092_FLAG_424K (2<<0) // should enable 414k mode (untested). No autodetect
|
||||
#define FPGA_HF_ISO18092_FLAG_READER (4<<0) // enables antenna power, to act as a reader instead of tag
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user