screamer

package
v0.0.0-...-66cfb83 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUSBOpenFailed          = errors.New("failed claiming USB resources")
	ErrDeviceConfigFailed     = errors.New("failed configuring device")
	ErrUnsupportedVersion     = errors.New("unsupported FPGA version")
	ErrSettingInactivityTimer = errors.New("failed setting inactivity timer")
	ErrReadingDeviceAddress   = errors.New("failed reading device address")
)

errors

Functions

This section is empty.

Types

type OpenerFunc

type OpenerFunc func(vendor, product uint16) bool

OpenerFunc predicate specifies whether to open the device with the given vendor and product identifiers.

type Screamer

type Screamer struct {
	// contains filtered or unexported fields
}

Screamer encapsulates device's USB resources.

func OpenScreamers

func OpenScreamers() ([]*Screamer, error)

OpenScreamers enumerates and opens all PCIe screamer devices on the system. Caller should Close() all returned Screamers.

func (*Screamer) Close

func (d *Screamer) Close() error

Close frees device resources.

func (*Screamer) DeviceID

func (d *Screamer) DeviceID() uint16

DeviceID returns |d|'s address.

func (*Screamer) FilterConfigSpaceTlps

func (d *Screamer) FilterConfigSpaceTlps() error

Enables filtering of TLPs addressing configuration space.

func (*Screamer) ReceiveConfigSpaceTlps

func (d *Screamer) ReceiveConfigSpaceTlps() error

Disables filtering of TLPs addressing configuration space.

type TLPController

type TLPController struct {
	// contains filtered or unexported fields
}

TLPController sends and receives TLP packets. Implements io.ReadWriter.

func NewTLPController

func NewTLPController(d *Screamer) *TLPController

NewTLPController builds a new TLPController which may be used to send and receive TLP packets. Caller should not use TLPController after calling d.Close().

func (*TLPController) Read

func (c *TLPController) Read(p []byte) (int, error)

Read synchronously reads a TLP buffer. Based on DeviceFPGA_RxTlpSynchronous().

func (*TLPController) Write

func (c *TLPController) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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