We would like use sf_el_ux_comms with 3 different links ( UART0, UART1 and USB ) in the same thread like this :
while(1)
{
comm_error = g_sf_comms_uart0.p_api->read(g_sf_comms_uart0.p_ctrl, &ucByte, 1, TX_NO_WAIT);
tx_thread_sleep(1);
….
comm_error = g_sf_comms_uart1.p_api->read(g_sf_comms_uart1.p_ctrl, &ucByte, 1, TX_NO_WAIT);
tx_thread_sleep(1);
….
comm_error = g_sf_comms_usb.p_api->read(g_sf_comms_usb.p_ctrl, &ucByte, 1, TX_NO_WAIT);
tx_thread_sleep(1);
….
}
In regards to USB driver, if we plug the cable but we don't connect with the windows driver, _sf_comms_usb.p_api->read is blocking. ( TX_NO_WAIT is not used )
And then , the thread is blocking , uart0 and uart1 don't work anymore.
How to abort the "tx wait forever" ?
Here the link to the Synergy Forum for the same problem… but I don't like the solution.
https://renesasrulz.com/synergy/f/synergy---forum/8089/g_sf_comms_usb-p_api--read-hangs
Thanks for you help