KolibriOS kernel
pipe.inc File Reference

Macros

#define stdcall_verify(arg)
 

Functions

void usb_init_static_endpoint ()
 Initialization of usb_static_ep structure, called from controller-specific initialization; edi -> usb_static_ep. More...
 
void usb_open_pipe (dword config_pipe, dword endpoint, dword maxpacket, dword type, dword interval)
 Part of API for drivers, see documentation for USBOpenPipe. More...
 
void usb_reinit_pipe_list ()
 This procedure is called several times during initial device configuration, when usb_device_data structure is reallocated. It (re)initializes all pointers in usb_device_data. ebx -> usb_pipe. More...
 
void usb_close_pipe ()
 Part of API for drivers, see documentation for USBClosePipe. More...
 
void usb_close_pipe_nolock ()
 Worker function for pipe closing. Called by usb_close_pipe API and from disconnect processing. The lock guarding pipe list for the device should be held by the caller. ebx -> usb_pipe, esi -> usb_controller. More...
 
void usb_pipe_aborted ()
 This procedure is called when all transfers are aborted either due to call to usb_abort_pipe or due to pipe closing. It notifies all callbacks and frees all transfer descriptors. ebx -> usb_pipe, esi -> usb_controller, edi -> usb_hardware_func three stack parameters: status code for callback functions and descriptors where to start and stop. More...
 
void usb_pipe_closed ()
 This procedure is called when a pipe with USB_FLAG_CLOSED is removed from the corresponding wait list. It means that the hardware has fully forgot about it. ebx -> usb_pipe, esi -> usb_controller. More...
 
void usb_pipe_disabled ()
 This procedure is called when a pipe with USB_FLAG_DISABLED is removed from the corresponding wait list. It means that the hardware has fully forgot about it. ebx -> usb_pipe, esi -> usb_controller. More...
 
void usb_normal_transfer_async (dword pipe, dword buffer, dword size, dword callback, dword calldata, dword flags)
 Part of API for drivers, see documentation for USBNormalTransferAsync. More...
 
void usb_control_async (dword pipe, dword config, dword buffer, dword size, dword callback, dword calldata, dword flags)
 Part of API for drivers, see documentation for USBControlTransferAsync. More...
 
void usb_abort_pipe ()
 Part of API for drivers, see documentation for USBAbortPipe. More...
 
void usb_get_param ()
 Part of API for drivers, see documentation for USBGetParam. More...
 
void usb_init_transfer ()
 Initialize software part of usb_gtd. Called from controller-specific code somewhere in AllocTransfer with eax -> next (inactive) usb_gtd, ebx -> usb_pipe, ebp frame from call to AllocTransfer with [.td] -> current (initializing) usb_gtd. Returns ecx = [.td]. More...
 
void usb_undo_tds ()
 Free all TDs for the current transfer if something has failed during initialization (e.g. no memory for the next TD). Stdcall with one stack argument = first TD for the transfer and eax = last initialized TD for the transfer. More...
 
void usb_is_final_packet ()
 Helper procedure for handling short packets in controller-specific code. Returns with CF cleared if this is the final packet in some stage: for control transfers that means one of Data and Status stages, for other transfers - the final packet in the only stage. More...
 
void usb_unlink_td ()
 Helper procedure for controller-specific code: removes one TD from the transfer queue, ebx -> usb_gtd to remove. More...
 
void usb_process_gtd ()
 One part of transfer is completed, run the associated callback or update total length in the next part of transfer. in: ebx -> usb_gtd, ecx = status, edx = length. More...
 
void verify_regs ()
 

Variables

rd tt_vars
 should be enough for ehci_select_tt_interrupt_list More...
 
dd targetsmask
 S-Mask for USB2. More...
 
dd bandwidth
 
dd target
 
dd _pipe
 
dd _status
 USB_STATUS_CLOSED or USB_STATUS_CANCELLED. More...
 
dd _first_td
 
dd _last_td
 
dd last_td
 
dd _param
 
dd _Size
 
dd _Buffer
 
dd _Flags
 
dd _td
 
dd _edi
 
dd _esi
 
dd _ebp
 
dd _esp
 
dd _ebx
 
dd _edx
 
dd _ecx
 
dd _eax
 

Macro Definition Documentation

◆ stdcall_verify

#define stdcall_verify (   arg)

Function Documentation

◆ usb_abort_pipe()

void usb_abort_pipe ( )

Part of API for drivers, see documentation for USBAbortPipe.

Source
bus/usb/pipe.inc:632

◆ usb_close_pipe()

void usb_close_pipe ( )

Part of API for drivers, see documentation for USBClosePipe.

Source
bus/usb/pipe.inc:191

◆ usb_close_pipe_nolock()

void usb_close_pipe_nolock ( )

Worker function for pipe closing. Called by usb_close_pipe API and from disconnect processing. The lock guarding pipe list for the device should be held by the caller. ebx -> usb_pipe, esi -> usb_controller.

Source
bus/usb/pipe.inc:226

◆ usb_control_async()

void usb_control_async ( dword  pipe,
dword  config,
dword  buffer,
dword  size,
dword  callback,
dword  calldata,
dword  flags 
)

Part of API for drivers, see documentation for USBControlTransferAsync.

Source
bus/usb/pipe.inc:548

◆ usb_get_param()

void usb_get_param ( )

Part of API for drivers, see documentation for USBGetParam.

Source
bus/usb/pipe.inc:695

◆ usb_init_static_endpoint()

void usb_init_static_endpoint ( )

Initialization of usb_static_ep structure, called from controller-specific initialization; edi -> usb_static_ep.

Source
bus/usb/pipe.inc:32

◆ usb_init_transfer()

void usb_init_transfer ( )

