X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fchronovu-la%2Fapi.c;h=e8a4afc38d9892078aaa4af4e276f548d912205c;hb=f670835f1fbc03525e995d6970a5495976ab7c1a;hp=f855f8e804fa90037b912d52f68fc8365aba4d41;hpb=bee2b0168c087676c1b365861d8c2d4714afa9b9;p=libsigrok.git diff --git a/src/hardware/chronovu-la/api.c b/src/hardware/chronovu-la/api.c index f855f8e8..e8a4afc3 100644 --- a/src/hardware/chronovu-la/api.c +++ b/src/hardware/chronovu-la/api.c @@ -14,8 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * along with this program; if not, see . */ #include @@ -44,8 +43,6 @@ static const int32_t trigger_matches[] = { SR_TRIGGER_FALLING, }; -static int dev_acquisition_stop(struct sr_dev_inst *sdi); - static void clear_helper(void *priv) { struct dev_context *devc; @@ -453,7 +450,7 @@ static int receive_data(int fd, int revents, void *cb_data) /* Get one block of data. */ if ((ret = cv_read_block(devc)) < 0) { sr_err("Failed to read data block: %d.", ret); - dev_acquisition_stop(sdi); + sr_dev_acquisition_stop(sdi); return FALSE; } @@ -476,7 +473,7 @@ static int receive_data(int fd, int revents, void *cb_data) for (i = 0; i < NUM_BLOCKS; i++) cv_send_block_to_session_bus(sdi, i); - dev_acquisition_stop(sdi); + sr_dev_acquisition_stop(sdi); return TRUE; } @@ -487,9 +484,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) uint8_t buf[8]; int bytes_to_write, bytes_written; - if (sdi->status != SR_ST_ACTIVE) - return SR_ERR_DEV_CLOSED; - devc = sdi->priv; if (!devc->ftdic) { @@ -553,7 +547,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) static int dev_acquisition_stop(struct sr_dev_inst *sdi) { - sr_dbg("Stopping acquisition."); sr_session_source_remove(sdi->session, -1); std_session_send_df_end(sdi);