Documentation ¶
Index ¶
- Constants
- func FindUdc() []string
- type AcmFunction
- type Action
- type Config
- type EemFunction
- type Function
- type Gadget
- func (g *Gadget) Create() error
- func (g *Gadget) CreateSteps() (steps Steps)
- func (g *Gadget) Exists() bool
- func (g *Gadget) ReadConfigfsFile(elem ...string) (string, error)
- func (g *Gadget) Remove() error
- func (g *Gadget) RemoveSteps() Steps
- func (g *Gadget) ShellCreate() ShellSteps
- func (g *Gadget) ShellRemove() ShellSteps
- type HidFunction
- type MassStorageFunction
- type MassStorageLun
- type NcmFunction
- type ShellSteps
- type Step
- type Steps
- func (ss *Steps) Append(s Step) Steps
- func (steps Steps) Clone() Steps
- func (ss *Steps) Extend(more Steps) Steps
- func (steps Steps) PrependPath(path string) Steps
- func (steps Steps) Reverse() (rev Steps)
- func (steps Steps) Run() error
- func (steps Steps) ShellArgs() ShellSteps
- func (steps Steps) Undo() Steps
Constants ¶
View Source
const ( GadgetConfigBasePath = "/sys/kernel/config/usb_gadget" UdcPathGlob = "/sys/class/udc/*" StrEnglish = "0x409" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AcmFunction ¶
type AcmFunction struct {
Name string
}
AcmFunction
func (*AcmFunction) GadgetFunctionCreate ¶
func (fn *AcmFunction) GadgetFunctionCreate() Steps
func (*AcmFunction) GadgetFunctionName ¶
func (fn *AcmFunction) GadgetFunctionName() string
type EemFunction ¶
EemFunction
func (*EemFunction) GadgetFunctionCreate ¶
func (fn *EemFunction) GadgetFunctionCreate() Steps
func (*EemFunction) GadgetFunctionName ¶
func (fn *EemFunction) GadgetFunctionName() string
func (*EemFunction) Ifname ¶
func (fn *EemFunction) Ifname(g *Gadget) string
type Gadget ¶
type Gadget struct { Name string GadgetPath string IdVendor int IdProduct int SerialNumber string Manufacturer string Product string UDC string Configs []Config }
Gadget
func (*Gadget) CreateSteps ¶
func (*Gadget) RemoveSteps ¶
func (*Gadget) ShellCreate ¶
func (g *Gadget) ShellCreate() ShellSteps
func (*Gadget) ShellRemove ¶
func (g *Gadget) ShellRemove() ShellSteps
type HidFunction ¶
type HidFunction struct { Name string Protocol int Subclass int ReportLength int Descriptor []byte }
HidFunction
func (*HidFunction) GadgetFunctionCreate ¶
func (fn *HidFunction) GadgetFunctionCreate() Steps
func (*HidFunction) GadgetFunctionName ¶
func (fn *HidFunction) GadgetFunctionName() string
type MassStorageFunction ¶
type MassStorageFunction struct { Name string Luns []MassStorageLun }
MassStorageFunction
func (*MassStorageFunction) GadgetFunctionCreate ¶
func (fn *MassStorageFunction) GadgetFunctionCreate() (steps Steps)
func (*MassStorageFunction) GadgetFunctionName ¶
func (fn *MassStorageFunction) GadgetFunctionName() string
type MassStorageLun ¶
MassStorageLun
type NcmFunction ¶
NcmFunction
func (*NcmFunction) GadgetFunctionCreate ¶
func (fn *NcmFunction) GadgetFunctionCreate() Steps
func (*NcmFunction) GadgetFunctionName ¶
func (fn *NcmFunction) GadgetFunctionName() string
func (*NcmFunction) Ifname ¶
func (fn *NcmFunction) Ifname(g *Gadget) string
type ShellSteps ¶
type ShellSteps [][]string
ShellSteps
func (ShellSteps) Dump ¶
func (shs ShellSteps) Dump(w io.Writer)
type Steps ¶
type Steps []Step
Steps
func (Steps) PrependPath ¶
func (Steps) ShellArgs ¶
func (steps Steps) ShellArgs() ShellSteps
Click to show internal directories.
Click to hide internal directories.