Skip to content

Commit e1bc854

Browse files
committed
stm32/usb: Fix broken pyb.have_cdc() so it works again.
1 parent e638def commit e1bc854

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ports/stm32/usb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_usb_vcp_isconnected_obj, pyb_usb_vcp_isconn
389389

390390
// deprecated in favour of USB_VCP.isconnected
391391
STATIC mp_obj_t pyb_have_cdc(void) {
392-
return pyb_usb_vcp_isconnected(MP_OBJ_NULL);
392+
return pyb_usb_vcp_isconnected(MP_OBJ_FROM_PTR(&pyb_usb_vcp_obj));
393393
}
394394
MP_DEFINE_CONST_FUN_OBJ_0(pyb_have_cdc_obj, pyb_have_cdc);
395395

0 commit comments

Comments
 (0)