Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
USBCdc Class Reference
Public Member Functions | |
| def | lock |
| def | unlock |
| def | set_line_coding |
| def | get_line_coding |
| def | send_break |
| def | read |
| def | write |
Detailed Description
Wrapper class for a CDC usb device
Definition at line 22 of file usb_cdc.py.
Member Function Documentation
| def get_line_coding | ( | self ) |
Send the GetLineCoding CDC command Returns a tuple containing baud, fmt, parity, databits
Definition at line 133 of file usb_cdc.py.
| def lock | ( | self ) |
Acquire exclisive access to CDC
Definition at line 81 of file usb_cdc.py.
| def read | ( | self, | |
| size, | |||
timeout = None |
|||
| ) |
Read from the CDC data endpoint
Definition at line 168 of file usb_cdc.py.
| def send_break | ( | self, | |
| break_time | |||
| ) |
Send the SendBreak CDC command
Definition at line 156 of file usb_cdc.py.
| def set_line_coding | ( | self, | |
| baud, | |||
fmt = FORMAT_STOP_BITS_1_0, |
|||
parity = PARITY_NONE, |
|||
databits = DATA_BITS_8 |
|||
| ) |
Send the SetLineCoding CDC command
Definition at line 112 of file usb_cdc.py.
| def unlock | ( | self ) |
Release exclusive access to CDC
Definition at line 97 of file usb_cdc.py.
| def write | ( | self, | |
| data, | |||
timeout = None |
|||
| ) |
Write to the CDC data endpoint
Definition at line 176 of file usb_cdc.py.
Generated on Tue Jul 12 2022 15:37:38 by
1.7.2