Skip to main content
Renesas Electronics America - Knowledgebase

How do I check to see if a terminal is connected to the USB port when using the USB Comms module?

Last Updated:10/30/2017


How do I check for a terminal connection when using the USB comms module?


You can check to see if a USB connection is active before you try and send data to the terminal. You can do this checking the DTR bit. Here is a code snippet.
while (UX_FALSE == p_cdc_slave->p_cdc->ux_slave_class_cdc_acm_data_dtr_state) {  tx_thread_sleep(5); }
USB Comms Module