pcieutil

package
v0.0.0-...-c74ab33 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package pcieutil contains utilities to read from and write to registers of a PCIe device.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PCIeMemMap

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

func NewPCIeMemMap

func NewPCIeMemMap(resourceFile string) (*PCIeMemMap, error)

NewPCIeMemMap creates a memory map for the PCIe device represented by the provided resource file.

func (*PCIeMemMap) Close

func (pcie *PCIeMemMap) Close() error

Close unmaps the memory for the PCIe device, and cleans up.

func (*PCIeMemMap) ReadAt

func (pcie *PCIeMemMap) ReadAt(offset uint32) (uint32, error)

ReadAt reads from the PCIe device register at the provided offset (should be word-aligned).

func (*PCIeMemMap) WriteAt

func (pcie *PCIeMemMap) WriteAt(offset, data uint32) error

WriteAt writes to the PCIe device register at the provided offset (should be word-aligned).

Jump to

Keyboard shortcuts

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