Documentation
¶
Index ¶
- type I8042
- func (c *I8042) IOPorts() []uint16
- func (c *I8042) Init(vm hv.VirtualMachine) error
- func (c *I8042) QueueKeyboardData(data byte)
- func (c *I8042) QueueKeyboardDataLocked(data byte)
- func (c *I8042) QueueMouseData(data byte)
- func (c *I8042) ReadIOPort(ctx hv.ExitContext, port uint16, data []byte) error
- func (c *I8042) Reset() error
- func (c *I8042) SetKeyboardIRQ(line chipset.LineInterrupt)
- func (c *I8042) SetKeyboardIRQFromFunc(fn func(bool))
- func (c *I8042) SetMouseIRQ(line chipset.LineInterrupt)
- func (c *I8042) Start() error
- func (c *I8042) Stop() error
- func (c *I8042) SupportsMmio() *chipset.MmioIntercept
- func (c *I8042) SupportsPollDevice() *chipset.PollDevice
- func (c *I8042) SupportsPortIO() *chipset.PortIOIntercept
- func (c *I8042) WriteIOPort(ctx hv.ExitContext, port uint16, data []byte) error
- type OutputBufferState
- type PS2Keyboard
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type I8042 ¶
type I8042 struct {
// contains filtered or unexported fields
}
I8042 implements the i8042 keyboard controller.
func (*I8042) QueueKeyboardData ¶
QueueKeyboardData queues data from the keyboard to the output buffer.
func (*I8042) QueueKeyboardDataLocked ¶
QueueKeyboardDataLocked queues data from the keyboard (must be called with mutex held).
func (*I8042) QueueMouseData ¶
QueueMouseData queues data from the mouse to the output buffer.
func (*I8042) ReadIOPort ¶
ReadIOPort implements chipset.PortIOHandler.
func (*I8042) SetKeyboardIRQ ¶
func (c *I8042) SetKeyboardIRQ(line chipset.LineInterrupt)
SetKeyboardIRQ sets the interrupt line for keyboard (IRQ1).
func (*I8042) SetKeyboardIRQFromFunc ¶
SetKeyboardIRQFromFunc sets the keyboard IRQ using a function adapter.
func (*I8042) SetMouseIRQ ¶
func (c *I8042) SetMouseIRQ(line chipset.LineInterrupt)
SetMouseIRQ sets the interrupt line for mouse (IRQ12).
func (*I8042) SupportsMmio ¶
func (c *I8042) SupportsMmio() *chipset.MmioIntercept
SupportsMmio implements chipset.ChipsetDevice.
func (*I8042) SupportsPollDevice ¶
func (c *I8042) SupportsPollDevice() *chipset.PollDevice
SupportsPollDevice implements chipset.ChipsetDevice.
func (*I8042) SupportsPortIO ¶
func (c *I8042) SupportsPortIO() *chipset.PortIOIntercept
SupportsPortIO implements chipset.ChipsetDevice.
func (*I8042) WriteIOPort ¶
WriteIOPort implements chipset.PortIOHandler.
type OutputBufferState ¶
type OutputBufferState uint8
OutputBufferState tracks what device owns the output buffer
const ( OutputBufferEmpty OutputBufferState = iota OutputBufferController OutputBufferKeyboard OutputBufferMouse )
type PS2Keyboard ¶
type PS2Keyboard struct {
// contains filtered or unexported fields
}
PS2Keyboard implements a PS/2 keyboard device.
func NewPS2Keyboard ¶
func NewPS2Keyboard() *PS2Keyboard
NewPS2Keyboard creates a new PS/2 keyboard device.
func (*PS2Keyboard) HandleCommand ¶
func (k *PS2Keyboard) HandleCommand(cmd byte) error
HandleCommand processes a command sent to the keyboard.
func (*PS2Keyboard) Reset ¶
func (k *PS2Keyboard) Reset()
Reset resets the keyboard to default state.
func (*PS2Keyboard) SendKey ¶
func (k *PS2Keyboard) SendKey(scancode byte, pressed bool)
SendKey sends a key press/release event to the keyboard.
func (*PS2Keyboard) SetController ¶
func (k *PS2Keyboard) SetController(ctrl *I8042)
SetController sets the i8042 controller this keyboard belongs to.
func (*PS2Keyboard) SetIRQ ¶
func (k *PS2Keyboard) SetIRQ(line chipset.LineInterrupt)
SetIRQ sets the interrupt line for this keyboard.