This function is called only for adding delay states to the waveform
so OPCODE is always the same.
While at it, fix confusing comments.
Signed-off-by: Paul Fertser <redacted>
gpif_acquiring = FALSE;
}
gpif_acquiring = FALSE;
}
-static void gpif_make_delay_state(volatile BYTE *pSTATE, uint8_t delay, uint8_t opcode, uint8_t output)
+static void gpif_make_delay_state(volatile BYTE *pSTATE, uint8_t delay, uint8_t output)
/*
* OPCODE
* SGL=0, GIN=0, INCAD=0, NEXT=0, DATA=0, DP=0
/*
* OPCODE
* SGL=0, GIN=0, INCAD=0, NEXT=0, DATA=0, DP=0
- * Collect data in this state.
- * OE[0:3]=0, CTL[0:3]=0
- * OE[0:3]=0, CTL[0:3]=0
delay_2 = 1;
delay_1 = cmd->sample_delay_l - delay_2;
delay_2 = 1;
delay_1 = cmd->sample_delay_l - delay_2;
- gpif_make_delay_state(pSTATE++, delay_2, 0x00, 0x40);
- gpif_make_delay_state(pSTATE++, delay_1, 0x00, 0x46);
+ gpif_make_delay_state(pSTATE++, delay_2, 0x40);
+ gpif_make_delay_state(pSTATE++, delay_1, 0x46);
} else {
/* Populate delay states. */
if ((cmd->sample_delay_h == 0 && cmd->sample_delay_l == 0) ||
} else {
/* Populate delay states. */
if ((cmd->sample_delay_h == 0 && cmd->sample_delay_l == 0) ||
return false;
for (i = 0; i < cmd->sample_delay_h; i++)
return false;
for (i = 0; i < cmd->sample_delay_h; i++)
- gpif_make_delay_state(pSTATE++, 0, 0x00, 0x00);
+ gpif_make_delay_state(pSTATE++, 0, 0x00);
if (cmd->sample_delay_l != 0)
if (cmd->sample_delay_l != 0)
- gpif_make_delay_state(pSTATE++, cmd->sample_delay_l, 0x00, 0x00);
+ gpif_make_delay_state(pSTATE++, cmd->sample_delay_l, 0x00);
}
/* Populate S1 - the decision point. */
}
/* Populate S1 - the decision point. */