Skip to content
Object Oriented wrapper for LibUSB
Pascal Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.rst Added hint to libusb-1.0 Aug 4, 2019


!!! PLEASE USE GIT BRANCH "libusb-1.0" !!!

The code in the "master" branch (you are looking currently) supports version 0.1 of libusb. However, this is heavily outdated and not supported any more.

Please switch to branch "libusb-1.0" for the latest and greatest Pascal bindings for the current version of libusb.

pas-libusb -- Object Oriented wrapper for LibUSB

libusb 0.1 provides access to USB devices in user space.

This project provides Pascal header translations plus an object-oriented wrapper for convenience.

Note: In the current branch only the legacy version 0.1 of libusb is supported. The new version 1.0 introduced major changes in the API and is supported in branch "libusb-1.0".


Copyright (C) 2012 Johann Glaser <>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Directory Structure

Header translations and OOP wrapper.
Example for the direct usage of the OOP wrapper. This directory also has a Makefile.


$ cd src/examples/
$ make

For further information see the comment at the top of src/examples/testfirmware.pas.


Simply add the units LibUSB and USB to the uses-clause of your program. Derive from the class TUSBDevice to implement your custom driver.

The unit EZUSB provdes the class TUSBDeviceEZUSB to interface to the Cypress EZ-USB AN2131 microcontrollers. It provides functions to access the on-chip SRAM and to download its firmware.


This project was compiled with FreePascal 2.6.0 on Linux.

Other Projects

The USB Interface of the Velleman k7103 PC Storage Oscilloscope uses these units to communicate with the hardware.
EZ-Tools is a command line tool for generic access to devices with a built in Cypress EZ-USB AN2131 microcontroller.
You can’t perform that action at this time.