ipdbg-la: add "loggs"

This commit is contained in:
Eva Kissling 2017-09-08 16:46:32 +02:00 committed by Uwe Hermann
parent 750303aab8
commit 8f6b0eb12a
2 changed files with 15 additions and 15 deletions

View File

@ -145,7 +145,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
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;
@ -170,7 +170,7 @@ static int dev_clear(const struct sr_dev_driver *di)
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. */
@ -196,7 +196,7 @@ static int dev_close(struct sr_dev_inst *sdi)
(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)
@ -246,7 +246,7 @@ static int config_set(uint32_t key, GVariant *data,
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;
@ -324,29 +324,29 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
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. */

View File

@ -194,7 +194,7 @@ SR_PRIV int ipdbg_org_la_convert_trigger(const struct sr_dev_inst *sdi)
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;
@ -336,7 +336,7 @@ SR_PRIV int ipdbg_org_la_receive_data(int fd, int revents, void *cb_data)
if (devc->num_transfers < devc->limit_samples_max*devc->DATA_WIDTH_BYTES)
{
sr_err("1");
//sr_err("1");
unsigned char byte;
@ -350,9 +350,9 @@ SR_PRIV int ipdbg_org_la_receive_data(int fd, int revents, void *cb_data)
}
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. */
@ -561,7 +561,7 @@ SR_PRIV void ipdbg_org_la_get_addrwidth_and_datawidth(struct ipdbg_org_la_tcp *t
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 );