Function esp_idf_hal::sys::usb_serial_jtag_is_connected

source ·
pub unsafe extern "C" fn usb_serial_jtag_is_connected() -> bool
Expand description

@brief Check if the USB Serial/JTAG port is connected to the host

This function checks whether the USB Serial/JTAG (USJ) port is currently connected. USJ is considered “connected” so long as it is receiving SOF packets from the host, even if there is no serial commuincation occuring (i.e., the USJ is connected to the PC, but the serial port is not opened). Having the USB port connected to a power bank will never be considered as connected (due to the lack of SOF packets).

@note If your application needs this function, it will add some extra overhead time to every freertos tick.

@return True if USJ is connected, false otherwise