KolibriOS kernel
protocol.inc File Reference

Classes

struct  usb_descr
 ============================================================================= More...
 
struct  usb_device_descr
 USB device descriptor. More...
 
struct  usb_config_descr
 USB configuration descriptor. More...
 
struct  usb_interface_descr
 USB interface descriptor. More...
 
struct  usb_endpoint_descr
 USB endpoint descriptor. More...
 

Functions

void usb_new_device ()
 This function is called from controller-specific part when a new device is ready to be configured. in: ecx -> pseudo-pipe, part of usb_pipe in: esi -> usb_controller in: [esi+usb_controller.ResettingHub] is the pointer to usb_hub for device, NULL if the device is connected to the root hub in: [esi+usb_controller.ResettingPort] is the port for the device, zero-based in: [esi+usb_controller.ResettingSpeed] is the speed of the device, one of USB_SPEED_xx. out: eax = 0 <=> failed, the caller should disable the port. More...
 
void usb_set_address_request ()
 Helper procedure for usb_new_device. Allocates a new USB address and fills usb_controller.SetAddressBuffer with data for SET_ADDRESS(allocated_address) request. out: eax = 0 <=> failed Destroys edi. More...
 
void usb_set_address_callback (dword pipe, dword status, dword buffer, dword length, dword calldata)
 This procedure is called by USB stack when SET_ADDRESS request initiated by usb_new_device is completed, either successfully or unsuccessfully. Note that USB stack uses esi = pointer to usb_controller. More...
 
void usb_after_set_address ()
 This procedure is called from usb_subscription_done when the hardware cache is cleared after request from usb_set_address_callback. in: ebx -> usb_pipe. More...
 
void usb_get_descr8_callback (dword pipe, dword status, dword buffer, dword length, dword calldata)
 This procedure is called by USB stack when GET_DESCRIPTOR(DEVICE_DESCR) request initiated by usb_after_set_address is completed, either successfully or unsuccessfully. Note that USB stack uses esi = pointer to usb_controller. More...
 
void usb_after_set_endpoint_size ()
 This procedure is called from usb_subscription_done when the hardware cache is cleared after request from usb_get_descr8_callback. in: ebx -> usb_pipe. More...
 
void usb_get_descr_callback (dword pipe, dword status, dword buffer, dword length, dword calldata)
 This procedure is called by USB stack when GET_DESCRIPTOR(DEVICE) request initiated by usb_after_set_endpoint_size is completed, either successfully or unsuccessfully. More...
 
void usb_know_length_callback (dword pipe, dword status, dword buffer, dword length, dword calldata)
 This procedure is called by USB stack when GET_DESCRIPTOR(CONFIGURATION) request initiated by usb_get_descr_callback is completed, either successfully or unsuccessfully. More...
 
void usb_set_config_callback (dword pipe, dword status, dword buffer, dword length, dword calldata)
 This procedure is called by USB stack when GET_DESCRIPTOR(CONFIGURATION) request initiated by usb_know_length_callback is completed, either successfully or unsuccessfully. More...
 
void usb_got_config_callback (dword pipe, dword status, dword buffer, dword length, dword calldata)
 This procedure is called by USB stack when SET_CONFIGURATION request initiated by usb_set_config_callback is completed, either successfully or unsuccessfully. If successfully, the device is configured and ready to work, pass the device to the corresponding driver(s). More...
 

Variables

dd InterfacesData
 
dd NumInterfaces
 
dd driver
 
have You
 
db usb_hid_name
 
db usb_stor_name
 
db usb_print_name
 
db usb_other_name
 

Function Documentation

◆ usb_after_set_address()

void usb_after_set_address ( )

This procedure is called from usb_subscription_done when the hardware cache is cleared after request from usb_set_address_callback. in: ebx -> usb_pipe.

Source
bus/usb/protocol.inc:488

◆ usb_after_set_endpoint_size()

void usb_after_set_endpoint_size ( )

This procedure is called from usb_subscription_done when the hardware cache is cleared after request from usb_get_descr8_callback. in: ebx -> usb_pipe.

Source
bus/usb/protocol.inc:551

◆ usb_get_descr8_callback()

