static int dev_clear(const struct sr_dev_driver *di)
{
- sr_err("dev_clear\n");
+ //sr_err("dev_clear\n");
struct drv_context *drvc = di->context;
struct sr_dev_inst *sdi;
static int dev_open(struct sr_dev_inst *sdi)
{
- sr_err("dev_open\n");
+ //sr_err("dev_open\n");
(void)sdi;
/* TODO: get handle from sdi->conn and open it. */
(void)sdi;
/* TODO: get handle from sdi->conn and close it. */
- sr_err("dev_close\n");
+ //sr_err("dev_close\n");
/// should be called before a new call to scan()
struct ipdbg_org_la_tcp *tcp = sdi->conn;
if(tcp)
if (sdi->status != SR_ST_ACTIVE)
return SR_ERR_DEV_CLOSED;
- sr_err("config_set\n");
+ //sr_err("config_set\n");
struct ipdbg_org_la_dev_context *devc = sdi->priv;
ret = SR_OK;
struct ipdbg_org_la_dev_context *devc = sdi->priv;
ipdbg_org_la_convert_trigger(sdi);
- sr_err("dev_acquisition_start\n");
+ //sr_err("dev_acquisition_start\n");
/* Send Triggerkonviguration */
ipdbg_org_la_sendTrigger(devc, tcp);
- sr_err("dev_acquisition_start1\n");
+ //sr_err("dev_acquisition_start1\n");
/* Send Delay */
ipdbg_org_la_sendDelay(devc, tcp);
- sr_err("dev_acquisition_start2\n");
+ //sr_err("dev_acquisition_start2\n");
//std_session_send_df_header(sdi, LOG_PREFIX);
std_session_send_df_header(sdi);
- sr_err("dev_acquisition_start3\n");
+ //sr_err("dev_acquisition_start3\n");
/* If the device stops sending for longer than it takes to send a byte,
* that means it's finished. But wait at least 100 ms to be safe.
*/
//sr_session_source_add(sdi->session, -1, G_IO_IN, 100, ipdbg_receive_data, (struct sr_dev_inst *)sdi);
//sr_session_source_add(sdi->session, -1, G_IO_IN, 100, ipdbg_org_la_receive_data, NULL);
sr_session_source_add(sdi->session, tcp->socket, G_IO_IN, 100, ipdbg_org_la_receive_data, (struct sr_dev_inst *)sdi);
- sr_err("dev_acquisition_start4\n");
+ //sr_err("dev_acquisition_start4\n");
ipdbg_org_la_sendStart(tcp);
- sr_err("dev_acquisition_start5\n");
+ //sr_err("dev_acquisition_start5\n");
/* TODO: configure hardware, reset acquisition state, set up
* callbacks and send header packet. */
devc->trigger_mask_last[i] = 0;
devc->trigger_value_last[i] = 0;
}
- sr_err("\nDATA_WITH_BYTES:%i\n",devc->DATA_WIDTH_BYTES);
+ //sr_err("\nDATA_WITH_BYTES:%i\n",devc->DATA_WIDTH_BYTES);
// devc->trigger_value[0] = 0x00;
// devc->trigger_value_last[0] = 0xff;
if (devc->num_transfers < devc->limit_samples_max*devc->DATA_WIDTH_BYTES)
{
- sr_err("1");
+ //sr_err("1");
unsigned char byte;
}
else
{
- sr_err("Received %d bytes", devc->num_transfers);
+ //sr_err("Received %d bytes", devc->num_transfers);
- sr_dbg("Received %d bytes.", devc->num_transfers);
+ //sr_dbg("Received %d bytes.", devc->num_transfers);
if (devc->delay_value > 0) {
/* There are pre-trigger samples, send those first. */
devc->ADDR_WIDTH_BYTES = (devc->ADDR_WIDTH+HOST_WORD_SIZE -1)/HOST_WORD_SIZE;
devc->limit_samples_max = (0x01 << devc->ADDR_WIDTH);
devc->limit_samples = (0x01 << HOST_WORD_SIZE);
- //sr_warn("DATA_WIDTH_BYTES: %d ADDR_WIDTH_BYTES : %d", devc->DATA_WIDTH_BYTES, devc->ADDR_WIDTH_BYTES);
+ //sr_err("DATA_WIDTH_BYTES: %d ADDR_WIDTH_BYTES : %d LIMIT_SAMPLES: %d", devc->DATA_WIDTH_BYTES, devc->ADDR_WIDTH_BYTES, devc->limit_samples );