Exemple #1
0
/// \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());
}
Exemple #2
0
/// \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());
}
Exemple #3
0
mp_obj_t py_vcp_connected() {
    bool connected = usb_vcp_is_connected();
    return mp_obj_new_int(connected);
}