ipdbg_la_get_addrwidth_and_datawidth(tcp, devc);
- sr_dbg("addr_width = %d, data_width = %d\n", devc->ADDR_WIDTH,
- devc->DATA_WIDTH);
+ sr_dbg("addr_width = %d, data_width = %d\n", devc->addr_width,
+ devc->data_width);
sr_dbg("limit samples = %" PRIu64 "\n", devc->limit_samples_max);
- for (uint32_t i = 0; i < devc->DATA_WIDTH; i++) {
- const uint8_t buf_size = 16;
- char buf[buf_size];
- snprintf(buf, buf_size, "ch%d", i);
- sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE, buf);
+ for (uint32_t i = 0; i < devc->data_width; i++) {
+ char *name = g_strdup_printf("CH%d", i);
+ sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE, name);
+ g_free(name);
}
sdi->inst_type = SR_INST_USER;
if (devc->num_transfers > 0) {
while (devc->num_transfers <
- (devc->limit_samples_max * devc->DATA_WIDTH_BYTES)) {
+ (devc->limit_samples_max * devc->data_width_bytes)) {
ipdbg_la_tcp_receive(tcp, &byte);
devc->num_transfers++;
}