4 Replies Latest reply on Mar 20, 2019 1:56 AM by SananyaM_56

    Data Types for CyOpen DLL Call with CY7C65211

    jocac_4016601

      Thus far I have the following DLL calls working:

      CyGetListofDevices

      CyGetDeviceInfo

       

      Now I try to do a CyOpen....

       

      Cy7C65211A_deviceNumber      = c_uint8()

      Cy7C65211A_interfaceNumber   = c_uint8()

      array_of_type_c_ubyte        =     (c_ubyte*CY_STRING_DESCRIPTOR_SIZE)

      CY_Handle = array_of_type_c_ubyte()

      Cy7C65211A_Ret_Code = CY7C65211A_CyOpen(Cy7C65211A_deviceNumber, Cy7C65211A_interfaceNumber, byref(CY_Handle))

       

      I get a successful return as long as the deviceNumber = 0 or 1.  It really doesn't matter what the interfaceNumber is as I have put in all kinds of numbers.

      The handle returns are 4 bytes long.  example of a return would be [104, 61, 122,3]

       

      What is the problem?  I have a successful return right?

      The problem:

      Cy7C65211A_Ret_Code = CY7C65211A_CyClose(CY_Handle)

      Returns CY_ERROR_INVALID_PARAMETER

       

      Since there is only 1 parameter I am assuming that the CyOpen wasn't as successful as one might think?

      Could use a little help on this.