static int num_probes = 0;
static int samples_per_event = 0;
static int capture_ratio = 50;
-
static struct sigma_trigger trigger;
static uint64_t supported_samplerates[] = {
return sigma_read(data, numchunks * CHUNK_SIZE);
}
-/* Upload trigger look-up tables to Sigma */
+/* Upload trigger look-up tables to Sigma. */
static int sigma_write_trigger_lut(struct triggerlut *lut)
{
int i;
int triggerts = -1;
int triggeroff = 0;
+ /* Check if trigger is in this chunk. */
if (triggerpos != -1) {
if (cur_samplerate <= MHZ(50))
triggerpos -= EVENTS_PER_CLUSTER;
sent = 0;
if (i == triggerts) {
/*
- * Trigger is presumptively only accurate to event, i.e.
- * for 100 and 200 MHz, where multiple samples are coded
- * in a single event, the trigger does not match the
- * exact sample.
+ * Trigger is presumptively not accurate to sample.
+ * However, it always trigger before the actual event,
+ * so it would be possible to forward to correct position
+ * here by manually checking for trigger condition.
*/
+
tosend = (triggerpos % 7) - triggeroff;
if (tosend > 0) {
/* Set bit in entry */
if ((mask & bit) &&
((!(value & bit)) !=
- (!(j & (1 << k)))))
+ (!(j & (1 << k)))))
entry[i] &= ~(1 << j);
}
}
static int build_basic_trigger(struct triggerlut *lut)
{
int i,j;
- uint16_t masks[2] = {0, 0};
+ uint16_t masks[2] = { 0, 0 };
memset(lut, 0, sizeof(struct triggerlut));