mirror of
https://github.com/azure-rtos/usbx.git
synced 2025-01-14 06:43:05 +08:00
New files
This commit is contained in:
parent
17d3985027
commit
9489fb4769
314
common/core/inc/ux_user_sample.h
Normal file
314
common/core/inc/ux_user_sample.h
Normal file
@ -0,0 +1,314 @@
|
|||||||
|
/**************************************************************************/
|
||||||
|
/* */
|
||||||
|
/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||||
|
/* */
|
||||||
|
/* This software is licensed under the Microsoft Software License */
|
||||||
|
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||||
|
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||||
|
/* and in the root directory of this software. */
|
||||||
|
/* */
|
||||||
|
/**************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************/
|
||||||
|
/**************************************************************************/
|
||||||
|
/** */
|
||||||
|
/** USBX Component */
|
||||||
|
/** */
|
||||||
|
/** User Specific */
|
||||||
|
/** */
|
||||||
|
/**************************************************************************/
|
||||||
|
/**************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************/
|
||||||
|
/* */
|
||||||
|
/* PORT SPECIFIC C INFORMATION RELEASE */
|
||||||
|
/* */
|
||||||
|
/* ux_user.h PORTABLE C */
|
||||||
|
/* 6.0 */
|
||||||
|
/* */
|
||||||
|
/* AUTHOR */
|
||||||
|
/* */
|
||||||
|
/* Chaoqiong Xiao, Microsoft Corporation */
|
||||||
|
/* */
|
||||||
|
/* DESCRIPTION */
|
||||||
|
/* */
|
||||||
|
/* This file contains user defines for configuring USBX in specific */
|
||||||
|
/* ways. This file will have an effect only if the application and */
|
||||||
|
/* USBX library are built with UX_INCLUDE_USER_DEFINE_FILE defined. */
|
||||||
|
/* Note that all the defines in this file may also be made on the */
|
||||||
|
/* command line when building USBX library and application objects. */
|
||||||
|
/* */
|
||||||
|
/* RELEASE HISTORY */
|
||||||
|
/* */
|
||||||
|
/* DATE NAME DESCRIPTION */
|
||||||
|
/* */
|
||||||
|
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
|
||||||
|
/* */
|
||||||
|
/**************************************************************************/
|
||||||
|
|
||||||
|
#ifndef UX_USER_H
|
||||||
|
#define UX_USER_H
|
||||||
|
|
||||||
|
|
||||||
|
/* Define various build options for the USBX port. The application should either make changes
|
||||||
|
here by commenting or un-commenting the conditional compilation defined OR supply the defines
|
||||||
|
though the compiler's equivalent of the -D option. */
|
||||||
|
/* #define UX_THREAD_STACK_SIZE (2 * 1024) */
|
||||||
|
|
||||||
|
/* Define USBX Host Enum Thread Stack Size. The default is to use UX_THREAD_STACK_SIZE */
|
||||||
|
/*
|
||||||
|
#define UX_HOST_ENUM_THREAD_STACK_SIZE UX_THREAD_STACK_SIZE
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Define USBX Host Thread Stack Size. The default is to use UX_THREAD_STACK_SIZE */
|
||||||
|
/*
|
||||||
|
#define UX_HOST_HCD_THREAD_STACK_SIZE UX_THREAD_STACK_SIZE
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Define USBX Host HNP Polling Thread Stack Size. The default is to use UX_THREAD_STACK_SIZE */
|
||||||
|
/*
|
||||||
|
#define UX_HOST_HNP_POLLING_THREAD_STACK UX_THREAD_STACK_SIZE
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Override various options with default values already assigned in ux_api.h or ux_port.h. Please
|
||||||
|
also refer to ux_port.h for descriptions on each of these options. */
|
||||||
|
|
||||||
|
/* Defined, this value represents how many ticks per seconds for a specific hardware platform.
|
||||||
|
The default is 1000 indicating 1 tick per millisecond. */
|
||||||
|
|
||||||
|
/* #define UX_PERIODIC_RATE 1000
|
||||||
|
*/
|
||||||
|
#define UX_PERIODIC_RATE (TX_TIMER_TICKS_PER_SECOND)
|
||||||
|
|
||||||
|
/* Defined, this value is the maximum number of classes that can be loaded by USBX. This value
|
||||||
|
represents the class container and not the number of instances of a class. For instance, if a
|
||||||
|
particular implementation of USBX needs the hub class, the printer class, and the storage
|
||||||
|
class, then the UX_MAX_CLASSES value can be set to 3 regardless of the number of devices
|
||||||
|
that belong to these classes. */
|
||||||
|
|
||||||
|
/* #define UX_MAX_CLASSES 3
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Defined, this value is the maximum number of classes in the device stack that can be loaded by
|
||||||
|
USBX. */
|
||||||
|
|
||||||
|
/* #define UX_MAX_SLAVE_CLASS_DRIVER 1
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Defined, this value is the maximum number of interfaces in the device framework. */
|
||||||
|
|
||||||
|
/* #define UX_MAX_SLAVE_INTERFACES 16
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Defined, this value represents the number of different host controllers available in the system.
|
||||||
|
For USB 1.1 support, this value will usually be 1. For USB 2.0 support, this value can be more
|
||||||
|
than 1. This value represents the number of concurrent host controllers running at the same time.
|
||||||
|
If for instance there are two instances of OHCI running, or one EHCI and one OHCI controller
|
||||||
|
running, the UX_MAX_HCD should be set to 2. */
|
||||||
|
|
||||||
|
/* #define UX_MAX_HCD 1
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Defined, this value represents the maximum number of devices that can be attached to the USB.
|
||||||
|
Normally, the theoretical maximum number on a single USB is 127 devices. This value can be
|
||||||
|
scaled down to conserve memory. Note that this value represents the total number of devices
|
||||||
|
regardless of the number of USB buses in the system. */
|
||||||
|
|
||||||
|
/* #define UX_MAX_DEVICES 127
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Defined, this value represents the current number of SCSI logical units represented in the device
|
||||||
|
storage class driver. */
|
||||||
|
|
||||||
|
/* #define UX_MAX_SLAVE_LUN 1
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Defined, this value represents the maximum number of SCSI logical units represented in the
|
||||||
|
host storage class driver. */
|
||||||
|
|
||||||
|
/* #define UX_MAX_HOST_LUN 1
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Defined, this value represents the maximum number of bytes received on a control endpoint in
|
||||||
|
the device stack. The default is 256 bytes but can be reduced in memory constraint environments. */
|
||||||
|
|
||||||
|
/* #define UX_SLAVE_REQUEST_CONTROL_MAX_LENGTH 256
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Defined, this value represents the maximum number of bytes that can be received or transmitted
|
||||||
|
on any endpoint. This value cannot be less than the maximum packet size of any endpoint. The default
|
||||||
|
is 4096 bytes but can be reduced in memory constraint environments. For cd-rom support in the storage
|
||||||
|
class, this value cannot be less than 2048. */
|
||||||
|
|
||||||
|
#define UX_SLAVE_REQUEST_DATA_MAX_LENGTH (1024 * 2)
|
||||||
|
|
||||||
|
|
||||||
|
/* Defined, this value includes code to handle storage Multi-Media Commands (MMC). E.g., DVD-ROM.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* #define UX_SLAVE_CLASS_STORAGE_INCLUDE_MMC */
|
||||||
|
|
||||||
|
|
||||||
|
/* Defined, this value represents the maximum number of bytes that a storage payload can send/receive.
|
||||||
|
The default is 8K bytes but can be reduced in memory constraint environments. */
|
||||||
|
#define UX_HOST_CLASS_STORAGE_MEMORY_BUFFER_SIZE (1024 * 8)
|
||||||
|
|
||||||
|
/* Define USBX Mass Storage Thread Stack Size. The default is to use UX_THREAD_STACK_SIZE. */
|
||||||
|
|
||||||
|
/* #define UX_HOST_CLASS_STORAGE_THREAD_STACK_SIZE UX_THREAD_STACK_SIZE
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Defined, this value represents the maximum number of Ed, regular TDs and Isochronous TDs. These values
|
||||||
|
depend on the type of host controller and can be reduced in memory constraint environments. */
|
||||||
|
|
||||||
|
#define UX_MAX_ED 80
|
||||||
|
#define UX_MAX_TD 128
|
||||||
|
#define UX_MAX_ISO_TD 1
|
||||||
|
|
||||||
|
/* Defined, this value represents the maximum size of the HID decompressed buffer. This cannot be determined
|
||||||
|
in advance so we allocate a big block, usually 4K but for simple HID devices like keyboard and mouse
|
||||||
|
it can be reduced a lot. */
|
||||||
|
|
||||||
|
#define UX_HOST_CLASS_HID_DECOMPRESSION_BUFFER 4096
|
||||||
|
|
||||||
|
/* Defined, this value represents the maximum number of HID usages for a HID device.
|
||||||
|
Default is 2048 but for simple HID devices like keyboard and mouse it can be reduced a lot. */
|
||||||
|
|
||||||
|
#define UX_HOST_CLASS_HID_USAGES 2048
|
||||||
|
|
||||||
|
|
||||||
|
/* By default, each key in each HID report from the device is reported by ux_host_class_hid_keyboard_key_get
|
||||||
|
(a HID report from the device is received whenever there is a change in a key state i.e. when a key is pressed
|
||||||
|
or released. The report contains every key that is down). There are limitations to this method such as not being
|
||||||
|
able to determine when a key has been released.
|
||||||
|
|
||||||
|
Defined, this value causes ux_host_class_hid_keyboard_key_get to only report key changes i.e. key presses
|
||||||
|
and key releases. */
|
||||||
|
|
||||||
|
/* #define UX_HOST_CLASS_HID_KEYBOARD_EVENTS_KEY_CHANGES_MODE */
|
||||||
|
|
||||||
|
/* Works when UX_HOST_CLASS_HID_KEYBOARD_EVENTS_KEY_CHANGES_MODE is defined.
|
||||||
|
|
||||||
|
Defined, this value causes ux_host_class_hid_keyboard_key_get to only report key pressed/down changes;
|
||||||
|
key released/up changes are not reported.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* #define UX_HOST_CLASS_HID_KEYBOARD_EVENTS_KEY_CHANGES_MODE_REPORT_KEY_DOWN_ONLY */
|
||||||
|
|
||||||
|
/* Works when UX_HOST_CLASS_HID_KEYBOARD_EVENTS_KEY_CHANGES_MODE is defined.
|
||||||
|
|
||||||
|
Defined, this value causes ux_host_class_hid_keyboard_key_get to report lock key (CapsLock/NumLock/ScrollLock) changes.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* #define UX_HOST_CLASS_HID_KEYBOARD_EVENTS_KEY_CHANGES_MODE_REPORT_LOCK_KEYS */
|
||||||
|
|
||||||
|
/* Works when UX_HOST_CLASS_HID_KEYBOARD_EVENTS_KEY_CHANGES_MODE is defined.
|
||||||
|
|
||||||
|
Defined, this value causes ux_host_class_hid_keyboard_key_get to report modifier key (Ctrl/Alt/Shift/GUI) changes.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* #define UX_HOST_CLASS_HID_KEYBOARD_EVENTS_KEY_CHANGES_MODE_REPORT_MODIFIER_KEYS */
|
||||||
|
|
||||||
|
|
||||||
|
/* Defined, this value represents the maximum number of media for the host storage class.
|
||||||
|
Default is 8 but for memory contrained resource systems this can ne reduced to 1. */
|
||||||
|
|
||||||
|
#define UX_HOST_CLASS_STORAGE_MAX_MEDIA 2
|
||||||
|
|
||||||
|
/* Defined, this value includes code to handle storage devices that use the CB
|
||||||
|
or CBI protocol (such as floppy disks). It is off by default because these
|
||||||
|
protocols are obsolete, being superseded by the Bulk Only Transport (BOT) protocol
|
||||||
|
which virtually all modern storage devices use.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* #define UX_HOST_CLASS_STORAGE_INCLUDE_LEGACY_PROTOCOL_SUPPORT */
|
||||||
|
|
||||||
|
/* Defined, this value forces the memory allocation scheme to enforce alignement
|
||||||
|
of memory with the UX_SAFE_ALIGN field.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* #define UX_ENFORCE_SAFE_ALIGNMENT */
|
||||||
|
|
||||||
|
/* Defined, this value represents the number of packets in the CDC_ECM device class.
|
||||||
|
The default is 16.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define UX_DEVICE_CLASS_CDC_ECM_NX_PKPOOL_ENTRIES 4
|
||||||
|
|
||||||
|
/* Defined, this value represents the number of packets in the CDC_ECM host class.
|
||||||
|
The default is 16.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* #define UX_HOST_CLASS_CDC_ECM_NX_PKPOOL_ENTRIES 16 */
|
||||||
|
|
||||||
|
/* Defined, this value represents the number of milliseconds to wait for packet
|
||||||
|
allocation until invoking the application's error callback and retrying.
|
||||||
|
The default is 1000 milliseconds.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* #define UX_HOST_CLASS_CDC_ECM_PACKET_POOL_WAIT 10 */
|
||||||
|
|
||||||
|
/* Defined, this value represents the number of milliseconds to wait for packet
|
||||||
|
allocation until invoking the application's error callback and retrying.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* #define UX_DEVICE_CLASS_CDC_ECM_PACKET_POOL_WAIT 10 */
|
||||||
|
|
||||||
|
/* Defined, this value represents the the maximum length of HID reports on the
|
||||||
|
device.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* #define UX_DEVICE_CLASS_HID_EVENT_BUFFER_LENGTH 64 */
|
||||||
|
|
||||||
|
/* Defined, this value represents the the maximum number of HID events/reports
|
||||||
|
that can be queued at once.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* #define UX_DEVICE_CLASS_HID_MAX_EVENTS_QUEUE 8 */
|
||||||
|
|
||||||
|
/* Defined, this value will only enable the host side of usbx. */
|
||||||
|
/* #define UX_HOST_SIDE_ONLY */
|
||||||
|
|
||||||
|
/* Defined, this value will only enable the device side of usbx. */
|
||||||
|
/* #define UX_DEVICE_SIDE_ONLY */
|
||||||
|
|
||||||
|
/* Defined, this value will include the OTG polling thread. OTG can only be active if both host/device are present.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef UX_HOST_SIDE_ONLY
|
||||||
|
#ifndef UX_DEVICE_SIDE_ONLY
|
||||||
|
|
||||||
|
/* #define UX_OTG_SUPPORT */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Defined, this value represents the maximum size of single tansfers for the SCSI data phase.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define UX_HOST_CLASS_STORAGE_MAX_TRANSFER_SIZE (1024 * 1)
|
||||||
|
|
||||||
|
/* Defined, this value represents the size of the log pool.
|
||||||
|
*/
|
||||||
|
#define UX_DEBUG_LOG_SIZE (1024 * 16)
|
||||||
|
|
||||||
|
|
||||||
|
/* DEBUG includes and macros for a specific platform go here. */
|
||||||
|
#ifdef UX_INCLUDE_USER_DEFINE_BSP
|
||||||
|
#include "usb_bsp.h"
|
||||||
|
#include "usbh_hcs.h"
|
||||||
|
#include "usbh_stdreq.h"
|
||||||
|
#include "usbh_core.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
65
support/windows_host_files/CDC_ACM_Template.inf
Normal file
65
support/windows_host_files/CDC_ACM_Template.inf
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
; CDC_ACM.inf
|
||||||
|
;
|
||||||
|
; INF file for Microsoft Azure RTOS simple CDC/ACM class
|
||||||
|
;
|
||||||
|
; 1) Replace VID/PID to your own in [MYCORP] section
|
||||||
|
; VID_vvvv&PID_pppp
|
||||||
|
; vvvv, pppp: four digit hex number of VID and PID, respectively
|
||||||
|
;
|
||||||
|
; 2) Replace 'MYCORP' to your own abbreviated one (without space)
|
||||||
|
; ex Microsoft Azure RTOS
|
||||||
|
; - Replace all MYCORP in this inf file
|
||||||
|
;
|
||||||
|
; 3) Replace 'MYDEV000' to your device model number (without space)
|
||||||
|
; ex CDC ACM Example
|
||||||
|
; - Replace all MYDEV000 in this inf file
|
||||||
|
;
|
||||||
|
; 4) Edit the strings in [Strings] section
|
||||||
|
;
|
||||||
|
|
||||||
|
[Version]
|
||||||
|
Signature="$Windows NT$"
|
||||||
|
Class=Ports
|
||||||
|
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
|
||||||
|
|
||||||
|
Provider=%MYCORP%
|
||||||
|
LayoutFile=layout.inf
|
||||||
|
DriverVer=08/04/2004,5.1.2600.2180
|
||||||
|
|
||||||
|
[Manufacturer]
|
||||||
|
%MYCORP%=MYCORP
|
||||||
|
|
||||||
|
[MYCORP]
|
||||||
|
%MYDEV000%= MYDEV000,USB\VID_9191&PID_0000
|
||||||
|
%MYDEV000% = MYDEV000,USB\VID_8080&PID_0000&MI_00
|
||||||
|
|
||||||
|
[DestinationDirs]
|
||||||
|
FakeModemCopyFileSection=12
|
||||||
|
DefaultDestDir = 12
|
||||||
|
|
||||||
|
[MYDEV000.NT]
|
||||||
|
include=mdmcpq.inf
|
||||||
|
CopyFiles=FakeModemCopyFileSection
|
||||||
|
AddReg=MYDEV000.NT.AddReg
|
||||||
|
|
||||||
|
[MYDEV000.NT.Services]
|
||||||
|
AddService = usbser, 0x00000002, Service_Inst
|
||||||
|
|
||||||
|
[Service_Inst]
|
||||||
|
DisplayName = %Serial.SvcDesc%
|
||||||
|
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
|
||||||
|
StartType = 3 ; SERVICE_DEMAND_START
|
||||||
|
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
|
||||||
|
ServiceBinary = %12%\usbser.sys
|
||||||
|
LoadOrderGroup = Base
|
||||||
|
|
||||||
|
[MYDEV000.NT.AddReg]
|
||||||
|
HKR,,NTMPDriver,,*ntkern
|
||||||
|
HKR,,NTMPDriver,,usbser.sys
|
||||||
|
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
|
||||||
|
HKR,,PortSubClass,1,01
|
||||||
|
|
||||||
|
[Strings]
|
||||||
|
MYCORP = "Microsoft Corporation" ; Your company name
|
||||||
|
MYDEV000 = "CDC ACM example device" ; Device description
|
||||||
|
Serial.SvcDesc = "CDC ACM Driver" ; Device driver description
|
66
support/windows_host_files/CDC_ACM_Template_Win7_64bit.inf
Normal file
66
support/windows_host_files/CDC_ACM_Template_Win7_64bit.inf
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
;
|
||||||
|
; This INF file is for linking a USB device that has a specific VID/PID to Windows serial device driver (usbser.sys).
|
||||||
|
; Where to modify the VID/PID values and various strings is commented below.
|
||||||
|
; For just getting a device to work, you should only need to modify the VID/PID values.
|
||||||
|
;
|
||||||
|
|
||||||
|
;
|
||||||
|
; Modify these strings to change the names displayed for the device.
|
||||||
|
;
|
||||||
|
|
||||||
|
[Strings]
|
||||||
|
DriverPackageDisplayName="Microsoft Azure RTOS Drivers"
|
||||||
|
ManufacturerName="Microsoft Azure RTOS"
|
||||||
|
ServiceName="USB RS-232 Emulation Driver"
|
||||||
|
DeviceName="Microsoft Azure RTOS CDC-ACM Device"
|
||||||
|
|
||||||
|
[DefaultInstall]
|
||||||
|
CopyINF=cdc_acm_microsoft.inf
|
||||||
|
|
||||||
|
[Version]
|
||||||
|
Class=Ports
|
||||||
|
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
|
||||||
|
Signature="$Windows NT$"
|
||||||
|
Provider=%ManufacturerName%
|
||||||
|
DriverVer=04/01/2014,1.3.0.0
|
||||||
|
DriverPackageDisplayName=%DriverPackageDisplayName%
|
||||||
|
|
||||||
|
[Manufacturer]
|
||||||
|
%ManufacturerName%=DeviceList, NTamd64
|
||||||
|
|
||||||
|
[DestinationDirs]
|
||||||
|
FakeModemCopyFileSection=12
|
||||||
|
DefaultDestDir=12
|
||||||
|
|
||||||
|
;
|
||||||
|
; Change the VID/PID in the following strings 'USB\VID_xxxx&PID_yyyyy&MI_00' to match your USB device.
|
||||||
|
; For example, if the VID is '8484' and the PID is '0000', the string should be: USB\VID_8484&PID_0000&MI_00
|
||||||
|
;
|
||||||
|
|
||||||
|
[DeviceList]
|
||||||
|
%DeviceName%=DriverInstall, USB\VID_xxxx&PID_yyyy&MI_00
|
||||||
|
|
||||||
|
[DeviceList.NTamd64]
|
||||||
|
%DeviceName%=DriverInstall, USB\VID_xxxx&PID_yyyy&MI_00
|
||||||
|
|
||||||
|
[DriverInstall]
|
||||||
|
include=mdmcpq.inf,usb.inf
|
||||||
|
CopyFiles = FakeModemCopyFileSection
|
||||||
|
AddReg=DriverAddReg
|
||||||
|
|
||||||
|
[DriverAddReg]
|
||||||
|
HKR,,DevLoader,,*ntkern
|
||||||
|
HKR,,NTMPDriver,,usbser.sys
|
||||||
|
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
|
||||||
|
|
||||||
|
[DriverInstall.Services]
|
||||||
|
include=mdmcpq.inf
|
||||||
|
AddService=usbser, 0x00000002, DriverService
|
||||||
|
|
||||||
|
[DriverService]
|
||||||
|
DisplayName=%ServiceName%
|
||||||
|
ServiceType=1
|
||||||
|
StartType=3
|
||||||
|
ErrorControl=1
|
||||||
|
ServiceBinary=%12%\usbser.sys
|
||||||
|
LoadOrderGroup=Base
|
68
support/windows_host_files/CDC_Composite_Template.inf
Normal file
68
support/windows_host_files/CDC_Composite_Template.inf
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
;
|
||||||
|
; Template INF for a USB CDC Device
|
||||||
|
; Copyright (c) Microsoft Corporation
|
||||||
|
;
|
||||||
|
[Version]
|
||||||
|
DriverVer =10/06/1999,5.00.2157.0
|
||||||
|
LayoutFile=Layout.inf
|
||||||
|
Signature="$CHICAGO$"
|
||||||
|
Class=Modem
|
||||||
|
ClassGUID={4D36E96D-E325-11CE-BFC1-08002BE10318}
|
||||||
|
Provider=%Mfg%
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[Manufacturer]
|
||||||
|
%Mfg% = Models
|
||||||
|
|
||||||
|
[ControlFlags]
|
||||||
|
ExcludeFromSelect=USB\VID_8080&PID_0000&MI_00
|
||||||
|
|
||||||
|
[DestinationDirs]
|
||||||
|
FakeModemCopyFileSection=12
|
||||||
|
DefaultDestDir=12
|
||||||
|
|
||||||
|
[Models]
|
||||||
|
%MYDEV000% = MYDEV000,USB\VID_8080&PID_0000&MI_00
|
||||||
|
|
||||||
|
[MYDEV000.NT]
|
||||||
|
include=usb.inf
|
||||||
|
CopyFiles=FakeModemCopyFileSection
|
||||||
|
AddReg=MYDEV000.AddReg
|
||||||
|
|
||||||
|
[MYDEV000.NT.Services]
|
||||||
|
AddService=usbser, 0x00000000, LowerFilter_Service_Inst
|
||||||
|
|
||||||
|
[MYDEV000.NT.HW]
|
||||||
|
AddReg=LowerFilterAddReg
|
||||||
|
|
||||||
|
[LowerFilterAddReg]
|
||||||
|
HKR,,"LowerFilters",0x00010000,"usbser"
|
||||||
|
|
||||||
|
[LowerFilter_Service_Inst]
|
||||||
|
DisplayName=%USBFilterString%
|
||||||
|
ServiceType= 1
|
||||||
|
StartType = 3
|
||||||
|
ErrorControl = 0
|
||||||
|
ServiceBinary = %12%\usbser.sys
|
||||||
|
|
||||||
|
[FakeModemCopyFileSection]
|
||||||
|
usbser.sys,,,0x20
|
||||||
|
|
||||||
|
[Strings]
|
||||||
|
Mfg = "Microsoft Azure RTOS"
|
||||||
|
MYDEV000 = "Microsoft Azure RTOS USB serial emulation"
|
||||||
|
USBFilterString ="Microsoft USB serial emulation"
|
||||||
|
|
||||||
|
[USB]
|
||||||
|
HKR,,FriendlyDriver,,Unimodem.vxd
|
||||||
|
HKR,,DevLoader,,*vcomm
|
||||||
|
HKR,,ConfigDialog,,serialui.dll
|
||||||
|
HKR,,AttachedTo,,COM5
|
||||||
|
HKR,,EnumPropPages,,"serialui.dll,EnumPropPages"
|
||||||
|
HKR,,DeviceType, 0, 01 ;
|
||||||
|
HKR,,PortSubClass,1,02
|
||||||
|
|
||||||
|
[MYDEV000.AddReg] ; USB serial emulation
|
||||||
|
HKR,, Properties, 1, 00,00,00,00, 00,00,00,00, 00,00,00,00, 00,00,00,00, 00,00,00,00, 00,00,00,00, 00,c2,01,00, 00,C2,01,00
|
||||||
|
|
124
support/windows_host_files/RNDIS_Template.inf
Normal file
124
support/windows_host_files/RNDIS_Template.inf
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
;
|
||||||
|
; Template INF for a USB Remote NDIS Device
|
||||||
|
; Copyright (c) Microsoft Corporation
|
||||||
|
;
|
||||||
|
|
||||||
|
[Version]
|
||||||
|
Signature = "$Windows NT$"
|
||||||
|
Class = Net
|
||||||
|
ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318}
|
||||||
|
Provider = %MicrosoftAzureRTOS%
|
||||||
|
DriverVer = mm/dd/yyyy,x.y.v.z
|
||||||
|
CatalogFile = MicrosoftAzureRTOS.cat
|
||||||
|
|
||||||
|
[Manufacturer]
|
||||||
|
%MicrosoftAzureRTOS% = MicrosoftAzureRTOSDevices,NT.5.1
|
||||||
|
|
||||||
|
[MicrosoftAzureRTOSDevices]
|
||||||
|
%MicrosoftAzureRTOSDevice% = RNDIS, USB\VID_3939&PID_0000
|
||||||
|
|
||||||
|
[MicrosoftAzureRTOSDevices.NT.5.1]
|
||||||
|
%MicrosoftAzureRTOSDevice% = RNDIS.NT.5.1, USB\VID_3939&PID_0000
|
||||||
|
|
||||||
|
[ControlFlags]
|
||||||
|
ExcludeFromSelect=*
|
||||||
|
|
||||||
|
; Windows 2000 specific sections ---------------------------------
|
||||||
|
|
||||||
|
[RNDIS.NT]
|
||||||
|
Characteristics = 0x84 ; NCF_PHYSICAL + NCF_HAS_UI
|
||||||
|
BusType = 15
|
||||||
|
DriverVer = 05/17/2008,0.0.0.0
|
||||||
|
AddReg = RNDIS_AddReg_NT, RNDIS_AddReg_WIN2K
|
||||||
|
CopyFiles = RNDIS_CopyFiles_NT
|
||||||
|
|
||||||
|
; DO NOT MODIFY THE SERVICE NAME
|
||||||
|
[RNDIS.NT.Services]
|
||||||
|
AddService = USB_RNDISY, 2, RNDIS_ServiceInst_NT, RNDIS_EventLog
|
||||||
|
|
||||||
|
[RNDIS_CopyFiles_NT]
|
||||||
|
; no rename of files on Windows 2000, use the 'y' names as is
|
||||||
|
usb8023y.sys, , , 0
|
||||||
|
rndismpy.sys, , , 0
|
||||||
|
|
||||||
|
[RNDIS_ServiceInst_NT]
|
||||||
|
DisplayName = %ServiceDisplayName%
|
||||||
|
ServiceType = 1
|
||||||
|
StartType = 3
|
||||||
|
ErrorControl = 1
|
||||||
|
ServiceBinary = %12%\usb8023y.sys
|
||||||
|
LoadOrderGroup = NDIS
|
||||||
|
AddReg = RNDIS_WMI_AddReg_NT
|
||||||
|
|
||||||
|
[RNDIS_WMI_AddReg_NT]
|
||||||
|
HKR, , MofImagePath, 0x00020000, "System32\drivers\rndismpy.sys"
|
||||||
|
|
||||||
|
; Windows XP specific sections -----------------------------------
|
||||||
|
|
||||||
|
[RNDIS.NT.5.1]
|
||||||
|
Characteristics = 0x84 ; NCF_PHYSICAL + NCF_HAS_UI
|
||||||
|
BusType = 15
|
||||||
|
DriverVer = 05/17/2008,0.0.0.0
|
||||||
|
AddReg = RNDIS_AddReg_XP
|
||||||
|
include = netrndis.inf
|
||||||
|
needs = Usb_Rndis.ndi
|
||||||
|
|
||||||
|
; no copyfiles - the files are already in place
|
||||||
|
|
||||||
|
[RNDIS.NT.5.1.Services]
|
||||||
|
include = netrndis.inf
|
||||||
|
needs = Usb_Rndis.ndi.Services
|
||||||
|
|
||||||
|
; Windows 2000 sections
|
||||||
|
|
||||||
|
; DO NOT MODIFY ServiceName
|
||||||
|
[RNDIS_AddReg_NT]
|
||||||
|
HKR, Ndi, Service, 0, "USB_RNDISY"
|
||||||
|
HKR, Ndi\Interfaces, UpperRange, 0, "ndis5"
|
||||||
|
HKR, Ndi\Interfaces, LowerRange, 0, "ethernet"
|
||||||
|
|
||||||
|
[RNDIS_AddReg_WIN2K]
|
||||||
|
HKR, , ReclaimRecv, 0x00010001, 1
|
||||||
|
HKR, NDI\params\NetworkAddress, ParamDesc, 0, %NetworkAddress%
|
||||||
|
HKR, NDI\params\NetworkAddress, type, 0, "edit"
|
||||||
|
HKR, NDI\params\NetworkAddress, LimitText, 0, "12"
|
||||||
|
HKR, NDI\params\NetworkAddress, UpperCase, 0, "1"
|
||||||
|
HKR, NDI\params\NetworkAddress, default, 0, " "
|
||||||
|
HKR, NDI\params\NetworkAddress, optional, 0, "1"
|
||||||
|
|
||||||
|
[RNDIS_EventLog]
|
||||||
|
AddReg = RNDIS_EventLog_AddReg
|
||||||
|
|
||||||
|
[RNDIS_EventLog_AddReg]
|
||||||
|
HKR, , EventMessageFile, 0x00020000, "%%SystemRoot%%\System32\netevent.dll"
|
||||||
|
HKR, , TypesSupported, 0x00010001, 7
|
||||||
|
|
||||||
|
; An optional Property to demonstrate adding advanced properties on Windows XP
|
||||||
|
[RNDIS_AddReg_XP]
|
||||||
|
HKR, NDI\params\XPProperty, ParamDesc, 0, %Sample_Property%
|
||||||
|
HKR, NDI\params\XPProperty, type, 0, "edit"
|
||||||
|
HKR, NDI\params\XPProperty, LimitText, 0, "12"
|
||||||
|
HKR, NDI\params\XPProperty, UpperCase, 0, "1"
|
||||||
|
HKR, NDI\params\XPProperty, default, 0, " "
|
||||||
|
HKR, NDI\params\XPProperty, optional, 0, "1"
|
||||||
|
|
||||||
|
|
||||||
|
[SourceDisksNames]
|
||||||
|
1=%SourceDisk%,,1
|
||||||
|
|
||||||
|
[SourceDisksFiles]
|
||||||
|
usb8023y.sys=1
|
||||||
|
rndismpy.sys=1
|
||||||
|
|
||||||
|
[DestinationDirs]
|
||||||
|
RNDIS_CopyFiles_NT = 12
|
||||||
|
|
||||||
|
; DO NOT CHANGE ServiceDisplayName
|
||||||
|
[Strings]
|
||||||
|
ServiceDisplayName = "USB Remote NDIS Y Network Device Driver"
|
||||||
|
Sample_Property = "Sample XP property"
|
||||||
|
NetworkAddress = "Network Address"
|
||||||
|
MicrosoftAzureRTOS = "Microsoft Corporation Inc."
|
||||||
|
MicrosoftAzureRTOSDevice = "Microsoft Azure RTOS USB Remote NDIS Network Device"
|
||||||
|
SourceDisk = "Microsoft Azure RTOS USB Network Driver Install Disk"
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user