link

package
v0.63.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package link reads from SeggerRTT with the SEGGER app JLinkRTTLogger or with the open source app stRttLogger.exe.

It provides a ReadCloser interface and makes no assumptions about the delivered data. It is also agnostic concerning the RTT channel and other setup parameters.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Verbose gives more information on output if set. The value is injected from main packages.
	Verbose bool
)

Functions

This section is empty.

Types

type Device

type Device struct {
	Exec string // linkBinary is the RTT logger executable .
	Lib  string // linkDynLib is the RTT used dynamic library name.

	Err  error
	Done chan bool
	// contains filtered or unexported fields
}

Device is the RTT logger reader interface.

func NewDevice

func NewDevice(w io.Writer, fSys *afero.Afero, port, arguments string) *Device

NewDevice creates an instance of RTT ReadCloser of type Port. The Args string is used as parameter string. See SEGGER UM08001_JLink.pdf for details.

func (*Device) Close

func (p *Device) Close() error

Close is part of the exported interface io.ReadCloser. It ends the connection.

func (*Device) Open

func (p *Device) Open() error

Open starts the RTT logger command with a temporary logfile. The temporary logfile is opened for reading.

func (*Device) Read

func (p *Device) Read(b []byte) (int, error)

Read is part of the exported interface io.ReadCloser. It reads a slice of bytes.

func (*Device) Write added in v0.52.0

func (p *Device) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL