#include "apps.h"
#include "string.h"
#include "iso15693tools.h"
-
+#include "cmd.h"
#define arraylen(x) (sizeof(x)/sizeof((x)[0]))
int8_t prev = 0;
+ FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
BuildIdentifyRequest();
SetAdcMuxFor(GPIO_MUXSEL_HIPKD);
int8_t prev = 0;
+ FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
// Setup SSC
FpgaSetupSsc();
LED_C_OFF();
LED_D_OFF();
+ FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
// Setup SSC
// FpgaSetupSsc();
// Blank arrays
memset(BigBuf + 3660, 0, 300);
+ FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
// Setup SSC
FpgaSetupSsc();
// FIRST WE RUN AN INVENTORY TO GET THE TAG UID
// THIS MEANS WE CAN PRE-BUILD REQUESTS TO SAVE CPU TIME
- uint8_t TagUID[8]; // where we hold the uid for hi15reader
+ uint8_t TagUID[8] = {0, 0, 0, 0, 0, 0, 0, 0}; // where we hold the uid for hi15reader
// BuildIdentifyRequest();
// //TransmitTo15693Tag(ToSend,ToSendMax+3,&tsamples, &wait);
// Blank arrays
memset(answer1, 0, 100);
+ FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
// Setup SSC
FpgaSetupSsc();
int recvlen=0;
uint8_t *recvbuf=(uint8_t *)BigBuf;
- UsbCommand n;
+// UsbCommand n;
if (DEBUG) {
Dbprintf("SEND");
recvlen=SendDataTag(data,datalen,1,speed,(recv?&recvbuf:NULL));
if (recv) {
- n.cmd=/* CMD_ISO_15693_COMMAND_DONE */ CMD_ACK;
- n.arg[0]=recvlen>48?48:recvlen;
- memcpy(n.d.asBytes, recvbuf, 48);
+// n.cmd=/* CMD_ISO_15693_COMMAND_DONE */ CMD_ACK;
+// n.arg[0]=recvlen>48?48:recvlen;
+// memcpy(n.d.asBytes, recvbuf, 48);
LED_B_ON();
- UsbSendPacket((uint8_t *)&n, sizeof(n));
+ cmd_send(CMD_ACK,recvlen>48?48:recvlen,0,0,recvbuf,48);
+// UsbSendPacket((uint8_t *)&n, sizeof(n));
LED_B_OFF();
if (DEBUG) {