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

From WikiTI
Jump to: navigation, search
m (linked error codes)
m (Notes: typo)
 
Line 17: Line 17:
  
 
== Notes ==
 
== 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.
+
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 returned 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:
 
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)
 
* 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.
 
* 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.

Latest revision as of 10:06, 30 September 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 returned 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.