Skip to content

Commit

Permalink
Document get_serial_ports()
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-dewar committed Mar 26, 2021
1 parent ac41e8b commit 5086505
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ OpenADC Scope

.. automethod:: chipwhisperer.capture.scopes.OpenADC.reload_fpga

.. automethod:: chipwhisperer.capture.scopes.OpenADC.get_serial_ports

.. method:: dis()

Disconnects the current scope object.
Expand Down Expand Up @@ -384,6 +386,8 @@ ChipWhisperer Nano Scope

.. automethod:: chipwhisperer.capture.scopes.cwnano.CWNano.get_last_trace

.. automethod:: chipwhisperer.capture.scopes.cwnano.CWNano.get_serial_ports

.. method:: dis()

Disconnects the current scope object.
Expand Down
6 changes: 6 additions & 0 deletions software/chipwhisperer/capture/scopes/OpenADC.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ def _getNAEUSB(self):
return self.scopetype.dev._cwusb

def get_serial_ports(self):
""" Get the CDC serial ports associated with this scope
Returns:
A list of a dict with elements {'port', 'interface'}
"""
return self._getNAEUSB().get_serial_ports()

def default_setup(self):
Expand All @@ -140,6 +145,7 @@ def default_setup(self):
* 4*7.37MHz ADC clock
* tio1 = serial rx
* tio2 = serial tx
* CDC settings change off
.. versionadded:: 5.1
Added default setup for OpenADC
Expand Down
5 changes: 5 additions & 0 deletions software/chipwhisperer/capture/scopes/cwnano.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,11 @@ def _getCWType(self):
return 'cwnano'

def get_serial_ports(self):
""" Get the CDC serial ports associated with this scope
Returns:
A list of a dict with elements {'port', 'interface'}
"""
return self._getNAEUSB().get_serial_ports()

@property
Expand Down

0 comments on commit 5086505

Please sign in to comment.