kopia lustrzana https://github.com/stlink-org/stlink
use sys/time.h for mingw compatiblity, use LIBUSB_CALL modifier for callback
rodzic
947c1409e3
commit
80d6035828
|
@ -2,7 +2,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <libusb.h>
|
#include <libusb.h>
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ struct trans_ctx {
|
||||||
volatile unsigned long flags;
|
volatile unsigned long flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void on_trans_done(struct libusb_transfer * trans) {
|
static void LIBUSB_CALL on_trans_done(struct libusb_transfer * trans) {
|
||||||
struct trans_ctx * const ctx = trans->user_data;
|
struct trans_ctx * const ctx = trans->user_data;
|
||||||
|
|
||||||
if (trans->status != LIBUSB_TRANSFER_COMPLETED)
|
if (trans->status != LIBUSB_TRANSFER_COMPLETED)
|
||||||
|
|
Ładowanie…
Reference in New Issue