#include <glib.h>
#include <sigrok.h>
+#ifdef _WIN32
+#define O_NONBLOCK FIONBIO
+#endif
+
#define NUM_PROBES 32
#define NUM_TRIGGER_STAGES 4
#define TRIGGER_TYPES "01"
*/
if (trigger_at > 0) {
/* there are pre-trigger samples, send those first */
- packet.type = DF_LOGIC32;
+ packet.type = DF_LOGIC;
packet.length = trigger_at * 4;
+ packet.unitsize = 4;
packet.payload = raw_sample_buf;
session_bus(user_data, &packet);
}
packet.length = 0;
session_bus(user_data, &packet);
- packet.type = DF_LOGIC32;
+ packet.type = DF_LOGIC;
packet.length = (limit_samples * 4) - (trigger_at * 4);
+ packet.unitsize = 4;
packet.payload = raw_sample_buf + trigger_at * 4;
session_bus(user_data, &packet);
} else {
- packet.type = DF_LOGIC32;
+ packet.type = DF_LOGIC;
packet.length = limit_samples * 4;
+ packet.unitsize = 4;
packet.payload = raw_sample_buf;
session_bus(user_data, &packet);
}
gettimeofday(&header->starttime, NULL);
header->samplerate = cur_samplerate;
header->protocol_id = PROTO_RAW;
- header->num_probes = NUM_PROBES;
+ header->num_logic_probes = NUM_PROBES;
+ header->num_analog_probes = 0;
session_bus(session_device_id, packet);
g_free(header);
g_free(packet);