mltk.utils.jlink_stream.JlinkStream¶
- class JlinkStream[source]¶
This allows for transferring binary data between a Python script and a JLink-enabled embedded device via the debug interface
See the source code on Github: mltk/utils/jlink_stream
Properties
Default configuration options
Return if the device is connected
Methods
Close a device data stream
Open a connection to an embedded device via J-Link
Close the connection to the embedded device
Open a data stream to the embedded device
Process the device data streams
Read data from a data stream opened for reading
Write data to a data stream opened from writing
- __init__(options=None)[source]¶
- Parameters:
options (JlinkStreamOptions) –
- property default_options: JlinkStreamOptions¶
Default configuration options
- Return type:
- property is_connected: bool¶
Return if the device is connected
- Return type:
bool
- connect(threaded=True, reset_device=False)[source]¶
Open a connection to an embedded device via J-Link
NOTE: The embedded device must be actively running the JLink library
- open(name, mode='r')[source]¶
Open a data stream to the embedded device
- Return type:
- Parameters:
name (str) –
- read(name, max_size=None, timeout=None)[source]¶
Read data from a data stream opened for reading
- Return type:
bytes
- Parameters:
name (str) –
max_size (int) –
timeout (float) –