Difference between revisions of "Unit RT2X00USB"

From Ultibo.org
Jump to: navigation, search
(Created page with "Return to Unit Reference === Description === ---- ''To be documented'' === Constants === ---- ''To be documented'' === Type definitions === ---- ''To...")
 
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
''To be documented''
+
'''Ralink RT2x00 USB Wireless Driver Library unit'''
 +
 
 +
This unit provides functionality and definitions common to all USB implementations of the RT2x00 chipset series.
  
 
=== Constants ===
 
=== Constants ===
 
----
 
----
  
''To be documented''
+
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00USB timeouts''' <code> RT2X00USB_*_TIMEOUT </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00USB_REGISTER_TIMEOUT = 100;</code>
 +
| Register Read/Write timeout
 +
|-
 +
| <code>RT2X00USB_REGISTER_TIMEOUT_FIRMWARE = 1000;</code>
 +
| Timeout when loading Firmware
 +
|-
 +
| <code>RT2X00USB_EEPROM_TIMEOUT = 2000;</code>
 +
| Timeout when reading EEPROM
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00USB block sizes''' <code> RT2X00USB_*_BLOCK_SIZE </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00USB_REGISTER_BLOCK_SIZE = 64;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00USB request types''' <code> RT2X00USB_VENDOR_REQUEST* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00USB_VENDOR_REQUEST = (USB_BMREQUESTTYPE_TYPE_VENDOR or USB_BMREQUESTTYPE_RECIPIENT_DEVICE);</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00USB_VENDOR_REQUEST_IN = (USB_BMREQUESTTYPE_DIR_IN or RT2X00USB_VENDOR_REQUEST);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00USB_VENDOR_REQUEST_OUT = (USB_BMREQUESTTYPE_DIR_OUT or RT2X00USB_VENDOR_REQUEST);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00USB vendor commands''' <code> RT2X00USB_DEVICE_MODE* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00USB_DEVICE_MODE = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00USB_SINGLE_WRITE = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00USB_SINGLE_READ = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00USB_MULTI_WRITE = 6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00USB_MULTI_READ = 7;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00USB_EEPROM_WRITE = 8;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00USB_EEPROM_READ = 9;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00USB_LED_CONTROL = 10;</code>
 +
| RT73USB
 +
|-
 +
| <code>RT2X00USB_RX_CONTROL = 12;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00USB device modes offset''' <code> RT2X00USB_MODE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00USB_MODE_RESET = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00USB_MODE_UNPLUG = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00USB_MODE_FUNCTION = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00USB_MODE_TEST = 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00USB_MODE_SLEEP = 7;</code>
 +
| RT73USB
 +
|-
 +
| <code>RT2X00USB_MODE_FIRMWARE = 8;</code>
 +
| RT73USB
 +
|-
 +
| <code>RT2X00USB_MODE_WAKEUP = 9;</code>
 +
| RT73USB
 +
|-
 +
| <code>RT2X00USB_MODE_AUTORUN = 17;</code>
 +
| RT2800USB
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===
 
----
 
----
  
''To be documented''
+
''None defined''
  
 
=== Public variables ===
 
=== Public variables ===
 
----
 
----
  
''To be documented''
+
''None defined''
  
 
=== Function declarations ===
 
=== Function declarations ===
 
----
 
----
  
''To be documented''
 
  
 +
'''RT2X00USB functions'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00USBDriverQuit(RT2X00:PRT2X00WiFiDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00USBDisableRadio(RT2X00:PRT2X00WiFiDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00USBEepromLoad(RT2X00:PRT2X00WiFiDevice; Data:PWord; Size:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00USBRegisterRead(RT2X00:PRT2X00WiFiDevice; Offset:Word; Value:PLongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00USBRegisterWrite(RT2X00:PRT2X00WiFiDevice; Offset:Word; Value:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00USBRegisterMultiRead(RT2X00:PRT2X00WiFiDevice; Offset:Word; Data:Pointer; Size:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00USBRegisterMultiWrite(RT2X00:PRT2X00WiFiDevice; Offset:Word; Data:Pointer; Size:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00USBRegisterBusyRead(RT2X00:PRT2X00WiFiDevice; Offset,Mask:LongWord; Reg:PLongWord):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00USBVendorRequest(RT2X00:PRT2X00WiFiDevice; bRequest,bmRequestType:Byte; wValue,wIndex:Word; Data:Pointer; wLength:Word; Timeout:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
Return to [[Unit_Reference|Unit Reference]]
 
