Бесплатноexamples

Прошивка Samsung SamFirm_A.i.o_v1.4.3

benchmark.c

Прошивка48.44 KB0 скачиваний12.01.2026

Технические данные

из каталога
Тип
Прошивка
Производитель
Samsung
Модель
SamFirm_A.i.o_v1.4.3
Формат
C
Размер
48.44 KB
Добавлен
12.01.2026
Скачивания
0

О файле

Прошивка Samsung SamFirm_A.i.o_v1.4.3 в формате C, 48.44 KB. Путь в каталоге: libusb-win32-bin-1.2.6.0 / examples. Сведения о файле, совместимости и доступе к скачиванию.

из каталога

Содержимое файла

Кодировка: 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;	

Похожие и связанные файлы

Соседние разделы каталога

Отзывы и обсуждение

0 комментариев

Комментариев пока нет

Скачали файл? Расскажите, подошёл ли он и что помогло. Первый отзыв особенно полезен.