Skip to content

Commit a46c604

Browse files
committed
Fix port argument for logging , enabled logging again for
pdin and updatead expected output of read_pd sample.
1 parent 26d99dc commit a46c604

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

samples/read_pd/README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,13 @@ Where:
3131
## Expected Output
3232

3333
```python
34-
*** Booting Zephyr OS build v3.6.0-3220-g69fa7dc2686e ***
35-
[00:00:00.366,668] <inf> read_pd: Zephyr IO-Link Master PDIn Sample Application
36-
[00:00:00.474,731] <inf> read_pd: Port [2]: Status changed
37-
[00:00:00.503,967] <inf> iol_master: Port [1] status changed to Operate
38-
[00:00:00.503,967] <inf> read_pd: Port [1]: Status changed
39-
[00:00:01.026,672] <inf> read_pd: Port [1] PDIn 0000
40-
[00:00:01.062,683] <inf> iol_master: Port [2] status changed to Operate
41-
[00:00:01.062,713] <inf> read_pd: Port [2]: Status changed
42-
[00:00:01.067,932] <inf> read_pd: Port [2] PDIn 0000
43-
[00:00:02.059,936] <inf> read_pd: Port [1] PDIn 0000
34+
*** Booting Zephyr OS build ***
35+
[00:00:00.362,121] <inf> read_pd: Zephyr IO-Link Master PDIn Sample Application
36+
[00:00:00.499,084] <inf> read_pd: Port [1] Operate: VID 123 DID 123
37+
[00:00:01.021,820] <inf> read_pd: Port [1] PDIn 0000
38+
[00:00:01.057,464] <inf> read_pd: Port [2] Operate: VID 123 DID 123
39+
[00:00:01.062,683] <inf> read_pd: Port [2] PDIn 0000
40+
[00:00:01.269,561] <inf> read_pd: Port [2] Event type: warning mode: appears code 1234
41+
[00:00:02.055,084] <inf> read_pd: Port [1] PDIn 0000
42+
[00:00:02.096,038] <inf> read_pd: Port [2] PDIn 10f0
4443
```

samples/read_pd/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ void iolm_port_event_cb(uint8_t port, enum iolm_port_evt evt, void *data, void *
6161
for (size_t i = 0; i < pd_data->len; i++) {
6262
sprintf(pdin_data + (i * 2), "%02x", pd_data->data[i]);
6363
}
64-
//LOG_INF("Port [%d] PDIn %s", port, pdin_data);
64+
LOG_INF("Port [%d] PDIn %s", port, pdin_data);
6565
last_print[port_idx] = current_time;
6666
break;
6767
}
6868
case IOLM_PORT_STATUS:
6969
{
7070
const arg_block_portstatuslist_t * status_list = (arg_block_portstatuslist_t *)data;
7171
if (status_list->port_status_info == IOLINK_PORT_STATUS_INFO_OP) {
72-
LOG_INF("Port [%d] Operate: VID %x DID %x", status_list->vendorid,status_list->deviceid);
72+
LOG_INF("Port [%d] Operate: VID %x DID %x", port,status_list->vendorid,status_list->deviceid);
7373
}
7474
if (status_list->port_status_info == IOLINK_PORT_STATUS_INFO_NO_DEV) {
7575
LOG_WRN("Port [%d] COM Lost", port);

0 commit comments

Comments
 (0)