]> sigrok.org Git - sigrok-firmware-fx2lafw.git/blobdiff - gpif-acquisition.c
allow captures of up to 48MHz, if bus conditions permit
[sigrok-firmware-fx2lafw.git] / gpif-acquisition.c
index e98cbc54c27f73bed2e65c32ef0146b8570635e9..96476ccc4185a01319efd34c16a12568125da8c4 100644 (file)
@@ -62,7 +62,7 @@ static void gpif_setup_registers(void)
         * GPIFWFSELECT: [7:6] = SINGLEWR index, [5:4] = SINGLERD index,
         *               [3:2] = FIFOWR index, [1:0] = FIFORD index
         */
-       GPIFWFSELECT = (0x3 << 6) | (0x2 << 4) | (0x1 << 2) | (0x0 << 0);
+       GPIFWFSELECT = (0x3u << 6) | (0x2u << 4) | (0x1u << 2) | (0x0u << 0);
 
        /* Contains RDY* pin values. Read-only according to TRM. */
        GPIFREADYSTAT = 0;
@@ -161,7 +161,7 @@ static void gpif_make_data_dp_state(volatile BYTE *pSTATE)
         * BRANCH
         * Branch to IDLE if condition is true, back to S0 otherwise.
         */
-       pSTATE[0] = (7 << 3) | (0 << 0);
+       pSTATE[0] = (1 << 7) | (7 << 3) | (0 << 0);
 
        /*
         * OPCODE
@@ -208,8 +208,7 @@ bool gpif_acquisition_prepare(const struct cmd_start_acquisition *cmd)
        }
 
        /* Populate delay states. */
-       if ((cmd->sample_delay_h == 0 && cmd->sample_delay_l == 0) ||
-           cmd->sample_delay_h >= 6)
+       if (cmd->sample_delay_h >= 6)
                return false;
 
        if (cmd->flags & CMD_START_FLAGS_CLK_CTL2) {