ADD: SmartCard skeleton

This commit is contained in:
iceman1001 2018-03-04 14:14:08 +01:00
parent e53a5452b8
commit 857bc8ab66
2 changed files with 50 additions and 0 deletions

34
armsrc/smartcard.c Normal file
View file

@ -0,0 +1,34 @@
#include "smartcard.h"
/*
PA5 SIM I/O
PA7 SIM CLOCK
PA10 SIM RESET
Both RX / TX is connected to PA5
*/
void SmartCardSetup(void) {
// PA5 ->
// PA7 ->
// PA10 ->
}
void SmartCardStop(void) {
StopTicks();
Dbprintf("SmartCardStop");
LED_A_OFF();
}
bool SmartCardInit(void) {
StartTicks();
LED_A_ON();
SmartCardSetup();
Dbprintf("SmartCardInit");
return true;
}

16
armsrc/smartcard.h Normal file
View file

@ -0,0 +1,16 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// Common Instructions //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
#ifndef __SMARTCARD_H
#define __SMARTCARD_H
#include "proxmark3.h"
#include "apps.h"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
extern void Dbprintf(const char *fmt, ...);
void SmartCardSetup(void);
void SmartCardStop(void);
bool SmartCardInit();
#endif