Freeexamples
Firmware Samsung SamFirm_A.i.o_v1.4.3
benchmark.c
Firmware48.44 KB0 downloads1/12/2026
Technical details
from catalog- Type
- Firmware
- Manufacturer
- Samsung
- Model
- SamFirm_A.i.o_v1.4.3
- Format
- C
- Size
- 48.44 KB
- Added
- 1/12/2026
- Downloads
- 0
About this file
Firmware Samsung SamFirm_A.i.o_v1.4.3 in C format, 48.44 KB. Catalog path: libusb-win32-bin-1.2.6.0 / examples. File details, compatibility and download access.
from catalog
Содержимое файла
Кодировка: utf-8/* USB Benchmark for libusb-win32
Copyright (C) 2010 Travis Robinson. <libusbdotnet@gmail.com>
website: http://sourceforge.net/projects/libusb-win32
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser 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 Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, please visit www.gnu.org.
*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include "lusb0_usb.h"
#define _BENCHMARK_VER_ONLY
#include "benchmark_rc.rc"
#define MAX_OUTSTANDING_TRANSFERS 10
// This is used only in VerifyData() for display information
// about data validation mismatches.
#define CONVDAT(format,...) printf("[data-mismatch] " format,__VA_ARGS__)
// All output is directed through these macros.
//
#define LOG(LogTypeString,format,...) printf("%s[" __FUNCTION__ "] "format, LogTypeString, __VA_ARGS__)
#define CONERR(format,...) LOG("Error:",format,__VA_ARGS__)
#define CONMSG(format,...) LOG("",format,__VA_ARGS__)
#define CONWRN(format,...) LOG("Warn:",format,__VA_ARGS__)
#define CONDBG(format,...) LOG("",format,__VA_ARGS__)
#define CONERR0(message) CONERR("%s", message)
#define CONMSG0(message) CONMSG("%s", message)
#define CONWRN0(message) CONWRN("%s", message)
#define CONDBG0(message) CONDBG("%s", message)
// This is the libusb-win32 return code for a transfer that timed out.
#define TRANSFER_TIMEDOUT -116
// Custom vendor requests that must be implemented in the benchmark firmware.
// Test selection can be bypassed with the "notestselect" argument.
//
enum BENCHMARK_DEVICE_COMMANDS
{
SET_TEST = 0x0E,
GET_TEST = 0x0F,
};
// Tests supported by the official benchmark firmware.
//
enum BENCHMARK_DEVICE_TEST_TYPE
{
TestTypeNone = 0x00,
TestTypeRead = 0x01,
TestTypeWrite = 0x02,
TestTypeLoop = TestTypeRead|TestTypeWrite,
};
// This software was mainly created for testing the libusb-win32 kernel & user driver.
enum BENCHMARK_TRANSFER_MODE
{
// Tests for the libusb-win32 sync transfer function.
TRANSFER_MODE_SYNC,
// Test for async function, iso transfers, and queued transfers
TRANSFER_MODE_ASYNC,
};
// Holds all of the information about a test.
struct BENCHMARK_TEST_PARAM
{
// User configurable value set from the command line.
//
INT Vid; // Vendor ID
INT Pid; // Porduct ID
INT Intf; // Interface number
INT Altf; // Alt Interface number
INT Ep; // Endpoint number (1-15)
INT Refresh;