Classes | |
struct | usb_hub |
============================================================================= More... | |
struct | usb_hub_descr |
Hub descriptor. More... | |
Functions | |
void | usb_hub_init () |
This procedure is called when new hub is detected. It initializes the device. Technically, initialization implies sending several USB queries, so it is split in several procedures. The first is usb_hub_init, other are callbacks which will be called at some time in the future, when the device will respond. edx = usb_interface_descr, ecx = length rest. More... | |
void | usb_hub_got_config (dword pipe, dword status, dword buffer, dword length, dword calldata) |
This procedure is called when the request for the hub descriptor initiated by usb_hub_init is finished, either successfully or unsuccessfully. More... | |
void | usb_hub_port_powered (dword pipe, dword status, dword buffer, dword length, dword calldata) |
This procedure is called when the request to power up some port is completed, either successfully or unsuccessfully. More... | |
void | usb_hub_wait_change () |
Requests notification about any changes in hub/ports configuration. Called when initial configuration is done and when a previous notification has been processed. More... | |
void | usb_hub_changed (dword pipe, dword status, dword buffer, dword length, dword calldata) |
This procedure is called when something has changed on the hub. More... | |
void | usb_hub_status (dword pipe, dword status, dword buffer, dword length, dword calldata) |
This procedure is called when the request of hub status is completed, either successfully or unsuccessfully. More... | |
void | usb_hub_change_cleared (dword pipe, dword status, dword buffer, dword length, dword calldata) |
This procedure is called when the request to clear hub change is completed, either successfully or unsuccessfully. More... | |
void | usb_hub_port_status (dword pipe, dword status, dword buffer, dword length, dword calldata) |
This procedure is called when the request of port status is completed, either successfully or unsuccessfully. More... | |
void | usb_hub_store_connected_time () |
Helper procedure to store current time in ConnectedTime, advancing -1 to zero if needed. More... | |
void | usb_hub_clear_port_change () |
Helper procedure for several parts of hub code. Sends a request to clear the given feature of the port. eax -> usb_hub, cl = feature; as is should be called from async code, sync code should set edx to ConfigBuffer and call usb_hub_clear_port_change.buffer; port number (1-based) should be filled in [edx+4] by previous requests. More... | |
void | usb_hub_port_changed (dword pipe, dword status, dword buffer, dword length, dword calldata) |
This procedure is called when the request to clear port change is completed, either successfully or unsuccessfully. More... | |
void | usb_hub_process_deferred () |
This procedure is called in the USB thread from usb_thread_proc, contains synchronous code which should be activated at certain time (e.g. reset a recently connected device after debounce interval 100ms). Returns the number of ticks when it should be called next time. More... | |
void | usb_hub_reset_aborted () |
Helper procedure for other code. Called when reset process is aborted. More... | |
void | usb_hub_query_port_status () |
Helper procedure for usb_hub_process_deferred. Sends a request to query port status. esi -> usb_hub, eax = callback, ecx = 1-based port. More... | |
void | usb_hub_connect_port_status (dword pipe, dword status, dword buffer, dword length, dword calldata) |
This procedure is called when the request to query port status initiated by usb_hub_process_deferred for testing connection is completed, either successfully or unsuccessfully. More... | |
void | usb_hub_resetting_port_status (dword pipe, dword status, dword buffer, dword length, dword calldata) |
This procedure is called when the request to query port status initiated by usb_hub_process_deferred for testing reset status is completed, either successfully or unsuccessfully. More... | |
void | usb_hub_initiate_reset () |
Helper procedure for usb_hub_process_deferred. Initiates reset signalling on the current port (given by 1-based value [ConfigBuffer+4]). esi -> usb_hub, eax -> usb_controller. More... | |
void | usb_hub_reset_started (dword pipe, dword status, dword buffer, dword length, dword calldata) |
This procedure is called when the request to start reset signalling initiated by usb_hub_initiate_reset is completed, either successfully or unsuccessfully. More... | |
void | usb_hub_disable_resetting_port () |
This procedure is called by the protocol layer if something has failed during initial stages of the configuration process, so the device should be disabled at hub level. More... | |
void | usb_hub_disconnect () |
This procedure is called when the hub is disconnected. More... | |
void | usb_get_tt_think_time () |
Helper function for USB2 scheduler. in: eax -> usb_hub out: ecx = TT think time for the hub in FS-bytes. More... | |
Variables | |
label | usb_hub_callbacks |
Implementation of struct USBFUNC for hubs. More... | |
label | usb_hub_callbacks_end |
dd | usb_hub_pseudosrv |
dd | _pipe |
handle of the config pipe More... | |
dd | _config |
pointer to usb_config_descr More... | |
dd | _interface |
pointer to usb_interface_descr More... | |
dd | _hubdata |
void usb_get_tt_think_time | ( | ) |
Helper function for USB2 scheduler. in: eax -> usb_hub out: ecx = TT think time for the hub in FS-bytes.
void usb_hub_change_cleared | ( | dword | pipe, |
dword | status, | ||
dword | buffer, | ||
dword | length, | ||
dword | calldata | ||
) |
This procedure is called when the request to clear hub change is completed, either successfully or unsuccessfully.
void usb_hub_changed | ( | dword | pipe, |
dword | status, | ||
dword | buffer, | ||
dword | length, | ||
dword | calldata | ||
) |
This procedure is called when something has changed on the hub.
void usb_hub_clear_port_change | ( | ) |
Helper procedure for several parts of hub code. Sends a request to clear the given feature of the port. eax -> usb_hub, cl = feature; as is should be called from async code, sync code should set edx to ConfigBuffer and call usb_hub_clear_port_change.buffer; port number (1-based) should be filled in [edx+4] by previous requests.
void usb_hub_connect_port_status | ( | dword | pipe, |
dword | status, | ||
dword | buffer, | ||
dword | length, | ||
dword | calldata | ||
) |
This procedure is called when the request to query port status initiated by usb_hub_process_deferred for testing connection is completed, either successfully or unsuccessfully.
void usb_hub_disable_resetting_port | ( | ) |
This procedure is called by the protocol layer if something has failed during initial stages of the configuration process, so the device should be disabled at hub level.
void usb_hub_disconnect | ( | ) |
This procedure is called when the hub is disconnected.
void usb_hub_got_config | ( | dword | pipe, |
dword | status, | ||
dword | buffer, | ||
dword | length, | ||
dword | calldata | ||
) |
This procedure is called when the request for the hub descriptor initiated by usb_hub_init is finished, either successfully or unsuccessfully.
void usb_hub_init | ( | ) |
This procedure is called when new hub is detected. It initializes the device. Technically, initialization implies sending several USB queries, so it is split in several procedures. The first is usb_hub_init, other are callbacks which will be called at some time in the future, when the device will respond. edx = usb_interface_descr, ecx = length rest.
void usb_hub_initiate_reset | ( | ) |
Helper procedure for usb_hub_process_deferred. Initiates reset signalling on the current port (given by 1-based value [ConfigBuffer+4]). esi -> usb_hub, eax -> usb_controller.
void usb_hub_port_changed | ( | dword | pipe, |
dword | status, | ||
dword | buffer, | ||
dword | length, | ||
dword | calldata | ||
) |
This procedure is called when the request to clear port change is completed, either successfully or unsuccessfully.
void usb_hub_port_powered | ( | dword | pipe, |
dword | status, | ||
dword | buffer, | ||
dword | length, | ||
dword | calldata | ||
) |
This procedure is called when the request to power up some port is completed, either successfully or unsuccessfully.
void usb_hub_port_status | ( | dword | pipe, |
dword | status, | ||
dword | buffer, | ||
dword | length, | ||
dword | calldata | ||
) |
This procedure is called when the request of port status is completed, either successfully or unsuccessfully.
void usb_hub_process_deferred | ( | ) |
This procedure is called in the USB thread from usb_thread_proc, contains synchronous code which should be activated at certain time (e.g. reset a recently connected device after debounce interval 100ms). Returns the number of ticks when it should be called next time.
void usb_hub_query_port_status | ( | ) |
Helper procedure for usb_hub_process_deferred. Sends a request to query port status. esi -> usb_hub, eax = callback, ecx = 1-based port.
void usb_hub_reset_aborted | ( | ) |
Helper procedure for other code. Called when reset process is aborted.
void usb_hub_reset_started | ( | dword | pipe, |
dword | status, | ||
dword | buffer, | ||
dword | length, | ||
dword | calldata | ||
) |
This procedure is called when the request to start reset signalling initiated by usb_hub_initiate_reset is completed, either successfully or unsuccessfully.
void usb_hub_resetting_port_status | ( | dword | pipe, |
dword | status, | ||
dword | buffer, | ||
dword | length, | ||
dword | calldata | ||
) |
This procedure is called when the request to query port status initiated by usb_hub_process_deferred for testing reset status is completed, either successfully or unsuccessfully.
void usb_hub_status | ( | dword | pipe, |
dword | status, | ||
dword | buffer, | ||
dword | length, | ||
dword | calldata | ||
) |
This procedure is called when the request of hub status is completed, either successfully or unsuccessfully.
void usb_hub_store_connected_time | ( | ) |
Helper procedure to store current time in ConnectedTime, advancing -1 to zero if needed.
void usb_hub_wait_change | ( | ) |
Requests notification about any changes in hub/ports configuration. Called when initial configuration is done and when a previous notification has been processed.
dd _config |
dd _hubdata |
dd _interface |
dd _pipe |
handle of the config pipe
label usb_hub_callbacks |
Implementation of struct USBFUNC for hubs.
label usb_hub_callbacks_end |
dd usb_hub_pseudosrv |