Home ⌂Doc Index ◂Up ▴

eric6.MicroPython.EspDevices

Module implementing some utility functions and the MicroPythonDevice base class.

Global Attributes

None

Classes

EspDevice Class implementing the device for ESP32 and ESP8266 based boards.

Functions

None


EspDevice

Class implementing the device for ESP32 and ESP8266 based boards.

Derived from

MicroPythonDevice

Class Attributes

None

Class Methods

None

Methods

EspDevice Constructor
__backupFlash Private slot to backup the currently flashed firmware.
__eraseFlash Private slot to erase the device flash memory.
__flashAddons Private slot to flash some additional firmware images.
__flashMicroPython Private slot to flash a MicroPython firmware to the device.
__installEspTool Private slot to install the esptool package via pip.
__resetDevice Private slot to reset the connected device.
__restoreFlash Private slot to restore a previously saved firmware.
__showChipID Private slot to show the ID of the ESP chip.
__showFlashID Private slot to show the ID of the ESP flash chip.
__showMACAddress Private slot to show the MAC address of the ESP chip.
addDeviceMenuEntries Public method to add device specific entries to the given menu.
canRunScript Public method to determine, if a script can be executed.
canStartFileManager Public method to determine, if a File Manager can be started.
canStartPlotter Public method to determine, if a Plotter can be started.
canStartRepl Public method to determine, if a REPL can be started.
deviceName Public method to get the name of the device.
forceInterrupt Public method to determine the need for an interrupt when opening the serial connection.
getDocumentationUrl Public method to get the device documentation URL.
getFirmwareUrl Public method to get the device firmware download URL.
runScript Public method to run the given Python script.
setButtons Public method to enable the supported action buttons.

Static Methods

None

EspDevice (Constructor)

EspDevice(microPythonWidget, parent=None)

Constructor

microPythonWidget (MicroPythonWidget)
reference to the main MicroPython widget
parent (QObject)
reference to the parent object

EspDevice.__backupFlash

__backupFlash()

Private slot to backup the currently flashed firmware.

EspDevice.__eraseFlash

__eraseFlash()

Private slot to erase the device flash memory.

EspDevice.__flashAddons

__flashAddons()

Private slot to flash some additional firmware images.

EspDevice.__flashMicroPython

__flashMicroPython()

Private slot to flash a MicroPython firmware to the device.

Raises ValueError:
raised to indicate an unsupported chip type

EspDevice.__installEspTool

__installEspTool()

Private slot to install the esptool package via pip.

EspDevice.__resetDevice

__resetDevice()

Private slot to reset the connected device.

EspDevice.__restoreFlash

__restoreFlash()

Private slot to restore a previously saved firmware.

EspDevice.__showChipID

__showChipID()

Private slot to show the ID of the ESP chip.

EspDevice.__showFlashID

__showFlashID()

Private slot to show the ID of the ESP flash chip.

EspDevice.__showMACAddress

__showMACAddress()

Private slot to show the MAC address of the ESP chip.

EspDevice.addDeviceMenuEntries

addDeviceMenuEntries(menu)

Public method to add device specific entries to the given menu.

menu (QMenu)
reference to the context menu

EspDevice.canRunScript

canRunScript()

Public method to determine, if a script can be executed.

Returns:
tuple containing a flag indicating it is safe to start a Plotter and a reason why it cannot.
Return Type:
tuple of (bool, str)

EspDevice.canStartFileManager

canStartFileManager()

Public method to determine, if a File Manager can be started.

Returns:
tuple containing a flag indicating it is safe to start a File Manager and a reason why it cannot.
Return Type:
tuple of (bool, str)

EspDevice.canStartPlotter

canStartPlotter()

Public method to determine, if a Plotter can be started.

Returns:
tuple containing a flag indicating it is safe to start a Plotter and a reason why it cannot.
Return Type:
tuple of (bool, str)

EspDevice.canStartRepl

canStartRepl()

Public method to determine, if a REPL can be started.

Returns:
tuple containing a flag indicating it is safe to start a REPL and a reason why it cannot.
Return Type:
tuple of (bool, str)

EspDevice.deviceName

deviceName()

Public method to get the name of the device.

Returns:
name of the device
Return Type:
str

EspDevice.forceInterrupt

forceInterrupt()

Public method to determine the need for an interrupt when opening the serial connection.

Returns:
flag indicating an interrupt is needed
Return Type:
bool

EspDevice.getDocumentationUrl

getDocumentationUrl()

Public method to get the device documentation URL.

Returns:
documentation URL of the device
Return Type:
str

EspDevice.getFirmwareUrl

getFirmwareUrl()

Public method to get the device firmware download URL.

Returns:
firmware download URL of the device
Return Type:
str

EspDevice.runScript

runScript(script)

Public method to run the given Python script.

script (str)
script to be executed

EspDevice.setButtons

setButtons()

Public method to enable the supported action buttons.

Up



Home ⌂Doc Index ◂Up ▴