; Copyright (c) 2020 Nordic Semiconductor
; Windows 2000, XP, Vista, 7 and 8 (x32 and x64) driver for Nordic CDC ACM
;
; Based off on https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-driver-installation-based-on-compatible-ids
;
; Unlike those instructions, this file sets the usbser.sys driver as a function
; driver instead of a filter driver (note the lack of LowerFilterAddReg, and the
; 0x02 flags to AddService - see also
; https://docs.microsoft.com/en-us/windows-hardware/drivers/install/inf-addservice-directive )

[Strings]
DeviceNameTerm = "Thingy:91 Terminal"
DeviceNameTrace= "Thingy:91 Trace"
VendorName     = "Nordic Semiconductor ASA"
VendorID       = "VID_1915"
Serial.SvcDesc = "USB Serial emulation driver"

[Version]
Signature   = "$Windows NT$"
Class       = Ports
ClassGuid   = {4D36E978-E325-11CE-BFC1-08002BE10318}
Provider    = %VendorName%
DriverVer   = 02/25/2020,1.0.3.0
CatalogFile = thingy91_cdc_acm.cat


;----------------------------------------------------------
; Targets
;
; Run the same steps for all platforms - Win2000, XP, vista, Win7, Win8, Win10
; both 32- and 64-bit.
;----------------------------------------------------------
[Manufacturer]
%VendorName% = DeviceList, NTAMD64, NTIA64, NTx86

[DeviceList.NTx86]
%DeviceNameTerm%            = DriverInstall, USB\%VendorID%&PID_9100&MI_00,USB\COMPOSITE
%DeviceNameTrace%           = DriverInstall, USB\%VendorID%&PID_9100&MI_03,USB\COMPOSITE

[DeviceList.NTAMD64]
%DeviceNameTerm%            = DriverInstall, USB\%VendorID%&PID_9100&MI_00,USB\COMPOSITE
%DeviceNameTrace%           = DriverInstall, USB\%VendorID%&PID_9100&MI_03,USB\COMPOSITE

[DeviceList.NTIA64]
%DeviceNameTerm%            = DriverInstall, USB\%VendorID%&PID_9100&MI_00,USB\COMPOSITE
%DeviceNameTrace%           = DriverInstall, USB\%VendorID%&PID_9100&MI_03,USB\COMPOSITE


;----------------------------------------------------------
; Installation steps
;
; Delegate most to the mdmcpq.inf system-provided file - this will copy usbser.sys
; around. Those files are platform-specific, so any 32- or 64-bit specific things
; will be taken care of.
;----------------------------------------------------------

[DriverInstall.NT]
include=mdmcpq.inf
CopyFiles=FakeModemCopyFileSection

[DriverInstall.NT.Services]
include=mdmcpq.inf
AddService = usbser, 0x00000002, DriverService.NT

[DriverService.NT]
; Similar to the LowerFilter_Service_Inst section of mdmcpq.inf, but
; custom name and error control level
DisplayName = %Serial.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbser.sys
LoadOrderGroup = Base