void usb_get_descr8_callback ( dword  pipe,
dword  status,
dword  buffer,
dword  length,
dword  calldata 
)

This procedure is called by USB stack when GET_DESCRIPTOR(DEVICE_DESCR) request initiated by usb_after_set_address is completed, either successfully or unsuccessfully. Note that USB stack uses esi = pointer to usb_controller.

Source
bus/usb/protocol.inc:511

◆ usb_get_descr_callback()

void usb_get_descr_callback ( dword  pipe,
dword  status,
dword  buffer,
dword  length,
dword  calldata 
)

This procedure is called by USB stack when GET_DESCRIPTOR(DEVICE) request initiated by usb_after_set_endpoint_size is completed, either successfully or unsuccessfully.

Source
bus/usb/protocol.inc:601

◆ usb_got_config_callback()

void usb_got_config_callback ( dword  pipe,
dword  status,
dword  buffer,
dword  length,
dword  calldata 
)

This procedure is called by USB stack when SET_CONFIGURATION request initiated by usb_set_config_callback is completed, either successfully or unsuccessfully. If successfully, the device is configured and ready to work, pass the device to the corresponding driver(s).

Source
bus/usb/protocol.inc:800

◆ usb_know_length_callback()

void usb_know_length_callback ( dword  pipe,
dword  status,
dword  buffer,
dword  length,
dword  calldata 
)

This procedure is called by USB stack when GET_DESCRIPTOR(CONFIGURATION) request initiated by usb_get_descr_callback is completed, either successfully or unsuccessfully.

Source
bus/usb/protocol.inc:667

◆ usb_new_device()

void usb_new_device ( )

This function is called from controller-specific part when a new device is ready to be configured. in: ecx -> pseudo-pipe, part of usb_pipe in: esi -> usb_controller in: [esi+usb_controller.ResettingHub] is the pointer to usb_hub for device, NULL if the device is connected to the root hub in: [esi+usb_controller.ResettingPort] is the port for the device, zero-based in: [esi+usb_controller.ResettingSpeed] is the speed of the device, one of USB_SPEED_xx. out: eax = 0 <=> failed, the caller should disable the port.

Source
bus/usb/protocol.inc:201

◆ usb_set_address_callback()

void usb_set_address_callback ( dword  pipe,
dword  status,
dword  buffer,
dword  length,
dword  calldata 
)

This procedure is called by USB stack when SET_ADDRESS request initiated by usb_new_device is completed, either successfully or unsuccessfully. Note that USB stack uses esi = pointer to usb_controller.

Source
bus/usb/protocol.inc:401

◆ usb_set_address_request()

void usb_set_address_request ( )

Helper procedure for usb_new_device. Allocates a new USB address and fills usb_controller.SetAddressBuffer with data for SET_ADDRESS(allocated_address) request. out: eax = 0 <=> failed Destroys edi.

Source
bus/usb/protocol.inc:362

◆ usb_set_config_callback()

void usb_set_config_callback ( dword  pipe,
dword  status,
dword  buffer,
dword  length,
dword  calldata 
)

This procedure is called by USB stack when GET_DESCRIPTOR(CONFIGURATION) request initiated by usb_know_length_callback is completed, either successfully or unsuccessfully.

Source
bus/usb/protocol.inc:754

Variable Documentation

◆ driver

dd driver
Initial value
?
Source
bus/usb/protocol.inc:804

◆ InterfacesData

dd InterfacesData
Initial value
?
Source
bus/usb/protocol.inc:802

◆ NumInterfaces

dd NumInterfaces
Initial value
?
Source
bus/usb/protocol.inc:803

◆ usb_hid_name

db usb_hid_name
Initial value
'usbhid',0
Source
bus/usb/protocol.inc:1013

◆ usb_other_name

db usb_other_name
Initial value
'usbother',0
Source
bus/usb/protocol.inc:1016

◆ usb_print_name

db usb_print_name
Initial value
'usbprint',0
Source
bus/usb/protocol.inc:1015

◆ usb_stor_name

db usb_stor_name
Initial value
'usbstor',0
Source
bus/usb/protocol.inc:1014

◆ You

have You
Initial value
changed sizeof.usb_interface_data? Modify this place too.
Source
bus/usb/protocol.inc:875