Arrow / Mbed OS DAPLink Reset
Embed: (wiki syntax)

« Back to documentation index

USBCdc Class Reference

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.