- memcpy(receiveBuf, ack->d.asBytes, len);
- ack->arg[0] = iso14_apdu(cmd, len, receiveBuf);
-
- while(ack->arg[0] > sizeof(ack->d))
- {
- memcpy(ack->d.asBytes, receiveBuf, sizeof(ack->d));
- UsbSendPacket((void *)ack, sizeof(UsbCommand));
-
- receiveBuf+=sizeof(ack->d);
- ack->arg[0]-=sizeof(ack->d);
- }
-
- memcpy(ack->d.asBytes, receiveBuf, ack->arg[0]);
- UsbSendPacket((void *)ack, sizeof(UsbCommand));
+ arg0 = iso14_apdu(cmd, len, buf);
+ cmd_send(CMD_ACK,arg0,0,0,buf,sizeof(buf));
+// UsbSendPacket((void *)ack, sizeof(UsbCommand));