Documentation ¶
Index ¶
- func ArchIn(addr uint16, data UintN) error
- func ArchOut(addr uint16, data UintN) error
- func In(addr uint16, data UintN) error
- func Out(addr uint16, data UintN) error
- func Read(addr int64, data UintN) error
- func Write(addr int64, data UintN) error
- type ArchPort
- type ByteSlice
- type LinuxPort
- type MMap
- type Port
- type PortReadWriter
- type PortReader
- type PortWriter
- type ReadWriteCloser
- type Reader
- type Uint16
- type Uint32
- type Uint64
- type Uint8
- type UintN
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func In ¶
In is deprecated. Only here for compatibility. Use NewPort() and the interface functions instead.
func Out ¶
Out is deprecated. Only here for compatibility. Use NewPort() and the interface functions instead.
Types ¶
type ArchPort ¶ added in v0.9.0
type ArchPort struct{}
ArchPort is used for architectural access to a port, instead of file system level access. On the x86, this means direct, in-line in[bwl]/out[bwl] instructions, requiring an iopl system call. On other architectures, it may require special mmap setup.
type LinuxPort ¶ added in v0.9.0
type LinuxPort struct {
ReadWriteCloser
}
LinuxPort implements ReadWriteCloser for Linux devices.
func NewPort ¶ added in v0.9.0
NewPort returns a new instance of LinuxPort for read/write operations on /dev/port
type MMap ¶ added in v0.9.0
MMap is a struct containing an os.File and an interface to system calls to manage mapped files.
func NewMMap ¶ added in v0.9.0
NewMMap returns an Mmap for a file (usually a device) passed as a string.
type Port ¶ added in v0.9.0
Port implements memory and IO port access via an os.File.
func NewMemIOPort ¶ added in v0.9.0
NewMemIOPort returns a Port, given an os.File.
type PortReadWriter ¶ added in v0.9.0
type PortReadWriter interface { PortReader PortWriter io.Closer }
PortReadWriter implements io.ReadWriter for IO ports.
type PortReader ¶ added in v0.9.0
PortReader is the interface for IO port read access.
type PortWriter ¶ added in v0.9.0
PortWriter is the interface for IO port write access.
type ReadWriteCloser ¶ added in v0.9.0
ReadWriteCloser implements io.ReadWriteCloser