;
; XmosUMDF2Write.inf
;

[Version]
Signature="$Windows NT$"
Class=USBDevice
ClassGuid={88BAE032-5A81-49f0-BC3D-A4FF138216D6}
Provider=%ManufacturerName%
CatalogFile=XmosUMDF2Write.cat
DriverVer=04/21/2022, 2022.04.21.01

[Manufacturer]
%ManufacturerName%=Standard,NTamd64

[Standard.NTamd64]
%DeviceName%=XmosDevice_Install, USB\VID_17EF&PID_A034&MI_03
%DeviceName%=XmosDevice_Install, USB\VID_17EF&PID_A03E&MI_03
%DeviceName%=XmosDevice_Install, USB\VID_20B1&PID_A034&MI_03
;;%DeviceName%=XmosDevice_Install, USB\VID_17EF&PID_A040&MI_00
[SourceDisksFiles]
XmosUMDF2Write.dll=1,,
LL_vf_fdfu.bin = 1,,
LL_vf_fdfu_Sku2.bin = 1,,
LL_dsp_SKU2_para.bin = 1,,

[SourceDisksNames]
1 = %DiskName%

; =================== UMDF Device ==================================

[XmosDevice_Install.NT]
CopyFiles=UMDriverCopy
Include=WINUSB.INF                      ; Import sections from WINUSB.INF
Needs=WINUSB.NT                         ; Run the CopyFiles & AddReg directives for WinUsb.INF

[XmosDevice_Install.NT.hw]
AddReg=XmosUMDF2Write_AddReg

[XmosDevice_Install.NT.Services]
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall  ; flag 0x2 sets this as the service for the device
AddService=WinUsb,0x000001f8,WinUsb_ServiceInstall  ; this service is installed because its a filter.

[XmosDevice_Install.NT.CoInstallers]
AddReg=CoInstallers_AddReg

[XmosDevice_Install.NT.Wdf]
UmdfDispatcher=WinUsb
UmdfService=XmosUMDF2Write,XmosUMDF2Write_Install
UmdfServiceOrder=XmosUMDF2Write

[XmosUMDF2Write_Install]
UmdfLibraryVersion=2.15.0 
ServiceBinary=%12%\UMDF\XmosUMDF2Write.dll
AddReg       = xmoswrite.AddReg

[xmoswrite.AddReg]
HKR,"Parameters","xmos_config",0x00000000,%SKU1_FW_STRING%
HKR,"Parameters","xmos_configSku2",0x00000000,%SKU2_FW_STRING%
HKR,"Parameters","xmos_dsp_ver",0x00000000,%DSP_FW_STRING%

[XmosUMDF2Write_AddReg]
; By default, USBDevice class uses iProduct descriptor to name the device in
; Device Manager on Windows 8 and higher.
; Uncomment for this device to use %DeviceName% on Windows 8 and higher:
HKR,,FriendlyName,,%DeviceName%
HKR,,"LowerFilters",0x00010008,"WinUsb" ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND
HKR,,"WinUsbPowerPolicyOwnershipDisabled",0x00010001,1

[WUDFRD_ServiceInstall]
DisplayName = %WudfRdDisplayName%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WUDFRd.sys

[WinUsb_ServiceInstall]
DisplayName = %WinUsb_SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys

[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WUDFCoinstaller.dll"

[DestinationDirs]
UMDriverCopy=12,UMDF ; copy to drivers\umdf

[UMDriverCopy]
XmosUMDF2Write.dll
LL_vf_fdfu.bin
LL_vf_fdfu_Sku2.bin
LL_dsp_SKU2_para.bin
; =================== Generic ==================================

[Strings]
ManufacturerName="LUXSHARE-ICT" ;TODO: Replace with your manufacturer name
ClassName="Universal Serial Bus devices"
DiskName = "XmosUMDF2Write Installation Disk"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
WinUsb_SvcDesc="WinUSB Driver"
DeviceName="XmosDfu Device"
REG_MULTI_SZ = 0x00010000

;FW update information.
SKU1_FW_STRING = "0.9.12" ;0.9.c
SKU2_FW_STRING = "5.9.7"  ;v30
DSP_FW_STRING  = "2v19r10"
