/// \function have_cdc() /// Return True if USB is connected as a serial device, False otherwise. STATIC mp_obj_t pyb_have_cdc(void ) { return MP_BOOL(usb_vcp_is_connected()); }
/// \function have_cdc() /// Return True if USB is connected as a serial device, False otherwise. STATIC mp_obj_t pyb_have_cdc(void ) { return mp_obj_new_bool(usb_vcp_is_connected()); }
mp_obj_t py_vcp_connected() { bool connected = usb_vcp_is_connected(); return mp_obj_new_int(connected); }