Difference between revisions of "83Plus:Software:usb8x/Asm Interface/GetErrorCode"

From WikiTI
Jump to: navigation, search
 
m (linked error codes)
Line 4: Line 4:
 
'''Minimum usb8x version:''' 0.11
 
'''Minimum usb8x version:''' 0.11
  
Returns the current error codes.
+
Returns the current [[../../Error_Codes|error codes]].
  
 
=== Inputs ===
 
=== Inputs ===

Revision as of 18:50, 29 August 2006

Synopsis

Name: GetErrorCode

Minimum usb8x version: 0.11

Returns the current [[../../Error_Codes|error codes]].

Inputs

  • None

Outputs

  • B: Main error code
  • C: Sub-error code

Destroys

  • None

Notes

Error codes are never reset by the driver, so the error indicated by this entry point may have happened an arbitrarily long time ago, unless you call it directly after another entry point returns failure. In other words, do not use GetErrorCode to determine whether an entry point has failed; use the success flag returend by that entry point instead.

Whenever an error code is recorded by the driver, the previous error code is stored as the "sub-error code". This can manifest itself in two ways:

  • A high level error may be reported in the main error code (e.g. errInit) and a lower level error in the sub error code (e.g. errPort8C)
  • The main error code will indicate the error and the sub error code will either be blank or report an error that occured in a previous entry point.