X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Frdtech-um%2Fprotocol.h;h=ac147d8c026af5eca945103aa3c47a02862caad2;hb=3ed4b109b5975b82dbf3e9f276c4e54a266634db;hp=159031a7885c286a4f28683dbf3cf484e0f0bf27;hpb=85accbc2e7c14b49039b5a9a3fc8afc169a9acc0;p=libsigrok.git diff --git a/src/hardware/rdtech-um/protocol.h b/src/hardware/rdtech-um/protocol.h index 159031a7..ac147d8c 100644 --- a/src/hardware/rdtech-um/protocol.h +++ b/src/hardware/rdtech-um/protocol.h @@ -33,17 +33,27 @@ enum rdtech_um_model_id { RDTECH_UM34C = 0x0d4c, }; -/* Supported device profiles */ +struct rdtech_um_channel_desc { + const char *name; + struct binary_value_spec spec; + struct sr_rational scale; + int digits; + enum sr_mq mq; + enum sr_unit unit; +}; + struct rdtech_um_profile { const char *model_name; enum rdtech_um_model_id model_id; - const struct binary_analog_channel *channels; + const struct rdtech_um_channel_desc *channels; + size_t channel_count; gboolean (*csum_ok)(const uint8_t *buf, size_t len); }; struct dev_context { const struct rdtech_um_profile *profile; struct sr_sw_limits limits; + struct feed_queue_analog **feeds; uint8_t buf[RDTECH_UM_BUFSIZE]; size_t buflen; int64_t cmd_sent_at; @@ -51,6 +61,6 @@ struct dev_context { SR_PRIV const struct rdtech_um_profile *rdtech_um_probe(struct sr_serial_dev_inst *serial); SR_PRIV int rdtech_um_receive_data(int fd, int revents, void *cb_data); -SR_PRIV int rdtech_um_poll(const struct sr_dev_inst *sdi); +SR_PRIV int rdtech_um_poll(const struct sr_dev_inst *sdi, gboolean force); #endif