Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ShowInputBytes displays incoming bytes if set true. ShowInputBytes bool // Port is the trice receiver to use. Port string // PortArguments are the trice receiver device specific arguments. PortArguments string // DefaultLinkArgs replaces "default" args value for ST-LINK and J-LINK port. DefaultLinkArgs = "-Device STM32F030R8 -if SWD -Speed 4000 -RTTChannel 0 -RTTSearchRanges 0x20000000_0x1000" // DefaultCOMArgs replaces "default" args value for serial port. DefaultCOMArgs = "" // DefaultTCP4Args replaces "default" args value for TCP4 port. DefaultTCP4Args = "localhost:17001" // OpenOCD starts a server on localhost:17001 where it dumps all RTT messages. // DefaultFileArgs replaces "default" args value for FILE port. DefaultFileArgs = "trices.raw" // DefaultBUFFERArgs replaces "default" args value for BUFFER port. DefaultBUFFERArgs = "0 0 0 0" // DefaultDumpArgs replaces "default" args value for BUFFER port. DefaultDumpArgs = "" // Verbose gives mor information on output if set. The value is injected from main packages. Verbose bool )
Functions ¶
func NewBytesViewer ¶ added in v0.18.4
func NewBytesViewer(w io.Writer, from io.ReadCloser) (in io.ReadCloser)
NewBytesViewer returns a ReadCloser `in` which is internally using reader `from`. Calling the `in` Read method leads to internally calling the `from` Read method but lets to do some additional action like logging
func NewFileReader ¶ added in v0.48.0
func NewReadCloser ¶ added in v0.18.4
NewReadCloser returns a ReadCloser for the specified port and its args. err is nil on successful open. When port is "COMn" args can be used to be "TARM" to use a different driver for dynamic testing. When port is "DUMP", args is expected to be a space or comma separated hex print like "09 a1 fe" When port is "BUFFER", args is expected to be a decimal byte sequence in the same format as for example coming from one of the other ports. When port is "JLINK" args contains JLinkRTTLogger.exe specific parameters described inside UM08001_JLink.pdf. When port is "STLINK" args has the same format as for "JLINK"
func NewTCP4Connection ¶ added in v0.48.0
Types ¶
This section is empty.