SR_CONF_LIMIT_MSEC | SR_CONF_SET,
};
-static GSList *rdtech_tc_scan(struct sr_dev_driver *di, const char *conn,
- const char *serialcomm)
+static GSList *rdtech_tc_scan(struct sr_dev_driver *di,
+ const char *conn, const char *serialcomm)
{
struct sr_serial_dev_inst *serial;
GSList *devices = NULL;
}
static int config_set(uint32_t key, GVariant *data,
- const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
+ const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
}
static int config_list(uint32_t key, GVariant **data,
- const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
+ const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}
std_session_send_df_header(sdi);
serial_source_add(sdi->session, serial, G_IO_IN, 50,
- rdtech_tc_receive_data, (void *)sdi);
+ rdtech_tc_receive_data, (void *)sdi);
return rdtech_tc_poll(sdi);
}
}
}
-static int process_poll_pkt(struct dev_context *devc, uint8_t *dst)
+static int process_poll_pkt(struct dev_context *devc, uint8_t *dst)
{
struct aes256_ctx ctx;
return SR_OK;
}
-SR_PRIV int rdtech_tc_probe(struct sr_serial_dev_inst *serial, struct dev_context *devc)
+SR_PRIV int rdtech_tc_probe(struct sr_serial_dev_inst *serial, struct dev_context *devc)
{
int len;
uint8_t poll_pkt[TC_POLL_LEN];
if (serial_write_blocking(serial, &POLL_CMD, sizeof(POLL_CMD) - 1,
- SERIAL_WRITE_TIMEOUT_MS) < 0) {
+ SERIAL_WRITE_TIMEOUT_MS) < 0) {
sr_err("Unable to send probe request.");
return SR_ERR;
}
struct sr_serial_dev_inst *serial = sdi->conn;
if (serial_write_blocking(serial, &POLL_CMD, sizeof(POLL_CMD) - 1,
- SERIAL_WRITE_TIMEOUT_MS) < 0) {
+ SERIAL_WRITE_TIMEOUT_MS) < 0) {
sr_err("Unable to send poll request.");
return SR_ERR;
}
for (ch = sdi->channels, i = 0; ch; ch = g_slist_next(ch), i++) {
bv_send_analog_channel(sdi, ch->data,
- &devc->channels[i], poll_pkt, TC_POLL_LEN);
- }
+ &devc->channels[i], poll_pkt, TC_POLL_LEN);
+ }
sr_sw_limits_update_samples_read(&devc->limits, 1);
}
struct rdtech_dev_info dev_info;
const struct binary_analog_channel *channels;
struct sr_sw_limits limits;
-
uint8_t buf[RDTECH_TC_BUFSIZE];
int buflen;
int64_t cmd_sent_at;
};
-SR_PRIV int rdtech_tc_probe(struct sr_serial_dev_inst *serial, struct dev_context *devc);
+SR_PRIV int rdtech_tc_probe(struct sr_serial_dev_inst *serial, struct dev_context *devc);
SR_PRIV int rdtech_tc_receive_data(int fd, int revents, void *cb_data);
SR_PRIV int rdtech_tc_poll(const struct sr_dev_inst *sdi);