Python wrapper around NXP LIBUSBSIO library
Maintained. Last release 5 months ago. Weaker on release cadence.
pip install libusbsioPython wrapper for NXP libusbsio binary library
The NXP libusbsio is a binary library for Win/Linux/MacOS systems used to exercise SPI, I2C bus and GPIO pins over USBSIO interface of NXP LPCLink2 and MCUlink Pro devices.
This Python component provides a wrapper object which encapsulates the binary library and exposes its API to Python applications.
Author: michal.hanak@nxp.com (https://www.nxp.com)
Dependencies
There are no dependencies to any external modules needed to use the LIBUSBSIO module.
The binary libraries use the HID_API library code and partially also its new libusb/hidapi version to access the USB HID interface on all supported OS platforms.
Installation
pypi.org
Use pip to download and install the package
python -m pip install libusbsio
Local
Use the following pip command to install the libusbsio module from
the local NXP LIBUSBSIO installation package available at www.nxp.com:
python -m pip install dist/libusbsio-2.2.1-py3-none-any.whl
Running example code
Running the example code is easy. You do not even need to install the package, the example code will locate the module in the local directory (in ../libusbsio).
Go to examples directory and see the demo scripts there.
Examine the script and the way how it creates the LIBUSBSIO object.
Without any constructor parameters, the USBSIO library is automatically located. There are also options to load the library from a given path.
from libusbsio import *
sio = LIBUSBSIO()
Use the loglevel parameter to specify logging verbosity:
import logging
from libusbsio import *
logging.basicConfig()
sio = LIBUSBSIO(loglevel=logging.INFO)