Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: openthread: Remove waiting for DTR in openthread UART. #1369

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions modules/openthread/platform/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,28 +170,13 @@ otError otPlatUartEnable(void)

if (DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_ot_uart), zephyr_cdc_acm_uart)) {
int ret;
uint32_t dtr = 0U;

ret = usb_enable(NULL);
if (ret != 0 && ret != -EALREADY) {
LOG_ERR("Failed to enable USB");
return OT_ERROR_FAILED;
}

LOG_INF("Waiting for host to be ready to communicate");

/* Data Terminal Ready - check if host is ready to communicate */
while (!dtr) {
ret = uart_line_ctrl_get(ot_uart.dev,
UART_LINE_CTRL_DTR, &dtr);
if (ret) {
LOG_ERR("Failed to get Data Terminal Ready line state: %d",
ret);
continue;
}
k_msleep(100);
}

/* Data Carrier Detect Modem - mark connection as established */
(void)uart_line_ctrl_set(ot_uart.dev, UART_LINE_CTRL_DCD, 1);
/* Data Set Ready - the NCP SoC is ready to communicate */
Expand Down