00001
00025
00026
00028 #define WARM_RESET_VALUE 0xAA
00029
00031 #define MAX_EXCHANGES 50
00032
00034 #define EEPROM_WARM_RESET 0x0
00035
00037 #define EEPROM_PIN 0x8
00038
00040 #define EEPROM_APPLICATION 0x32
00041
00043 #define EEPROM_COUNTER 0x40
00044
00046 #define EEPROM_TLOG_POINTER_HI 0x48
00047
00049 #define EEPROM_TLOG_POINTER_LO 0x49
00050
00052 #define EEPROM_TLOG_DATA 0x80
00053
00055 #define EEPROM_MAX_ADDRESS 0xFE0
00056
00058 #define APP_STORE_PIN 0x01
00059
00061 #define APP_LOG_FORWARD 0x02
00062
00064 #define APP_FW_MODIFY_PIN 0x03
00065
00067 #define APP_FILTER_GENERATEAC 0x04
00068
00070 #define APP_FILTER_LOG 0x05
00071
00073 #define APP_ERASE_EEPROM 0x06
00074
00076 #define APP_TERMINAL_1 0x07
00077
00079 #define APPLICATION_COUNT 7
00080
00081
00083 static char* appStrings[] = {
00084 "Store PIN",
00085 "Forward and Log",
00086 "Modify PIN",
00087 "Filter amount",
00088 "Filter and Log",
00089 "Erase EEPROM",
00090 "Terminal1"
00091 };
00092
00093
00094
00095
00096
00098 int main(void);
00099
00101 void InitSCD();
00102
00104 uint8_t SelectApplication();
00105
00107 void TestSCDTerminal();
00108
00110 void TestSCDICC();
00111
00113 void SwitchLeds();
00114
00116 void TestHardware();
00117
00119 uint8_t ForwardData();
00120
00122 uint8_t FilterGenerateACSimple();
00123
00125 uint8_t FilterGenerateAC();
00126
00128 uint8_t StorePIN();
00129
00131 uint8_t ForwardAndChangePIN();
00132
00134 uint8_t FilterAndLog();
00135
00137 uint8_t Terminal1();
00138
00140 void SleepUntilTerminalClock();
00141
00143 void SleepUntilCardInserted();
00144