-Please add a snippet of the CY7C65211A_CyOpen() and CY7C65211A_CyClose functions in your application.
-What is CY_STRING_DESCRIPTOR_SIZE defined as? I would like to check if CY_HANDLE is passed as expected in CyOpen().
The code is already in the original post. Look for CyOpen and CyClose.
CY_STRING_DESCRIPTOR_SIZE is as defined by Cypress. It is a wonderful definition from the API as shown below:
String descriptor size
You couldn't figure that out? sheesh.
Tell me please, since your function calls can be done with CDLL and WINDLL, and it seems that you have used both in your DLL, could you tell me which function were compiled which way?
-Please provide the complete definition of the CY7C65211A_CyOpen() and CY7C65211A_CyClose() functions for us to check how the CyOpen() and CyClose() functions are called internally. The CY_ERROR_INVALID_PARAMETER error could possibly be due to data structure misalignment because the dll will return structures in C which may be different from that expected in Python.
-CY_STRING_DESCRIPTOR_SIZE is defined as 256 in the cyusbserial.h file, I am assuming you have defined the same.
-We have used cdecl calls in our APIs so CDLL should be used for loading the library.