void UsbPacketReceived(BYTE *packet, int len)\r
{\r
UsbCommand *c = (UsbCommand *)packet;\r
+ UsbCommand ack;\r
\r
switch(c->cmd) {\r
#ifdef WITH_LF\r
case CMD_ACQUIRE_RAW_ADC_SAMPLES_125K:\r
AcquireRawAdcSamples125k(c->arg[0]);\r
+ ack.cmd = CMD_ACK;\r
+ UsbSendPacket((BYTE*)&ack, sizeof(ack));\r
break;\r
#endif\r
\r
}\r
\r
case CMD_DOWNLOADED_SIM_SAMPLES_125K: {\r
- UsbCommand ack;\r
BYTE *b = (BYTE *)BigBuf;\r
memcpy(b+c->arg[0], c->d.asBytes, 48);\r
//Dbprintf("copied 48 bytes to %i",b+c->arg[0]);\r
for(i=0; i<48; i++) sample_buf[i] = UC->d.asBytes[i];
received_command = UC->cmd;
return;
+ case CMD_ACQUIRE_RAW_ADC_SAMPLES_125K:
case CMD_DOWNLOADED_SIM_SAMPLES_125K:
if (UC->cmd != CMD_ACK) goto unexpected_response;
// got ACK