link

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: MIT Imports: 9 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 assumptiona 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 mor 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(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) ErrorFatal

func (p *Device) ErrorFatal()

ErrorFatal ends in osExit(1) if p.Err not nil.

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.

Jump to

Keyboard shortcuts

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