package
Version:
v5.0.0+incompatible
Opens a new window with list of versions in this module.
Published: Jul 10, 2019
License: BSD-3-Clause
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
In reads data from the x86 port at address addr. Data must be Uint8, Uint16,
Uint32, but not Uint64.
var data Uint8
if err := In(0x3f8, &data); err != nil {
log.Fatal(err)
}
fmt.Printf("%v\n", data)
Output:
Out writes data to the x86 port at address addr. data must be Uint8, Uint16
uint32, but not Uint64.
data := Uint8('A')
if err := Out(0x3f8, &data); err != nil {
log.Fatal(err)
}
Output:
Read reads data from physical memory at address addr. On x86 platforms,
this uses the seek+read syscalls. On arm platforms, this uses mmap.
var data Uint32
if err := Read(0x1000000, &data); err != nil {
log.Fatal(err)
}
log.Printf("%v\n", data)
Output:
Write writes data to physical memory at address addr. On x86 platforms, this
uses the seek+read syscalls. On arm platforms, this uses mmap.
data := Uint32(42)
if err := Write(0x1000000, &data); err != nil {
log.Fatal(err)
}
Output:
ByteSlice is a wrapper around []byte.
String formats a []byte in hex.
Uint16 is a wrapper around uint16.
String formats a uint16 in hex.
Uint32 is a wrapper around uint32.
String formats a uint32 in hex.
Uint64 is a wrapper around uint64.
String formats a uint64 in hex.
Uint8 is a wrapper around uint8.
String formats a uint8 in hex.
UintN is a wrapper around uint types and provides a few io-related
functions.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.