File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 4242//| """You cannot create an instance of `usb_cdc.Serial`.
4343//|
4444//| Serial objects are pre-constructed for each CDC device in the USB
45- //| descriptor and added to the ``usb_cdc.ports `` tuple."""
45+ //| descriptor and are included in the ``usb_cdc.serials `` tuple."""
4646//| ...
4747//|
4848
@@ -124,7 +124,12 @@ STATIC mp_uint_t usb_cdc_serial_ioctl_stream(mp_obj_t self_in, mp_uint_t request
124124}
125125
126126//| connected: bool
127- //| """True if this Serial is connected to a host. (read-only)"""
127+ //| """True if this Serial is connected to a host. (read-only)
128+ //|
129+ //| .. note:: The host is considered to be connected if it is asserting DTR (Data Terminal Ready).
130+ //| Most terminal programs and ``pyserial`` assert DTR when opening a serial connection.
131+ //| However, the C# ``SerialPort`` API does not. You must set ``SerialPort.DtrEnable``.
132+ //| """
128133//|
129134STATIC mp_obj_t usb_cdc_serial_get_connected (mp_obj_t self_in ) {
130135 usb_cdc_serial_obj_t * self = MP_OBJ_TO_PTR (self_in );
You can’t perform that action at this time.
0 commit comments