X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Fopenbench-logic-sniffer%2Fprotocol.c;h=3bfb890fddf6623f8af8af9495d667b25d71b028;hp=a7c3f96376044b5b7b3e48eb3152b5ef53ad5f3a;hb=6745488b1a33acda728440e69f83e8bb0a0663f1;hpb=bee2b0168c087676c1b365861d8c2d4714afa9b9 diff --git a/src/hardware/openbench-logic-sniffer/protocol.c b/src/hardware/openbench-logic-sniffer/protocol.c index a7c3f963..3bfb890f 100644 --- a/src/hardware/openbench-logic-sniffer/protocol.c +++ b/src/hardware/openbench-logic-sniffer/protocol.c @@ -57,6 +57,18 @@ SR_PRIV int send_longcommand(struct sr_serial_dev_inst *serial, return SR_OK; } +SR_PRIV int ols_send_reset(struct sr_serial_dev_inst *serial) +{ + unsigned int i; + + for (i = 0; i < 5; i++) { + if (send_shortcommand(serial, CMD_RESET) != SR_OK) + return SR_ERR; + } + + return SR_OK; +} + /* Configures the channel mask based on which channels are enabled. */ SR_PRIV void ols_channel_mask(const struct sr_dev_inst *sdi) { @@ -129,7 +141,6 @@ SR_PRIV struct dev_context *ols_dev_new(void) /* Acquisition settings */ devc->limit_samples = devc->capture_ratio = 0; devc->trigger_at = -1; - devc->channel_mask = 0xffffffff; devc->flag_reg = 0; return devc;