//-----------------------------------------------------------------------------
// Definitions internal to the app source.
//-----------------------------------------------------------------------------
-
#ifndef __APPS_H
#define __APPS_H
#include "fpgaloader.h"
#include "usb_cdc.h"
#include "hitag2.h"
+#include "hitagS.h"
#include "mifare.h"
#include "pcf7931.h"
//#include "des.h"
//#include "aes.h"
#include "desfire.h"
-
+#include "iso14443b.h"
extern const uint8_t OddByteParity[256];
extern int rsamples; // = 0;
#define MAX_ADC_LF_VOLTAGE 140800
int AvgAdc(int ch);
+void PrintToSendBuffer(void);
void ToSendStuffBit(int b);
void ToSendReset(void);
void ListenReaderField(int limit);
extern int ToSendMax;
extern uint8_t ToSend[];
-
/// lfops.h
extern uint8_t decimation;
extern uint8_t bits_per_sample ;
void EM4xWriteWord(uint32_t Data, uint8_t Address, uint32_t Pwd, uint8_t PwdMode);
/// iso14443.h
-void SimulateIso14443bTag(void);
+void SimulateIso14443bTag(uint32_t pupi);
void AcquireRawAdcSamplesIso14443b(uint32_t parameter);
-void ReadSTMemoryIso14443b(uint32_t);
+void ReadSTMemoryIso14443b(uint8_t numofblocks);
void RAMFUNC SnoopIso14443b(void);
void SendRawCommand14443B(uint32_t, uint32_t, uint8_t, uint8_t[]);
void MifareUSetPwd(uint8_t arg0, uint8_t *datain);
void OnSuccessMagic();
void OnErrorMagic(uint8_t reason);
-void MifareCollectNonces(uint32_t arg0, uint32_t arg1);
//desfire
void Mifare_DES_Auth1(uint8_t arg0,uint8_t *datain);
void SimulateHitagTag(bool tag_mem_supplied, byte_t* data);
void ReaderHitag(hitag_function htf, hitag_data* htd);
+//hitagS.h
+void SimulateHitagSTag(bool tag_mem_supplied, byte_t* data);
+void ReadHitagS(hitag_function htf, hitag_data* htd);
+void WritePageHitagS(hitag_function htf, hitag_data* htd,int page);
+void check_challenges(bool file_given, byte_t* data);
+
+
// cmd.h
bool cmd_receive(UsbCommand* cmd);
bool cmd_send(uint32_t cmd, uint32_t arg0, uint32_t arg1, uint32_t arg2, void* data, size_t len);