+bool lf_read(bool silent, uint32_t samples) {
+ if (IsOffline()) return false;
+ UsbCommand c = {CMD_ACQUIRE_RAW_ADC_SAMPLES_125K, {silent,samples,0}};
+ clearCommandBuffer();
+ //And ship it to device
+ SendCommand(&c);
+
+ UsbCommand resp;
+ if (g_lf_threshold_set) {
+ WaitForResponse(CMD_ACK,&resp);
+ } else {
+ if ( !WaitForResponseTimeout(CMD_ACK,&resp,2500) ) {
+ PrintAndLog("command execution time out");
+ return false;
+ }
+ }
+ // resp.arg[0] is bits read not bytes read.
+ getSamples(resp.arg[0]/8, silent);
+
+ return true;
+}
+