- case CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K: {
-// UsbCommand n;
-// if(c->cmd == CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K) {
-// n.cmd = CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K;
-// } else {
-// n.cmd = CMD_DOWNLOADED_RAW_BITS_TI_TYPE;
-// }
-// n.arg[0] = c->arg[0];
- // memcpy(n.d.asBytes, BigBuf+c->arg[0], 48); // 12*sizeof(uint32_t)
- // LED_B_ON();
- // usb_write((uint8_t *)&n, sizeof(n));
- // UsbSendPacket((uint8_t *)&n, sizeof(n));
- // LED_B_OFF();
-
- LED_B_ON();
- for(size_t i=0; i<c->arg[1]; i += USB_CMD_DATA_SIZE) {
- size_t len = MIN((c->arg[1] - i),USB_CMD_DATA_SIZE);
- cmd_send(CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K,i,len,0,((byte_t*)BigBuf)+c->arg[0]+i,len);
- }
- // Trigger a finish downloading signal with an ACK frame
- cmd_send(CMD_ACK,0,0,0,0,0);
+ case CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K:
+
+ LED_B_ON();
+ for(size_t i=0; i<c->arg[1]; i += USB_CMD_DATA_SIZE) {
+ size_t len = MIN((c->arg[1] - i),USB_CMD_DATA_SIZE);
+ cmd_send(CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K,i,len,0,((byte_t*)BigBuf)+c->arg[0]+i,len);
+ }
+ // Trigger a finish downloading signal with an ACK frame
+ // We put a 1 in arg[0] to alert the host we're also sending sample_config
+ cmd_send(CMD_ACK,1,0,0,getSamplingConfig(),sizeof(sample_config));