83Plus:Software:usb8x/Asm Interface/GetErrorCode

From WikiTI
Revision as of 19:50, 29 August 2006 by Dan Englender (Talk | contribs)

Jump to: navigation, search

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.