# eric7.MicroPython.Devices.__init__

Package containing the device interface modules and device specific dialogs.

### Global Attributes

FirmwareGithubUrls
IgnoredBoards
SupportedBoards

### Classes

None

### Functions

getDevice | Public method to instantiate a specific MicroPython device interface.
getDeviceIcon | Function to get the icon for the given board.
getFoundDevices | Function to check the serial ports for supported MicroPython devices.
getSupportedDevices | Function to get a list of supported MicroPython devices.

## getDevice

getDevice(deviceType, microPythonWidget, vid, pid, boardName="", serialNumber="")

Public method to instantiate a specific MicroPython device interface.

deviceType (str)
  type of the device interface
microPythonWidget (MicroPythonWidget)
  reference to the main MicroPython widget
vid (int)
  vendor ID (only used for deviceType 'generic')
pid (int)
  product ID (only used for deviceType 'generic')
boardName (str (optional))
  name of the board (defaults to "")
serialNumber (str (optional))
  serial number of the board (defaults to "")

Return:
  instantiated device interface

Return Type:
  BaseDevice

Up

## getDeviceIcon

getDeviceIcon(boardName, iconFormat=True)

Function to get the icon for the given board.

boardName (str)
  name of the board
iconFormat (bool)
  flag indicating to get an icon or a pixmap

Return:
  icon for the board (iconFormat == True) or a pixmap (iconFormat == False)

Return Type:
  QIcon or QPixmap

Up

## getFoundDevices

getFoundDevices()

Function to check the serial ports for supported MicroPython devices.

Return:
  tuple containing a list of tuples with the board type, the port description, a description, the serial port it is connected at, the VID and PID for known device types, a list of tuples with VID, PID and description for unknown devices and a list of tuples with VID, PID, description and port name for ports with missing VID or PID

Return Type:
  tuple of (list of tuples of (str, str, str, str, int, int), list of tuples of (int, int, str), list of tuples of (int, int, str, str)

Up

## getSupportedDevices

getSupportedDevices()

Function to get a list of supported MicroPython devices.

Return:
  set of tuples with the board type and description

Return Type:
  set of tuples of (str, str)

Up