Return to [[Unit_Reference|Unit Reference]]

Latest revision as of 05:48, 31 August 2021

Return to Unit Reference


Description


Ralink RT2x00 USB Wireless Driver Library unit

This unit provides functionality and definitions common to all USB implementations of the RT2x00 chipset series.

Constants



RT2X00USB timeouts RT2X00USB_*_TIMEOUT
RT2X00USB_REGISTER_TIMEOUT = 100; Register Read/Write timeout
RT2X00USB_REGISTER_TIMEOUT_FIRMWARE = 1000; Timeout when loading Firmware
RT2X00USB_EEPROM_TIMEOUT = 2000; Timeout when reading EEPROM


RT2X00USB block sizes RT2X00USB_*_BLOCK_SIZE
RT2X00USB_REGISTER_BLOCK_SIZE = 64;  


RT2X00USB request types RT2X00USB_VENDOR_REQUEST*
RT2X00USB_VENDOR_REQUEST = (USB_BMREQUESTTYPE_TYPE_VENDOR or USB_BMREQUESTTYPE_RECIPIENT_DEVICE);  
RT2X00USB_VENDOR_REQUEST_IN = (USB_BMREQUESTTYPE_DIR_IN or RT2X00USB_VENDOR_REQUEST);  
RT2X00USB_VENDOR_REQUEST_OUT = (USB_BMREQUESTTYPE_DIR_OUT or RT2X00USB_VENDOR_REQUEST);  


RT2X00USB vendor commands RT2X00USB_DEVICE_MODE*
RT2X00USB_DEVICE_MODE = 1;  
RT2X00USB_SINGLE_WRITE = 2;  
RT2X00USB_SINGLE_READ = 3;  
RT2X00USB_MULTI_WRITE = 6;  
RT2X00USB_MULTI_READ = 7;  
RT2X00USB_EEPROM_WRITE = 8;  
RT2X00USB_EEPROM_READ = 9;  
RT2X00USB_LED_CONTROL = 10; RT73USB
RT2X00USB_RX_CONTROL = 12;  


RT2X00USB device modes offset RT2X00USB_MODE_*
RT2X00USB_MODE_RESET = 1;  
RT2X00USB_MODE_UNPLUG = 2;  
RT2X00USB_MODE_FUNCTION = 3;  
RT2X00USB_MODE_TEST = 4;  
RT2X00USB_MODE_SLEEP = 7; RT73USB
RT2X00USB_MODE_FIRMWARE = 8; RT73USB
RT2X00USB_MODE_WAKEUP = 9; RT73USB
RT2X00USB_MODE_AUTORUN = 17; RT2800USB


Type definitions


None defined

Public variables


None defined

Function declarations



RT2X00USB functions

function RT2X00USBDriverQuit(RT2X00:PRT2X00WiFiDevice):LongWord;
Description: To be documented
Note None documented


function RT2X00USBDisableRadio(RT2X00:PRT2X00WiFiDevice):LongWord;
Description: To be documented
Note None documented


function RT2X00USBEepromLoad(RT2X00:PRT2X00WiFiDevice; Data:PWord; Size:LongWord):LongWord;
Description: To be documented
Note None documented


function RT2X00USBRegisterRead(RT2X00:PRT2X00WiFiDevice; Offset:Word; Value:PLongWord):LongWord;
Description: To be documented
Note None documented


function RT2X00USBRegisterWrite(RT2X00:PRT2X00WiFiDevice; Offset:Word; Value:LongWord):LongWord;
Description: To be documented
Note None documented


function RT2X00USBRegisterMultiRead(RT2X00:PRT2X00WiFiDevice; Offset:Word; Data:Pointer; Size:LongWord):LongWord;
Description: To be documented
Note None documented


function RT2X00USBRegisterMultiWrite(RT2X00:PRT2X00WiFiDevice; Offset:Word; Data:Pointer; Size:LongWord):LongWord;
Description: To be documented
Note None documented


function RT2X00USBRegisterBusyRead(RT2X00:PRT2X00WiFiDevice; Offset,Mask:LongWord; Reg:PLongWord):Boolean;
Description: To be documented
Note None documented


function RT2X00USBVendorRequest(RT2X00:PRT2X00WiFiDevice; bRequest,bmRequestType:Byte; wValue,wIndex:Word; Data:Pointer; wLength:Word; Timeout:LongWord):LongWord;
Description: To be documented
Note None documented


Return to Unit Reference