X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fkern-scale%2Fapi.c;h=167bf1bc9958c8180b83908c2c47f95c5f27ae17;hb=841aadc95b918fd883d36c6c8555f8cb0e3cd049;hp=7fa66bb3a8c498d58ce27b9e1b37478090bcbbd9;hpb=15a5bfe4815f9991a9bb532c05d6244a1818a0e4;p=libsigrok.git diff --git a/src/hardware/kern-scale/api.c b/src/hardware/kern-scale/api.c index 7fa66bb3..167bf1bc 100644 --- a/src/hardware/kern-scale/api.c +++ b/src/hardware/kern-scale/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 @@ -165,7 +164,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) /* Device replies with "A00\r\n" (OK) or "E01\r\n" (Error). Ignore. */ sr_sw_limits_acquisition_start(&devc->limits); - std_session_send_df_header(sdi, LOG_PREFIX); + std_session_send_df_header(sdi); /* Poll every 50ms, or whenever some data comes in. */ serial_source_add(sdi->session, serial, G_IO_IN, 50, @@ -174,12 +173,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) return SR_OK; } -static int dev_acquisition_stop(struct sr_dev_inst *sdi) -{ - return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, - sdi->conn, LOG_PREFIX); -} - #define SCALE(ID, CHIPSET, VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, \ VALID, PARSE) \ &((struct scale_info) { \ @@ -197,7 +190,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) .dev_open = std_serial_dev_open, \ .dev_close = std_serial_dev_close, \ .dev_acquisition_start = dev_acquisition_start, \ - .dev_acquisition_stop = dev_acquisition_stop, \ + .dev_acquisition_stop = std_serial_dev_acquisition_stop, \ .context = NULL, \ }, \ VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, \