X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Frdtech-um%2Fprotocol.h;h=159031a7885c286a4f28683dbf3cf484e0f0bf27;hb=85accbc2e7c14b49039b5a9a3fc8afc169a9acc0;hp=f344f1b9eb2960e10a1664e2944a3d46f1bfae25;hpb=fda34e5af6e7a11744035c1c8df2f2b2f95cf1d8;p=libsigrok.git diff --git a/src/hardware/rdtech-um/protocol.h b/src/hardware/rdtech-um/protocol.h index f344f1b9..159031a7 100644 --- a/src/hardware/rdtech-um/protocol.h +++ b/src/hardware/rdtech-um/protocol.h @@ -33,27 +33,19 @@ enum rdtech_um_model_id { RDTECH_UM34C = 0x0d4c, }; -enum rdtech_um_checksum { - RDTECH_CSUM_STATIC_FFF1, - RDTECH_CSUM_UM34C, -}; - /* Supported device profiles */ struct rdtech_um_profile { const char *model_name; enum rdtech_um_model_id model_id; const struct binary_analog_channel *channels; - - /* Verify poll packet checksum; return 1 if OK, 0 otherwise. */ - int (*poll_csum)(char buf[], int len); + gboolean (*csum_ok)(const uint8_t *buf, size_t len); }; struct dev_context { const struct rdtech_um_profile *profile; struct sr_sw_limits limits; - - char buf[RDTECH_UM_BUFSIZE]; - int buflen; + uint8_t buf[RDTECH_UM_BUFSIZE]; + size_t buflen; int64_t cmd_sent_at; };