Discover Packages
github.com/9elements/u-root
pkg
memio
package
Version:
v7.0.0+incompatible
Opens a new window with list of versions in this module.
Published: Aug 31, 2020
License: BSD-3-Clause
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: ? modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
Documentation
¶
Rendered for
linux/amd64
windows/amd64
darwin/amd64
js/wasm
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)
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)
}
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)
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)
}
ByteSlice is a wrapper around []byte.
String formats a []byte in hex.
Uint8 is a wrapper around uint8.
String formats a uint8 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.
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.