libusbmux is a USB MUX (Multiplexer) library used to funnel USB communication from OpenOCD and Analog Devices' CrossCore(R) Debugger through one USB connection.
libusbmux is only supported under Windows.
$ cd build
$ cmake .. -G "Visual Studio 14 2015" (for VS2015)
$ cmake --build . --config Release
- cmake
- C compiler (i.e. gcc or Visual Studio)
For more information on CMake and it's usage, see https://cmake.org/.
$ ./bootstrap.sh
$ ./configure
$ make
- make
- libtool
- autoconf
- automake
For more information on Autotools and the GNU Build System, see https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html.
Open a handle to the usbmux interface:
HANDLE hPipe;
DWORD ret = usbmux_open(&hPipe, timeout);
Acquire the lock to the usbmux before attempting any USB actions (blocking):
USB_MUX_ERROR err = usbmux_lock(hPipe);
Read from the connected USB device:
USB_MUX_ERROR err = usbmux_read(hPipe, pBuffer, numBytes, endpoint, timeout);
Write to the connected USB device:
USB_MUX_ERROR err = usbmux_write(hPipe, pBuffer, numBytes, endpoint, timeout);
Release the lock to the usbmux to allow other processes to use it:
USB_MUX_ERROR err = usbmux_unlock(hPipe);
Close the handle to the usbmux interface:
usbmux_close(hPipe);
See LICENSE.md.