X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fsysclk-lwla%2Fprotocol.c;h=2fd4dffaa48bd46267d21d6dad3d57aae4b98bf6;hb=1a46cc62e2b528bcaeb1f8dc0c952a81b3bcba5c;hp=ce922374e845b6f5d419c7c1b4cd1f37f77c3d84;hpb=57ba5f3d56a3e2927d35229a684cc9b4b8435789;p=libsigrok.git diff --git a/src/hardware/sysclk-lwla/protocol.c b/src/hardware/sysclk-lwla/protocol.c index ce922374..2fd4dffa 100644 --- a/src/hardware/sysclk-lwla/protocol.c +++ b/src/hardware/sysclk-lwla/protocol.c @@ -65,7 +65,7 @@ static int capture_setup(const struct sr_dev_inst *sdi) uint64_t divider_count; uint64_t trigger_mask; uint64_t memory_limit; - uint16_t command[3 + 10*4]; + uint16_t command[3 + (10 * 4)]; devc = sdi->priv; acq = devc->acquisition; @@ -107,8 +107,12 @@ static int capture_setup(const struct sr_dev_inst *sdi) /* Set bits to select external TRG input edge. */ if (devc->cfg_trigger_source == TRIGGER_EXT_TRG) switch (devc->cfg_trigger_slope) { - case EDGE_POSITIVE: trigger_mask |= (uint64_t)1 << 35; break; - case EDGE_NEGATIVE: trigger_mask |= (uint64_t)1 << 34; break; + case EDGE_POSITIVE: + trigger_mask |= (uint64_t)1 << 35; + break; + case EDGE_NEGATIVE: + trigger_mask |= (uint64_t)1 << 34; + break; } command[19] = LWLA_WORD_0(trigger_mask); @@ -346,7 +350,7 @@ static void issue_stop_capture(const struct sr_dev_inst *sdi) } } -/* Decode an incoming capture status reponse and act on it as appropriate. +/* Decode an incoming capture status response and act on it as appropriate. * Note that this function changes the device state. */ static void process_capture_status(const struct sr_dev_inst *sdi) @@ -919,13 +923,13 @@ SR_PRIV int lwla_start_acquisition(const struct sr_dev_inst *sdi) libusb_fill_bulk_transfer(acq->xfer_out, usb->devhdl, EP_COMMAND, (unsigned char *)acq->xfer_buf_out, 0, &receive_transfer_out, - (struct sr_dev_inst *)sdi, USB_TIMEOUT); + (struct sr_dev_inst *)sdi, USB_TIMEOUT_MS); libusb_fill_bulk_transfer(acq->xfer_in, usb->devhdl, EP_REPLY, (unsigned char *)acq->xfer_buf_in, sizeof acq->xfer_buf_in, &receive_transfer_in, - (struct sr_dev_inst *)sdi, USB_TIMEOUT); + (struct sr_dev_inst *)sdi, USB_TIMEOUT_MS); regvals = devc->reg_write_seq;