Does a global list of error codes exist?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

For example, when trying to obtain a buffer via

   
    

apiRetStatus = CyU3PDmaChannelGetBuffer (&MIDI_IN_HANDLE, &buf_p, CYU3P_WAIT_FOREVER);

   
   

apiRetStatus is set to 64. By numbering the error codes in the error enum in the api's error.h, 64 means CY_U3P_ERROR_INVALID_DEV. Well that doesn't make much sense, but it does seem that certain functions have different sets of errors associated with them.

   

How can I best decode errors such as these?

   

TIA

0 Likes
2 Replies
Anonymous
Not applicable

You can find the error code definitions in cyu3error.h

   

I suppose the 64 value returned is in decimal (not in hex), please check the debug print function whether it prints %d or %x in your case. 64 in decimal is 0x40 in hex which corresponds to "CY_U3P_ERROR_BAD_ARGUMENT"  /**< One or more parameters to a function are invalid. */

0 Likes
Anonymous
Not applicable

Thank you, I hadn't noticed that some numbers in the error list were skipped, and had miscounted. The problem is resolved.

0 Likes