User`s manual

RSK+ RX62N Applications
R20UT0255EG0100 Page 21 of 21
4.5 LibUSB
The LibUSB sample application is functionally similar to the previous HID application. The difference is that this sample includes
software for a Windows host PC called RSK_LibUSB. The intention of this open source library is to provide a platform independent
operating system interface allowing a device to be used on multiple operating systems with a common code base.
The target RSK code is not dependant upon any external library code however it is written to support the LibUSB functionality.
To use the supplied host SW you will need to first download LibUSB-Win32 which is a port of the LibUSB code for Windows 32 bit
environments. This can be obtained from the LibUSB32 web site:
http://libusb-win32.sourceforge.net/#installation
Follow the instructions for “Device Driver Installation” (not for the “Filter Driver Installation.”), this will lead you to download a file
libusb-win32-device-bin-x.x.x.x.tar.gz”. Once unzipped you will have the files you require – there is no installer to run.
A sample inf file is provided in the LIBUSB sample project you have generated in the host/driver folder. Take a copy of this folder and
copy it to the downloaded LibUSB folder “
libusb-win32-device-bin-x.x.x.x\bin”. (Note: Doing this saves the “Found New Hardware
Wizard” having to ask where the driver files are.)
Program the RSK with the LibUSB sample code as described in the RSK tutorial manual. Then run the code. Connect a USB cable
between the host PC and the RSK. The first time the device is connected to a specific USB port Windows will detect the new device
and ask for the appropriate driver. Using the same procedure as described for the CDC project browse to the downloaded LibUSB
folder where you have just copied the example inf file (
libusb-win32-device-bin-x.x.x.x\bin). The LibUSB driver should now install.
Host SW:
This is supplied as a pre-built executable which is located in the release directory under the project and called RSK_LibUSB.exe.
Alternatively you can build the supplied sorce code. To do this you will need
the LibUSB files you downloaded - usb.h, LibUB.lib
and LibUSB0.dll. Update the MS Visual C++ Project settings to point to these files as required.
Run the RSK_LibUSB.exe and the following Window will be displayed:
Figure 4 - LibUSB application window
August 26, 2010