Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Commit

Permalink
CHG: renamed iso7816 files
Browse files Browse the repository at this point in the history
ADD: smartcard functionality  (big thanks to Chris Nocker!)
  • Loading branch information
iceman1001 committed Apr 8, 2018
1 parent 726edb8 commit 192aa9a
Show file tree
Hide file tree
Showing 6 changed files with 735 additions and 172 deletions.
6 changes: 3 additions & 3 deletions armsrc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ APP_CFLAGS = -DWITH_CRC \
-DWITH_ICLASS \
-DWITH_FELICA \
-DWITH_FLASH \
-DWITH_ISO7816 \
-DWITH_SMARTCARD \
-DWITH_HFSNOOP \
-DWITH_LF_SAMYRUN \
-fno-strict-aliasing -ffunction-sections -fdata-sections
Expand Down Expand Up @@ -55,7 +55,7 @@ SRC_CRC = crc.c crc16.c crc32.c
SRC_ICLASS = iclass.c optimized_cipher.c
SRC_LEGIC = legicrf.c legic_prng.c
SRC_FLASH = flashmem.c
SRC_ISO7816 = iso7816.c
SRC_SMARTCARD = smartcard.c
SRC_BEE = bee.c

#the FPGA bitstream files. Note: order matters!
Expand All @@ -81,7 +81,7 @@ THUMBSRC = start.c \
$(SRC_ZLIB) \
$(SRC_LEGIC) \
$(SRC_FLASH) \
$(SRC_ISO7816) \
$(SRC_SMARTCARD) \
appmain.c \
printf.c \
util.c \
Expand Down
14 changes: 13 additions & 1 deletion armsrc/appmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
#include "LCD.h"
#endif

#ifdef WITH_SMARTCARD
#include "smartcard.h"
#endif


//=============================================================================
// A buffer where we can queue things up to be sent through the FPGA, for
// any purpose (fake tag, as reader, whatever). We go MSB first, since that
Expand Down Expand Up @@ -364,7 +369,7 @@ void SendStatus(void) {
BigBuf_print_status();
Fpga_print_status();
Flashmem_print_status();
//Iso7816_print_status();
SmartCard_print_status();
printConfig(); //LF Sampling config
printUSBSpeed();
Dbprintf("Various");
Expand Down Expand Up @@ -1203,6 +1208,10 @@ void __attribute__((noreturn)) AppMain(void) {
LCDInit();
#endif

#ifdef WITH_SMARTCARD
SmartCard_init();
#endif

byte_t rx[sizeof(UsbCommand)];

for(;;) {
Expand All @@ -1212,6 +1221,9 @@ void __attribute__((noreturn)) AppMain(void) {
if ( cmd_receive( (UsbCommand*)rx ) )
UsbPacketReceived(rx, sizeof(UsbCommand) );

#ifdef WITH_SMARTCARD
SMART_CARD_ServiceSmartCard();
#endif
// Press button for one second to enter a possible standalone mode
if (BUTTON_HELD(1000) > 0) {

Expand Down
148 changes: 0 additions & 148 deletions armsrc/iso7816.c

This file was deleted.

20 changes: 0 additions & 20 deletions armsrc/iso7816.h

This file was deleted.

Loading

0 comments on commit 192aa9a

Please sign in to comment.