X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fsysclk-lwla%2Fprotocol.c;h=85997249143213304062396e5bea67361ec1a8ae;hb=06f0872ea95f88a2f944f0c9b7a477a7793dfe06;hp=b4c3171e240ceb73dc3cbc3337085045a4efa534;hpb=1c47e0da8f2571bc34dbdc368c3c1f55318c3aa0;p=libsigrok.git diff --git a/src/hardware/sysclk-lwla/protocol.c b/src/hardware/sysclk-lwla/protocol.c index b4c3171e..85997249 100644 --- a/src/hardware/sysclk-lwla/protocol.c +++ b/src/hardware/sysclk-lwla/protocol.c @@ -97,7 +97,7 @@ static int submit_request(const struct sr_dev_inst *sdi, int ret; devc = sdi->priv; - acq = devc->acquisition; + acq = devc->acquisition; devc->state = state; @@ -132,7 +132,7 @@ static void handle_status_response(const struct sr_dev_inst *sdi) unsigned int old_status; devc = sdi->priv; - acq = devc->acquisition; + acq = devc->acquisition; old_status = acq->status; if ((*devc->model->handle_response)(sdi) != SR_OK) { @@ -168,7 +168,7 @@ static void handle_length_response(const struct sr_dev_inst *sdi) struct acquisition_state *acq; devc = sdi->priv; - acq = devc->acquisition; + acq = devc->acquisition; if ((*devc->model->handle_response)(sdi) != SR_OK) { devc->transfer_error = TRUE; @@ -202,13 +202,13 @@ static void handle_read_response(const struct sr_dev_inst *sdi) unsigned int end_addr; devc = sdi->priv; - acq = devc->acquisition; + acq = devc->acquisition; /* Prepare session packet. */ - packet.type = SR_DF_LOGIC; + packet.type = SR_DF_LOGIC; packet.payload = &logic; logic.unitsize = (devc->model->num_channels + 7) / 8; - logic.data = acq->out_packet; + logic.data = acq->out_packet; end_addr = MIN(acq->mem_addr_next, acq->mem_addr_stop); acq->in_index = 0; @@ -258,7 +258,7 @@ static void clear_acquisition_state(const struct sr_dev_inst *sdi) struct acquisition_state *acq; devc = sdi->priv; - acq = devc->acquisition; + acq = devc->acquisition; devc->acquisition = NULL; @@ -281,7 +281,7 @@ static int transfer_event(int fd, int revents, void *cb_data) (void)fd; - sdi = cb_data; + sdi = cb_data; devc = sdi->priv; drvc = sdi->driver->context; @@ -289,7 +289,7 @@ static int transfer_event(int fd, int revents, void *cb_data) return G_SOURCE_REMOVE; /* Handle pending USB events without blocking. */ - tv.tv_sec = 0; + tv.tv_sec = 0; tv.tv_usec = 0; ret = libusb_handle_events_timeout_completed(drvc->sr_ctx->libusb_ctx, &tv, NULL); @@ -316,7 +316,7 @@ static int transfer_event(int fd, int revents, void *cb_data) /* We are done, clean up and send end packet to session bus. */ clear_acquisition_state(sdi); - std_session_send_df_end(sdi, LOG_PREFIX); + std_session_send_df_end(sdi); return G_SOURCE_REMOVE; } @@ -329,9 +329,9 @@ static void LIBUSB_CALL transfer_out_completed(struct libusb_transfer *transfer) struct dev_context *devc; struct acquisition_state *acq; - sdi = transfer->user_data; + sdi = transfer->user_data; devc = sdi->priv; - acq = devc->acquisition; + acq = devc->acquisition; if (transfer->status != LIBUSB_TRANSFER_COMPLETED) { sr_err("Transfer to device failed (state %d): %s.", @@ -394,9 +394,9 @@ static void LIBUSB_CALL transfer_in_completed(struct libusb_transfer *transfer) struct dev_context *devc; struct acquisition_state *acq; - sdi = transfer->user_data; + sdi = transfer->user_data; devc = sdi->priv; - acq = devc->acquisition; + acq = devc->acquisition; if (transfer->status != LIBUSB_TRANSFER_COMPLETED) { sr_err("Transfer from device failed (state %d): %s.", @@ -457,7 +457,7 @@ static int init_acquisition_state(const struct sr_dev_inst *sdi) struct acquisition_state *acq; devc = sdi->priv; - usb = sdi->conn; + usb = sdi->conn; if (devc->acquisition) { sr_err("Acquisition still in progress?"); @@ -574,7 +574,7 @@ SR_PRIV int lwla_start_acquisition(const struct sr_dev_inst *sdi) ret = submit_request(sdi, STATE_START_CAPTURE); if (ret == SR_OK) - ret = std_session_send_df_header(sdi, LOG_PREFIX); + ret = std_session_send_df_header(sdi); if (ret != SR_OK) { usb_source_remove(sdi->session, drvc->sr_ctx);