X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fopenbench-logic-sniffer%2Fprotocol.c;h=0d6efeb85a89fd41d2a21dd81ee3aa400e4c664c;hb=d6d87fa2a28edbfa0f1c66ef4b03c9cd8bda095e;hp=f88729d573039467bfc63d91e83e44efc0d3bbeb;hpb=15a5bfe4815f9991a9bb532c05d6244a1818a0e4;p=libsigrok.git diff --git a/src/hardware/openbench-logic-sniffer/protocol.c b/src/hardware/openbench-logic-sniffer/protocol.c index f88729d5..0d6efeb8 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) { @@ -317,7 +329,7 @@ SR_PRIV void abort_acquisition(const struct sr_dev_inst *sdi) serial = sdi->conn; serial_source_remove(sdi->session, serial); - std_session_send_df_end(sdi, LOG_PREFIX); + std_session_send_df_end(sdi); } SR_PRIV int ols_receive_data(int fd, int revents, void *cb_data)