-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #895 from slyshykO/update_libusb
[compatibility] update of libusb
- Loading branch information
Showing
6 changed files
with
71 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#ifndef STLINKUSB_H | ||
#define STLINKUSB_H | ||
|
||
#include <libusb.h> | ||
|
||
/* | ||
libusb ver | LIBUSB_API_VERSION | ||
-------------+-------------------- | ||
v1.0.13 | 0x01000100 | ||
v1.0.14 | 0x010000FF | ||
v1.0.15 | 0x01000101 | ||
v1.0.16 | 0x01000102 | ||
v1.0.17 | 0x01000102 | ||
v1.0.18 | 0x01000102 | ||
v1.0.19 | 0x01000103 | ||
v1.0.20 | 0x01000104 | ||
v1.0.21 | 0x01000105 | ||
v1.0.22 | 0x01000106 | ||
v1.0.23 | 0x01000107 | ||
*/ | ||
|
||
#if defined (__FreeBSD__) | ||
#if !defined ( LIBUSBX_API_VERSION ) | ||
#define LIBUSBX_API_VERSION LIBUSB_API_VERSION | ||
#elif !defined (LIBUSB_API_VERSION) | ||
#error unsupported libusb version | ||
#endif | ||
#endif | ||
|
||
#if defined (__FreeBSD__) | ||
#define MINIMAL_API_VERSION 0x01000102 | ||
#elif defined (__linux__) | ||
#define MINIMAL_API_VERSION 0x01000104 | ||
#elif defined (__APPLE__) | ||
#define MINIMAL_API_VERSION 0x01000104 | ||
#elif defined (_WIN32) | ||
#define MINIMAL_API_VERSION 0x01000106 | ||
#endif | ||
|
||
#if ( LIBUSB_API_VERSION < MINIMAL_API_VERSION ) | ||
#error unsupported libusb version | ||
#endif | ||
|
||
#endif // STLINKUSB_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters