-extern void AppendCrc14443a(uint8_t* data, int len);
-extern void ReaderTransmitShort(const uint8_t* bt);
-extern void ReaderTransmit(uint8_t* frame, int len);
-extern int ReaderReceive(uint8_t* receivedAnswer);
-extern void iso14443a_setup();
-extern int iso14443a_select_card(uint8_t * uid_ptr, iso14a_card_select_t * card_info);
-extern void iso14a_set_trigger(int enable);
+#include <stdint.h>
+#include <stdbool.h>
+#include "mifare.h"
+
+extern void GetParity(const uint8_t *pbtCmd, uint16_t len, uint8_t *par);
+extern void AppendCrc14443a(uint8_t *data, int len);
+
+extern void ReaderTransmit(uint8_t *frame, uint16_t len, uint32_t *timing);
+extern void ReaderTransmitBitsPar(uint8_t *frame, uint16_t bits, uint8_t *par, uint32_t *timing);
+extern void ReaderTransmitPar(uint8_t *frame, uint16_t len, uint8_t *par, uint32_t *timing);
+extern int ReaderReceive(uint8_t *receivedAnswer, uint8_t *par);