Skip to content

Commit

Permalink
HydraUSB3_USB_benchmark v1.0.1
Browse files Browse the repository at this point in the history
Force USB3 Bulk endpoint2 to 4 burst (as 8burst or more have issue on some PC with USB3)
  • Loading branch information
bvernoux committed Aug 22, 2022
1 parent 704a73b commit 94a40d8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
6 changes: 3 additions & 3 deletions HydraUSB3_USB_benchmark/HydraUSB3_USB_benchmark.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/********************************** (C) COPYRIGHT *******************************
* File Name : HydraUSB3_USB_benchmark.c
* Author : bvernoux
* Version : V1.0
* Date : 2022/08/20
* Version : V1.0.1
* Date : 2022/08/22
* Description :
* Copyright (c) 2022 Benjamin VERNOUX
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -192,7 +192,7 @@ int main(int argc, char *argv[])
}
log_printf_init(pFile);

log_printf("HydraUSB3_USB_benchmark v%s B.VERNOUX 20-Aug-2022\n", VERSION);
log_printf("HydraUSB3_USB_benchmark v%s B.VERNOUX 22-Aug-2022\n", VERSION);

log_printf("Options: verbose=%d\n",
config.verbose);
Expand Down
2 changes: 1 addition & 1 deletion HydraUSB3_USB_benchmark/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = 1.0.0
VERSION = 1.0.1

# Install paths
PREFIX = /usr/local
Expand Down
8 changes: 6 additions & 2 deletions libusb_portable/libusb_portable.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/********************************** (C) COPYRIGHT *******************************
* File Name : libusb_portable.c
* Author : bvernoux
* Version : V1.0
* Date : 2022/08/20
* Version : V1.0.1
* Date : 2022/08/22
* Description :
* Copyright (c) 2022 Benjamin VERNOUX
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -127,9 +127,11 @@ void log_printf_dbg(const char* fmt, ...)

va_start(args, fmt);
vfprintf(stdout, fmt, args);
fflush(stdout);
if(pFile != NULL)
{
vfprintf(pFile, fmt, args);
fflush(pFile);
}
va_end(args);
}
Expand All @@ -140,9 +142,11 @@ void log_printf(const char* fmt, ...)

va_start(args, fmt);
vfprintf(stdout, fmt, args);
fflush(stdout);
if(pFile != NULL)
{
vfprintf(pFile, fmt, args);
fflush(pFile);
}
va_end(args);
}
Expand Down
7 changes: 4 additions & 3 deletions libusb_portable/libusb_portable.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/********************************** (C) COPYRIGHT *******************************
* File Name : libusb_portable.h
* Author : bvernoux
* Version : V1.0
* Date : 2022/08/20
* Version : V1.0.1
* Date : 2022/08/22
* Description :
* Copyright (c) 2022 Benjamin VERNOUX
* SPDX-License-Identifier: Apache-2.0
Expand All @@ -28,7 +28,8 @@ extern "C"
#define LIBUSB_BULK_TRANSFER_TIMEOUT_MILLISEC (2000)

#define USB3_EP1_BULK_BURST_SIZE (4*1024) // This size corresponds to USB3 EP1 Bulk with 4 burst(so 4x1024 bytes)
#define USB3_EP2_BULK_BURST_SIZE (8*1024) // This size corresponds to USB3 EP2 Bulk with 8 burst(so 8x1024 bytes)
// Warning USB3 enpoint 2 bulk with 8 or 16 burst can be problematic on some PC so default is set to 4
#define USB3_EP2_BULK_BURST_SIZE (4*1024) // This size corresponds to USB3 EP2 Bulk with 4 burst(so 4x1024 bytes)
#define USB2_BULK_SIZE 512

uint32_t swap_uint32(uint32_t val);
Expand Down

0 comments on commit 94a40d8

Please sign in to comment.