X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fsysclk-lwla%2Flwla.h;h=bf5318d1e64d4c7c7cd21d0ea5a89f43d2121aa4;hb=44f0adb65cfec90c0cbc6292ada335a5b80d533d;hp=7d95f9c1f447e33f932a18fa3dda36a95c9d8357;hpb=407b6e2cff817c6b05f1f038e2fecd94ad11fa86;p=libsigrok.git diff --git a/src/hardware/sysclk-lwla/lwla.h b/src/hardware/sysclk-lwla/lwla.h index 7d95f9c1..bf5318d1 100644 --- a/src/hardware/sysclk-lwla/lwla.h +++ b/src/hardware/sysclk-lwla/lwla.h @@ -61,7 +61,7 @@ struct sr_usb_dev_inst; /* Maximum length of a register read/write sequence. */ -#define MAX_REG_SEQ_LEN 16 +#define MAX_REG_SEQ_LEN 8 /* Logic datafeed packet size in bytes. * This is a multiple of both 4 and 5 to match any model's unit size @@ -69,8 +69,7 @@ struct sr_usb_dev_inst; */ #define PACKET_SIZE (5000 * 4 * 5) -/** LWLA protocol command ID codes. - */ +/** LWLA protocol command ID codes. */ enum command_id { CMD_READ_REG = 1, CMD_WRITE_REG = 2, @@ -89,22 +88,19 @@ enum status_flag { STATUS_MEM_AVAIL = 1 << 6, }; -/** LWLA1034 run-length encoding states. - */ +/** LWLA1034 run-length encoding states. */ enum rle_state { RLE_STATE_DATA, RLE_STATE_LEN }; -/** Register address/value pair. - */ +/** Register address/value pair. */ struct regval { unsigned int reg; uint32_t val; }; -/** LWLA sample acquisition and decompression state. - */ +/** LWLA sample acquisition and decompression state. */ struct acquisition_state { uint64_t samples_max; /* maximum number of samples to process */ uint64_t samples_done; /* number of samples sent to the session bus */ @@ -154,7 +150,7 @@ SR_PRIV int lwla_send_command(const struct sr_usb_dev_inst *usb, const uint16_t *command, int cmd_len); SR_PRIV int lwla_receive_reply(const struct sr_usb_dev_inst *usb, - uint32_t *reply, int reply_len, int expect_len); + void *reply, int buf_size, int *xfer_len); SR_PRIV int lwla_read_reg(const struct sr_usb_dev_inst *usb, uint16_t reg, uint32_t *value);