diff options
| author | Dan Halbert <halbert@halwitz.org> | 2021-03-07 13:49:41 -0500 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2021-03-07 14:07:07 -0500 |
| commit | 8594396a07e3841803f1f3e0ffad39c6e94f55dc (patch) | |
| tree | 2fd1efa8a95018e0135692e4ffd8a1a986baf817 /shared-bindings/usb_cdc | |
| parent | 103632f444636b03aee67541887544f0e717aab3 (diff) | |
Add caveat for usb_cdc.Serial.connected
Diffstat (limited to 'shared-bindings/usb_cdc')
| -rw-r--r-- | shared-bindings/usb_cdc/Serial.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/shared-bindings/usb_cdc/Serial.c b/shared-bindings/usb_cdc/Serial.c index c813dce5b..4913ac85a 100644 --- a/shared-bindings/usb_cdc/Serial.c +++ b/shared-bindings/usb_cdc/Serial.c @@ -42,7 +42,7 @@ //| """You cannot create an instance of `usb_cdc.Serial`. //| //| Serial objects are pre-constructed for each CDC device in the USB -//| descriptor and added to the ``usb_cdc.ports`` tuple.""" +//| descriptor and are included in the ``usb_cdc.serials`` tuple.""" //| ... //| @@ -124,7 +124,12 @@ STATIC mp_uint_t usb_cdc_serial_ioctl_stream(mp_obj_t self_in, mp_uint_t request } //| connected: bool -//| """True if this Serial is connected to a host. (read-only)""" +//| """True if this Serial is connected to a host. (read-only) +//| +//| .. note:: The host is considered to be connected if it is asserting DTR (Data Terminal Ready). +//| Most terminal programs and ``pyserial`` assert DTR when opening a serial connection. +//| However, the C# ``SerialPort`` API does not. You must set ``SerialPort.DtrEnable``. +//| """ //| STATIC mp_obj_t usb_cdc_serial_get_connected(mp_obj_t self_in) { usb_cdc_serial_obj_t *self = MP_OBJ_TO_PTR(self_in); |
