From: Joel Holdsworth Date: Mon, 27 Feb 2012 19:34:24 +0000 (+0000) Subject: fx2lafw: Implemented hw_dev_acquisition_stop X-Git-Tag: libsigrok-0.1.0~85 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=5da939028db118a2e1445184b8d8406ecdcc9850;p=libsigrok.git fx2lafw: Implemented hw_dev_acquisition_stop --- diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index cc353a80..bd4eebad 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -645,8 +645,18 @@ static int hw_dev_acquisition_start(int dev_index, gpointer session_data) /* This stops acquisition on ALL devices, ignoring device_index. */ static int hw_dev_acquisition_stop(int dev_index, gpointer session_data) { + struct sr_datafeed_packet packet; + + /* Avoid compiler warnings. */ (void)dev_index; - (void)session_data; + + packet.type = SR_DF_END; + sr_session_bus(session_data, &packet); + + receive_transfer(NULL); + + /* TODO: Need to cancel and free any queued up transfers. */ + return SR_OK; }