- Silicon Labs Community
- Welcome and Announcements
- Silicon Labs Knowledge Base
- 8-bit MCU
- 32-bit MCU
- Bluetooth / Wi-Fi
- Other Products Category
- Optical/RH/Temp Sensor
- Other Products
- Hardware and Software Tools
- Simplicity Studio and Software
- General Discussions and Suggestions
- Chinese Forum
- Software Libraries
- Development Kits
- Reference Designs
- Third Party Tools
- White Papers
- Official Blog of Silicon Labs
- Chinese Blog
02-21-2017 02:21 AM
Now I migration CP2130 Demo_Application source code porting to Qt Application.
Of Course, I using the Silab provided dll(SLAB_USB_SPI.dll) and API(SLAB_USB_SPI.h)
But, when I using the this API; "SLAB_USB_SPI.CP213x_GetGuid(ref guid)"
How Can I type converting guid for Qt ?
Qt also has guid.h type structure like this :
typedef struct _GUID
} GUID, *REFGUID, *LPGUID;
But, After Qt GUID create and use it directly to "SLAB_USB_SPI.CP213x_GetGuid(ref guid)"
It occurred compile error.
Please help me.
02-23-2017 05:02 AM
There is no keyword "ref" in QT, and you shoud pass the argument of guid by reference your QT application.
My views are my own and do not necessarily represent the views of Silicon Labs
02-24-2017 12:11 AM
Thank you for your reply.
I'll using or ingnore ref keyword and solve it.
But, I have another question.
When I use build & run application with CP2130 Library, SLAB_USB_SPI.lib, always occured this message.
The program has unexpectedly finished.
I think silab provid the CP2130 Library and Qt has some incompatability.
Because, before We're using CP2110 Library used at Qt application and works well.
Compare with CP2130 and CP2110 API, CP2130 has addtional keywords like _Out_writes_bytes_opt_ or other things.
02-24-2017 04:12 AM
At Main funtion I calling the relative funtion like CP213x_GetNumDevices or CP213x_IsOpened.
For example :
compile & building is OK, But, When excute it, occured The program has unexpectedly finished. message.
When I calling any CP213x relative function, I met the this error message.
03-03-2017 05:47 AM
CP213x_IsOpened used to returns the USB device opened state. And the hDevices should be the return value of CP213x_OpenByIndex() or CP213x_OpenByDevicePath().
That seems like a weird function. You first need to open a device to get a handle and then you can ask CP213x_IsOpened if this handle was opened?