KolibriOS kernel
usb_hardware_func Struct Reference

Description of controller-specific data and functions. More...

Public Attributes

dd Version
 
dd ID
 
dd DataSize
 
dd BeforeInit
 
dd Init
 
dd ProcessDeferred
 
dd SetDeviceAddress
 
dd GetDeviceAddress
 
dd PortDisable
 
dd InitiateReset
 
dd SetEndpointPacketSize
 
dd AllocPipe
 
dd FreePipe
 
dd InitPipe
 
dd UnlinkPipe
 
dd AllocTD
 
dd FreeTD
 
dd AllocTransfer
 
dd InsertTransfer
 
dd NewDevice
 
dd DisablePipe
 
dd EnablePipe
 

Detailed Description

Description of controller-specific data and functions.

Source
bus/usb/common.inc:77

Member Data Documentation

◆ AllocPipe

dd usb_hardware_func::AllocPipe

in: esi -> usb_controller, ebx -> usb_pipe, ecx = packet size

◆ AllocTD

dd usb_hardware_func::AllocTD

esi -> usb_controller, ebx -> usb_pipe

◆ AllocTransfer

dd usb_hardware_func::AllocTransfer

void stdcall with one argument = pointer to previously allocated usb_gtd

◆ BeforeInit

dd usb_hardware_func::BeforeInit

◆ DataSize

dd usb_hardware_func::DataSize

sizeof(*hci_controller)

◆ DisablePipe

dd usb_hardware_func::DisablePipe

Initiate configuration of a new device (create pseudo-pipe describing that device and call usb_new_device). esi -> usb_controller, eax = speed (one of USB_SPEED_* constants).

◆ EnablePipe

dd usb_hardware_func::EnablePipe

This procedure temporarily removes the given pipe from hardware queue. esi -> usb_controller, ebx -> usb_pipe

◆ FreePipe

dd usb_hardware_func::FreePipe

out: eax = pointer to allocated usb_pipe

◆ FreeTD

dd usb_hardware_func::FreeTD

out: eax = pointer to allocated usb_gtd

◆ GetDeviceAddress

dd usb_hardware_func::GetDeviceAddress

in: esi -> usb_controller, ebx -> usb_pipe, cl = address

◆ ID

dd usb_hardware_func::ID

'*HCI'

◆ Init

dd usb_hardware_func::Init

Early initialization: take ownership from BIOS. in: [ebp-4] = (bus shl 8) + devfn

◆ InitiateReset

dd usb_hardware_func::InitiateReset

Disable the given port in the root hub. in: esi -> usb_controller, ecx = port (zero-based)

◆ InitPipe

dd usb_hardware_func::InitPipe

void stdcall with one argument = pointer to previously allocated usb_pipe

◆ InsertTransfer

dd usb_hardware_func::InsertTransfer

Allocate and initialize one stage of a transfer. ebx -> usb_pipe, other parameters are passed through the stack: buffer,size = data to transfer flags = same as in usb_open_pipe: bit 0 = allow short transfer, other bits reserved td = pointer to the current end-of-queue descriptor direction = 0000b for normal transfers, 1000b for control SETUP transfer, 1101b for control OUT transfer, 1110b for control IN transfer returns eax = pointer to the new end-of-queue descriptor (not included in the queue itself) or 0 on error

◆ NewDevice

dd usb_hardware_func::NewDevice

Activate previously initialized transfer (maybe with multiple stages). esi -> usb_controller, ebx -> usb_pipe, [esp+4] -> first usb_gtd for the transfer, ecx -> last descriptor for the transfer

◆ PortDisable

dd usb_hardware_func::PortDisable

in: esi -> usb_controller, ebx -> usb_pipe out: eax = address

◆ ProcessDeferred

dd usb_hardware_func::ProcessDeferred

Initialize controller-specific part of controller data. in: eax -> *hci_controller to initialize, [ebp-4] = (bus shl 8) + devfn out: eax = 0 <=> failed, otherwise eax -> usb_controller

◆ SetDeviceAddress

dd usb_hardware_func::SetDeviceAddress

Called regularly from the main loop of USB thread (either due to timeout from a previous call, or due to explicit wakeup). in: esi -> usb_controller out: eax = maximum timeout for next call (-1 = infinity)

◆ SetEndpointPacketSize

dd usb_hardware_func::SetEndpointPacketSize

Start reset signalling on the given port. in: esi -> usb_controller, ecx = port (zero-based)

◆ UnlinkPipe

dd usb_hardware_func::UnlinkPipe

in: edi -> usb_pipe for target, ecx -> usb_pipe for config pipe, esi -> usb_controller, eax -> usb_gtd for the first TD, [ebp+12] = endpoint, [ebp+16] = maxpacket, [ebp+20] = type

◆ Version

dd usb_hardware_func::Version

must be USBHC_VERSION


The documentation for this struct was generated from the following file: