X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fkern-scale%2Fprotocol.h;h=7566ea5b291e2b769fef89332108de07a572383e;hb=8f3c77db26dece82109b386ad5ba7ea344b1ec8f;hp=a7f11d2379ce5029ac2106442e7e26209e4bdf45;hpb=607dcdeae13d04fd5c6d41da46d9c29a04206a86;p=libsigrok.git diff --git a/src/hardware/kern-scale/protocol.h b/src/hardware/kern-scale/protocol.h index a7f11d23..7566ea5b 100644 --- a/src/hardware/kern-scale/protocol.h +++ b/src/hardware/kern-scale/protocol.h @@ -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 . */ #ifndef LIBSIGROK_HARDWARE_KERN_SCALE_PROTOCOL_H @@ -27,13 +26,11 @@ struct scale_info { /** libsigrok driver info struct. */ struct sr_dev_driver di; /** Manufacturer/brand. */ - char *vendor; + const char *vendor; /** Model. */ - char *device; + const char *device; /** serialconn string. */ - char *conn; - /** Baud rate. */ - uint32_t baudrate; + const char *conn; /** Packet size in bytes. */ int packet_size; /** Packet validation function. */ @@ -47,22 +44,8 @@ struct scale_info { #define SCALE_BUFSIZE 256 -/** Private, per-device-instance driver context. */ struct dev_context { - /** The current sampling limit (in number of samples). */ - uint64_t limit_samples; - - /** The time limit (in milliseconds). */ - uint64_t limit_msec; - - /** Opaque pointer passed in by the frontend. */ - void *cb_data; - - /** The current number of already received samples. */ - uint64_t num_samples; - - /** The starting time of current sampling run. */ - int64_t starttime; + struct sr_sw_limits limits; uint8_t buf[SCALE_BUFSIZE]; int bufoffset;