Initialize software part of usb_gtd. Called from controller-specific code somewhere in AllocTransfer with eax -> next (inactive) usb_gtd, ebx -> usb_pipe, ebp frame from call to AllocTransfer with [.td] -> current (initializing) usb_gtd. Returns ecx = [.td].

Source
bus/usb/pipe.inc:729

◆ usb_is_final_packet()

void usb_is_final_packet ( )

Helper procedure for handling short packets in controller-specific code. Returns with CF cleared if this is the final packet in some stage: for control transfers that means one of Data and Status stages, for other transfers - the final packet in the only stage.

Source
bus/usb/pipe.inc:777

◆ usb_normal_transfer_async()

void usb_normal_transfer_async ( dword  pipe,
dword  buffer,
dword  size,
dword  callback,
dword  calldata,
dword  flags 
)

Part of API for drivers, see documentation for USBNormalTransferAsync.

Source
bus/usb/pipe.inc:500

◆ usb_open_pipe()

void usb_open_pipe ( dword  config_pipe,
dword  endpoint,
dword  maxpacket,
dword  type,
dword  interval 
)

Part of API for drivers, see documentation for USBOpenPipe.

Source
bus/usb/pipe.inc:40

◆ usb_pipe_aborted()

void usb_pipe_aborted ( )

This procedure is called when all transfers are aborted either due to call to usb_abort_pipe or due to pipe closing. It notifies all callbacks and frees all transfer descriptors. ebx -> usb_pipe, esi -> usb_controller, edi -> usb_hardware_func three stack parameters: status code for callback functions and descriptors where to start and stop.

Source
bus/usb/pipe.inc:293

◆ usb_pipe_closed()

void usb_pipe_closed ( )

This procedure is called when a pipe with USB_FLAG_CLOSED is removed from the corresponding wait list. It means that the hardware has fully forgot about it. ebx -> usb_pipe, esi -> usb_controller.

Source
bus/usb/pipe.inc:324

◆ usb_pipe_disabled()

void usb_pipe_disabled ( )

This procedure is called when a pipe with USB_FLAG_DISABLED is removed from the corresponding wait list. It means that the hardware has fully forgot about it. ebx -> usb_pipe, esi -> usb_controller.

Source
bus/usb/pipe.inc:442

◆ usb_process_gtd()

void usb_process_gtd ( )

One part of transfer is completed, run the associated callback or update total length in the next part of transfer. in: ebx -> usb_gtd, ecx = status, edx = length.

Source
bus/usb/pipe.inc:809

◆ usb_reinit_pipe_list()

void usb_reinit_pipe_list ( )

This procedure is called several times during initial device configuration, when usb_device_data structure is reallocated. It (re)initializes all pointers in usb_device_data. ebx -> usb_pipe.

Source
bus/usb/pipe.inc:171

◆ usb_undo_tds()

void usb_undo_tds ( )

Free all TDs for the current transfer if something has failed during initialization (e.g. no memory for the next TD). Stdcall with one stack argument = first TD for the transfer and eax = last initialized TD for the transfer.

Source
bus/usb/pipe.inc:757

◆ usb_unlink_td()

void usb_unlink_td ( )

Helper procedure for controller-specific code: removes one TD from the transfer queue, ebx -> usb_gtd to remove.

Source
bus/usb/pipe.inc:794

◆ verify_regs()

void verify_regs ( )

Variable Documentation

◆ _Buffer

dd _Buffer
Initial value
?
Source
bus/usb/pipe.inc:733

◆ _eax

dd _eax
Initial value
?
Source
bus/usb/pipe.inc:838

◆ _ebp

dd _ebp
Initial value
?
Source
bus/usb/pipe.inc:833

◆ _ebx

dd _ebx
Initial value
?
Source
bus/usb/pipe.inc:835

◆ _ecx

dd _ecx
Initial value
?
Source
bus/usb/pipe.inc:837

◆ _edi

dd _edi
Initial value
?
Source
bus/usb/pipe.inc:831

◆ _edx

dd _edx
Initial value
?
Source
bus/usb/pipe.inc:836

◆ _esi

dd _esi
Initial value
?
Source
bus/usb/pipe.inc:832

◆ _esp

dd _esp
Initial value
?
Source
bus/usb/pipe.inc:834

◆ _first_td

dd _first_td
Initial value
?
Source
bus/usb/pipe.inc:297

◆ _Flags

dd _Flags
Initial value
?
Source
bus/usb/pipe.inc:735

◆ _last_td

dd _last_td
Initial value
?
Source
bus/usb/pipe.inc:298

◆ _param

dd _param
Initial value
?
Source
bus/usb/pipe.inc:699

◆ _pipe

dd _pipe
Initial value
?
Source
bus/usb/pipe.inc:196
Initial value
?
Source
bus/usb/pipe.inc:637
Initial value
?
Source
bus/usb/pipe.inc:698

◆ _Size

dd _Size
Initial value
?
Source
bus/usb/pipe.inc:731

◆ _status

dd _status

USB_STATUS_CLOSED or USB_STATUS_CANCELLED.

Initial value
?
Source
bus/usb/pipe.inc:296

◆ _td

dd _td
Initial value
?
Source
bus/usb/pipe.inc:736

◆ bandwidth

dd bandwidth
Initial value
?
Source
bus/usb/pipe.inc:44

◆ last_td

dd last_td
Initial value
?
Source
bus/usb/pipe.inc:550

◆ target

dd target
Initial value
?
Source
bus/usb/pipe.inc:45

◆ targetsmask

dd targetsmask

S-Mask for USB2.

Initial value
?
Source
bus/usb/pipe.inc:43

◆ tt_vars

rd tt_vars

should be enough for ehci_select_tt_interrupt_list

Initial value
24
Source
bus/usb/pipe.inc:42