83Plus:Software:usb8x/Error Codes
From WikiTI
Revision as of 14:41, 16 July 2006 by Dan Englender (Talk | contribs)
Error codes may be returned via both the [[../Asm_Interface|assembly language interface]] and the [[../BASIC_Interface|BASIC interface]]. In the BASIC interface, the error code is returned in the first element of the return list. In the assembly language interface, an error is generally indicated by a return with the carry flag set. The error code can then be read from an offset of offErrorCode from the start of the usb8x driver buffer. There may be an additional error code located at offErrorCode+1. Error code equates are located in usb8x.inc.
Error Codes
Error # | Name | Info |
---|---|---|
0 | OK | No error occured |
1 | Port82 | An error occured while waiting for a value from port 82. This generally happens during initialization. |
2 | Port91Bit2 | An error condition was detected via port 91 (NAK?) |
3 | Port91Bit4 | An error condition was detected via port 91 (Stall?) |
4 | Port4C | Port 4C did not hold the expected value. This generally happens during initialization. |
5 | Port4D | Port 4D did not hold the expected value. This generally happens during initialization. |
6 | Port3A | Port 3A did not hold the expected value. This generally happens during initialization. |
7 | Port81 | Port 81 did not hold the expected value. This generally happens during initialization. |
8 | Port8C | The frame counter did not start. This indicates a problem during initialization. |
9 | Port8F | Port 8F did not hold the expected value. This generally happens during initialization. |
10 | EPIndex | A non existant entry point was called. Be sure to check for the minimum required version of usb8x before calling entry points. |
11 | EPGetDes | An unsupported descriptor was requested from [[../Asm_Interface/ReadDescriptor|ReadDescriptor]]. |
12 | NoDevice | No Device is connected. |
13 | FindDescriptor | An error occured in [[../Asm_Interface/FindDescriptor|FindDescriptor]]. |
14 | BadClass | The attached device does not have the required class. (i.e. a keyboard is connected when [[../Asm_Interface/MouseInit|MouseInit]] is called). |
15 | Timeout | A timeout occured while waiting for data. This currently is only returned by [[../BASIC_Interface/MouseDo|MouseDo]]. |
16 | BadID | The attached device does not have the required vendor or device ID. |
17 | ReadDescriptor | An error occured in [[../Asm_Interface/ReadDescriptor|ReadDescriptor]]. Check sub error code for additional information. |
18 | Init | An error occured during initialization. Check sub error code for more information. |
19 | AutoSetup | An error occured during [[../Asm_Interface/AutoSetup|AutoSetup]]. Check sub error code for more information. |
20 | Demo | An error occured in demo code. This should not be returned via either of the programming interfaces. |
21 | FindPipe | An error occured in [[../Asm_Interface/FindPipe|FindPipe]]. This error may occasionally improperly be listed a sub error code, because AutoSetup generates a FindPipe error during normal operation. |
22 | Stub | Returned by stub routines (not current used). |
23 | GetMaxPacketSize | An error occured while trying to determine the maximum supported packet size. |
24 | SetAddress | An error occured while trying to set the device address |
Be aware that the error codes listed on this page are in decimal, while the error codes displayed in USBInfo are in hexadecimal.