I am Arun here . I am a newbie to UART programming . Looking for some help here .
1. I need to import the Windows Library dll "SLABHIDtoUART.dll" into a C program . Any idea how to do that ?
2. I need to poweroff and poweron the hard drive connected to HID-> UART interface . Is this the value which i need to use
latchValuePoff = 0xbfbf;
Can any one share me the sample program to poweroff and power on the device on HID-> UART interface through C program .
There is an example application for HID to UART in our direct access driver package: https://www.silabs.com/products/development-tools/software/direct-access-drivers, usually this will be installed to C:\SiliconLabs\USBXpressHostSDK\CP2110_4\Examples\HidUartExample
I don't what hardware you are using. Is this a board with a CP2110? How is it connected to a hard drive, which pins do you need to change to reset the hard drive?
Thanks for the help . The Board is CP2110 . Here is how we have connected
host -> HID -> Hard drive ( through UART interface )
I am planning to power off and poweron GPIO 4 pin . Can you help me with that ?
My intention is to do this Programmatically on Windows platform . Need to use this in our Automated scripts . We do not need GUI to perform poweron and poweroff operation .
I could able to compile the source "HidUartExample" using Visual Studio . But it is generating GUI .
Can i get an object file using which i can perform power off and power on operation ? We can incorporate the object files in our automated scripts ( Not the EXE file )
Thanks for your help.
Hmm.. Things look very complicated .. Not sure why they are made user friendly . Can some one share a sample code for writing data using "HidUart_Write" on Windows platform ? Do i need to load the DLL in my program like this
HINSTANCE hInstLibrary = LoadLibrary("SLABHIDtoUART.dll"); //load the dll
I am not familiar with C/C++/C# . Can it be done using python scripting ? Are there any python modules for handling devices .
Please share sample code
I've attached our test python scripts and other test applications for SLABHIDDevice and SLABHIDtoUART, that should help you get started.
Thanks for your help . That really helped . The Python class file is really good . I am not that familor with C/C# and VB . The pythonic way of handling API's is very easy and intutive