// 128 bit shift register [shift3:shift2:shift1:shift0]
uint32_t shift3 = 0, shift2 = 0, shift1 = 0, shift0 = 0;
// 128 bit shift register [shift3:shift2:shift1:shift0]
uint32_t shift3 = 0, shift2 = 0, shift1 = 0, shift0 = 0;
- memset(BigBuf,0,sizeof(BigBuf));
+ uint32_t *BigBuf = (uint32_t *)BigBuf_get_addr();
+ memset(BigBuf,0,BigBuf_max_traceLen()/sizeof(uint32_t));
// compose fc/8 fc/10 waveform
static void fc(int c, int *n) {
// compose fc/8 fc/10 waveform
static void fc(int c, int *n) {
// loop to get raw HID waveform then FSK demodulate the TAG ID from it
void CmdHIDdemodFSK(int findone, int *high, int *low, int ledcontrol)
{
// loop to get raw HID waveform then FSK demodulate the TAG ID from it
void CmdHIDdemodFSK(int findone, int *high, int *low, int ledcontrol)
{
- uint8_t *dest = (uint8_t *)BigBuf;
-
- size_t size=sizeof(BigBuf), idx=0; //, found=0;
+ uint8_t *dest = BigBuf_get_addr();
+ const size_t sizeOfBigBuff = BigBuf_max_traceLen();
+ size_t size = 0;
// Configure to go in 125Khz listen mode
LFSetupFPGAForADC(95, true);
// Configure to go in 125Khz listen mode
LFSetupFPGAForADC(95, true);
idx = HIDdemodFSK(dest, &size, &hi2, &hi, &lo);
idx = HIDdemodFSK(dest, &size, &hi2, &hi, &lo);
if (idx>0 && lo>0){
// final loop, go over previously decoded manchester data and decode into usable tag ID
// 111000 bit pattern represent start of frame, 01 pattern represents a 1 and 10 represents a 0
if (idx>0 && lo>0){
// final loop, go over previously decoded manchester data and decode into usable tag ID
// 111000 bit pattern represent start of frame, 01 pattern represents a 1 and 10 represents a 0
void CmdEM410xdemod(int findone, int *high, int *low, int ledcontrol)
{
void CmdEM410xdemod(int findone, int *high, int *low, int ledcontrol)
{
if (ledcontrol) LED_A_ON();
DoAcquisition125k_internal(-1,true);
if (ledcontrol) LED_A_ON();
DoAcquisition125k_internal(-1,true);
//Dbprintf("DEBUG: Buffer got");
//askdemod and manchester decode
errCnt = askmandemod(dest, &size, &clk, &invert);
//Dbprintf("DEBUG: Buffer got");
//askdemod and manchester decode
errCnt = askmandemod(dest, &size, &clk, &invert);
void CmdIOdemodFSK(int findone, int *high, int *low, int ledcontrol)
{
void CmdIOdemodFSK(int findone, int *high, int *low, int ledcontrol)
{
DoAcquisition125k_internal(-1,true);
//fskdemod and get start index
WDT_HIT();
DoAcquisition125k_internal(-1,true);
//fskdemod and get start index
WDT_HIT();
// Read one card block in page 0
void T55xxReadBlock(uint32_t Block, uint32_t Pwd, uint8_t PwdMode)
{
// Read one card block in page 0
void T55xxReadBlock(uint32_t Block, uint32_t Pwd, uint8_t PwdMode)
{
//int m=0, i=0; //enio adjustment 12/10/14
uint32_t m=0, i=0;
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
//int m=0, i=0; //enio adjustment 12/10/14
uint32_t m=0, i=0;
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
// Clear destination buffer before sending the command
memset(dest, 128, m);
// Connect the A/D to the peak-detected low-frequency path.
// Clear destination buffer before sending the command
memset(dest, 128, m);
// Connect the A/D to the peak-detected low-frequency path.
// Clear destination buffer before sending the command
memset(dest, 128, m);
// Connect the A/D to the peak-detected low-frequency path.
// Clear destination buffer before sending the command
memset(dest, 128, m);
// Connect the A/D to the peak-detected low-frequency path.
int i, j, lastval, bitidx, half_switch;
int clock = 64;
int tolerance = clock / 8;
int i, j, lastval, bitidx, half_switch;
int clock = 64;
int tolerance = clock / 8;
// Clear destination buffer before sending the command
memset(dest, 128, m);
// Connect the A/D to the peak-detected low-frequency path.
// Clear destination buffer before sending the command
memset(dest, 128, m);
// Connect the A/D to the peak-detected low-frequency path.