;/*++
;Abstract:
;    INF file for installing the ITE hid CIR device
;
;
;--*/
[Version]
Signature="$CHICAGO$"
Class=System
ClassGuid={4D36E97D-E325-11CE-BFC1-08002BE10318}
Provider=%VENDOR%
CatalogFile=ITEhidCIR.cat
;LayoutFile=layout.inf
DriverVer=07/12/2013,1.1.0003.0

[SourceDisksFiles]
ITEhidCIR.sys = 99

[SourceDisksNames]
99 = %DISK_NAME%,,,

[DestinationDirs]
CopyFilesSYS = 12

[Manufacturer]
%VENDOR%=Vendor, NTx86
;%VENDOR%=Vendor, NTamd64

; For XP and later
[Vendor.NTx86]
%VHidMini%    = VHidMini_SIO.Inst, ACPI\ITE8704
%VHidMini%    = VHidMini_SIO.Inst, ACPI\ITE8713
%VHidMini%    = VHidMini_EC.Inst, ACPI\ITE8708
%VHidMini%    = VHidMini_EC.Inst, ACPI\ITE8712
%VHidMini%    = VHidMini_EC.Inst, ACPI\ITE8715
%VHidDevice%  = VHidDevice.Inst,  HID\ITEirDevice

;[Vendor.NTamd64]
;%VHidMini%    = VHidMini_SIO.Inst, ACPI\ITE8704
;%VHidMini%    = VHidMini_SIO.Inst, ACPI\ITE8713
;%VHidMini%    = VHidMini_EC.Inst, ACPI\ITE8708
;%VHidMini%    = VHidMini_EC.Inst, ACPI\ITE8712
;%VHidMini%    = VHidMini_EC.Inst, ACPI\ITE8715
;%VHidDevice%  = VHidDevice.Inst,  HID\ITEirDevice

[ControlFlags]
ExcludeFromSelect  = HID\ITEirDevice

;===============================================================
;   VHidMini (Root Enumerated Hid Device) install section
;===============================================================
;--------------------------SIO----------------------------------
[VHidMini_SIO.Inst.NT]
CopyFiles = CopyFilesSYS

[VHidMini_SIO.Inst.NT.HW]
AddReg = VHidMini_Parameters.AddReg 

[VHidMini_SIO.Inst.NT.Services]
AddService = ITEhidCIR,0x00000002,vhidmini_Service_SIOInst,
;--------------------------EC----------------------------------
[VHidMini_EC.Inst.NT]
CopyFiles = CopyFilesSYS

[VHidMini_EC.Inst.NT.HW]
AddReg = VHidMini_Parameters.AddReg 

[VHidMini_EC.Inst.NT.Services]
AddService = ITEhidCIR,0x00000002,vhidmini_Service_ECInst,
;------------------------common---------------------------------
[CopyFilesSYS]
ITEhidCIR.sys

[VHidMini_Parameters.AddReg]                            
HKR,,DeviceCharacteristics,0x10001,0x0100         ; Use same security checks on relative opens
HKR,,Security,,"D:P(A;;GA;;;BA)(A;;GA;;;SY)"      ; Allow generic-all access to Built-in administrators and Local system 

[vhidmini_Service_SIOInst]
DisplayName    = %VHidMini%
ServiceType    = %SERVICE_KERNEL_DRIVER% 
StartType      = %SERVICE_DEMAND_START% 
ErrorControl   = %SERVICE_ERROR_IGNORE% 
ServiceBinary  = %12%\ITEhidCIR.sys
AddReg         = Service_addreg,Service_AddRegForSIO

[vhidmini_Service_ECInst]
DisplayName    = %VHidMini%
ServiceType    = %SERVICE_KERNEL_DRIVER% 
StartType      = %SERVICE_DEMAND_START% 
ErrorControl   = %SERVICE_ERROR_IGNORE% 
ServiceBinary  = %12%\ITEhidCIR.sys
AddReg         = Service_addreg,Service_AddRegForEC

[Service_AddRegForSIO]
HKR,"Parameters","KindOfIc",%REG_DWORD%, 1	;1=IT8712, 2=IT8752

[Service_AddRegForEC]
HKR,"Parameters","KindOfIc",%REG_DWORD%, 2	;1=IT8712, 2=IT8752
;------------------------Customer---------------------------------
[Service_AddReg]
HKR,"Parameters","ReadFromRegistry",%REG_DWORD%, 0x00000001
HKR,"Parameters","RCprotocal",%REG_DWORD%, 1	;1=RC6, 2=NEC, 3=NEC for Lenovo, 4=RC6SCC
HKR,"Parameters","RCcustomerID",%REG_DWORD%, 0x800f
HKR,"Parameters","FlashLED",%REG_DWORD%, 0x0000
HKR,"Parameters","RepeatDelay",%REG_DWORD%, 0x000a
HKR,"Parameters","TimerTimeout",%REG_DWORD%, 150
HKR,"Parameters","ReportDescriptor",%REG_BINARY%, \
        \;Consumer Controls
        0x05,   0x0c,       \; Usage Page (Consumer Controls),
        0x09,   0x01,       \; Usage (Consumer Control),
        0xA1,   0x01,       \; Collection (Application),
        0x85,   0x01,       \;  Report Id (1)
        0x19,   0x00,       \;  Usage Minimum (0),
        0x2a,   0xff, 0xff, \;  Usage Maximum (23c)  
        0x15,   0x00,       \;  Logical Minimum (0),
        0x26,   0xff, 0xff, \;  Logical Maximum (23c)  
        0x95,   0x01,       \;  Report Count (1),
        0x75,   0x10,       \;  Report Size (16),
        0x81,   0x00,       \;  Input (Data, Array), 
        0xC0,               \; End Collection         
        \;MS Vendor controls
        0x06,   0xbc, 0xff, \; Usage Page (Vendor 0xffbc),
        0x09,   0x88,       \; Usage (88),
        0xa1,   0x01,       \; Collection (Application),
        0x85,   0x02,       \;  Report Id (2)
        0x19,   0x01,       \;  Usage Minimum (0x01),
        0x29,   0xff,       \;  Usage Maximum (0xff),
        0x15,   0x00,       \;  Logical Minimum (0),
        0x25,   0x01,       \;  Logical Maximum(1),
        0x95,   0x01,       \;  Report Count (1),
        0x75,   0x08,       \;  Report Size (8),
        0x81,   0x00,       \;  Input (Data, Array), 
        0xc0,               \; End Collection
        \;Standby button
        0x05,   0x01,       \; Usage Page (Generic Desktop),
        0x09,   0x80,       \; Usage (System Control),
        0xa1,   0x01,       \; Collection (Application),
        0x85,   0x03,       \;  Report Id (3)
        0x19,   0x81,       \;  Usage Minimum (0x81),
        0x29,   0x83,       \;  Usage Maximum (0x83),
        0x25,   0x01,       \;  Logical Maximum(1),
        0x75,   0x01,       \;  Report Size (1),
        0x95,   0x03,       \;  Report Count (3),
        0x81,   0x02,       \;  Input
        0x75,   0x01,       \;  Report Size (1),   
        0x95,   0x05,       \;  Report Count (5),
        0x81,   0x01,       \;  Input (Constant),
        0xC0,               \; End Collection
        \;Keyboard
        0x05,   0x01,       \; Usage Page (Generic Desktop),
        0x09,   0x06,       \; Usage (Keyboard),
        0xA1,   0x01,       \; Collection (Application),
        0x85,   0x04,       \;  Report Id (4)
        0x05,   0x07,       \;  usage page key codes
        0x19,   0xe0,       \;  usage min left control
        0x29,   0xe7,       \;  usage max keyboard right gui
        0x75,   0x01,       \;  report size 1
        0x95,   0x08,       \;  report count 8
        0x81,   0x02,       \;  input (Variable)
        0x19,   0x00,       \;  usage min 0
        0x29,   0xdd,       \;  usage max 91
        0x25,   0xff,       \;  logical max 0xff
        0x75,   0x08,       \;  report size 8
        0x95,   0x01,       \;  report count 1
        0x81,   0x00,       \;  Input (Data, Array),
        0xC0,               \; End Collection
        \;Three Button Mouse
        0x05,   0x01,       \; Usage Page (Generic Desktop),
        0x09,   0x01,       \; Usage (Pointer),
        0xA1,   0x01,       \; Collection (Application),
        0x85,   0x05,       \;  REPORT_ID (5)
        0x05,   0x09,       \;  Usage Page (Buttons),
        0x19,   0x01,       \;  Usage Minimum (Button 1),
        0x29,   0x02,       \;  Usage Maximum (Button 2),
        0x15,   0x00,       \;  Log Min (0),
        0x25,   0x01,       \;  Log Max (1),
        0x75,   0x01,       \;  Report Size (1),
        0x95,   0x02,       \;  Report Count (2),
        0x81,   0x02,       \;  Input (Data, Variable, Absolute),
        0x05,   0x01,       \;  Usage Page (Generic Desktop),
        0x09,   0x30,       \;  Usage (X),
        0x09,   0x31,       \;  Usage (Y),
        0x15,   0xC1,       \;  Log Min (-63),
        0x25,   0x3F,       \;  Log Max (63),
        0x75,   0x07,       \;  Report Size (7),
        0x95,   0x02,       \;  Report Count (2),
        0x81,   0x06,       \;  Input (Data, Variable, Relative),
        0xC0,               \;  End Collection,
        \;Customer Vendor controls
        0x06,   0xbc, 0xff, \; Usage Page (Vendor 0xffbc),
        0x09,   0x99,       \; Usage (99),
        0xa1,   0x01,       \; Collection (Application),
        0x85,   0x06,       \;  Report Id (6)
        0x19,   0x01,       \;  Usage Minimum (0x01),
        0x29,   0xff,       \;  Usage Maximum (0xff),
        0x15,   0x00,       \;  Logical Minimum (0),
        0x25,   0x01,       \;  Logical Maximum(1),
        0x95,   0x01,       \;  Report Count (1),
        0x75,   0x08,       \;  Report Size (8),
        0x81,   0x00,       \;  Input (Data, Array), 
        0xc0,               \; End Collection 
        \;Customer Vendor controls for TOSHIBA
        0x06,   0x00, 0xff, \; Usage Page (Vendor 0xff00),
        0x09,   0x01,       \; Usage (01),
        0xa1,   0x01,       \; Collection (Application),
        0x85,   0x07,       \;  Report Id (7)
        0x19,   0x01,       \;  Usage Minimum (0x01),
        0x29,   0xff,       \;  Usage Maximum (0xff),
        0x15,   0x00,       \;  Logical Minimum (0),
        0x25,   0x01,       \;  Logical Maximum(1),
        0x95,   0x01,       \;  Report Count (1),
        0x75,   0x08,       \;  Report Size (8),
        0x81,   0x00,       \;  Input (Data, Array), 
        0xc0                \; End Collection

HKR,"Parameters","ReportMappingTable",%REG_BINARY%, \
  0x01,0x04,0x00,0x1E,0x02,  \;1
  0x02,0x04,0x00,0x1F,0x02,  \;2
  0x03,0x04,0x00,0x20,0x02,  \;3
  0x04,0x04,0x00,0x21,0x02,  \;4
  0x05,0x04,0x00,0x22,0x02,  \;5
  0x06,0x04,0x00,0x23,0x02,  \;6
  0x07,0x04,0x00,0x24,0x02,  \;7
  0x08,0x04,0x00,0x25,0x02,  \;8
  0x09,0x04,0x00,0x26,0x02,  \;9
  0x00,0x04,0x00,0x27,0x02,  \;0
  0x0B,0x04,0x00,0x28,0x02,  \;Enter
  0x0A,0x04,0x00,0x29,0x02,  \;Clear
  0x1D,0x04,0x02,0x25,0x02,  \;* (Shift+8)
  0x1C,0x04,0x02,0x20,0x02,  \;# (Shift+3)
  \
  0x1F,0x04,0x00,0x51,0x02,  \;Down arrow
  0x1E,0x04,0x00,0x52,0x02,  \;Up arrow
  0x21,0x04,0x00,0x4f,0x02,  \;Right arrow
  0x20,0x04,0x00,0x50,0x02,  \;Left arrow
  0x22,0x04,0x00,0x28,0x02,  \;Ok
  \
  0x4E,0x01,0x08,0x02,0x02,  \;AC Print
  0x0F,0x01,0x09,0x02,0x02,  \;AC More Info
  0x23,0x01,0x24,0x02,0x02,  \;AC Back
  \
  0x16,0x01,0xb0,0x00,0x02,  \;AC Media play
  0x18,0x01,0xb1,0x00,0x02,  \;AC Media pause
  0x17,0x01,0xb2,0x00,0x02,  \;AC Media record
  0x14,0x01,0xb3,0x00,0x02,  \;AC Fast Forward
  0x15,0x01,0xb4,0x00,0x02,  \;AC Rewind
  0x1A,0x01,0xb5,0x00,0x02,  \;AC Media Skip Forward
  0x1B,0x01,0xb6,0x00,0x02,  \;AC Media Skip Back
  0x19,0x01,0xb7,0x00,0x02,  \;AC Media Stop
  0x6E,0x01,0xcd,0x00,0x02,  \;AC Media Play/Pause
  \
  0x10,0x01,0xe9,0x00,0x02,  \;AC Volume Up
  0x11,0x01,0xea,0x00,0x02,  \;AC Volume Down
  0x0E,0x01,0xe2,0x00,0x02,  \;AC Volume Mute
  \
  0x12,0x01,0x9c,0x00,0x02,  \;AC Channel Up
  0x13,0x01,0x9d,0x00,0x02,  \;AC Channel Down
  \
  0x0C,0x03,0x82,0x00,0x02,  \;Sleep Toggle (Standby)
  0x29,0x03,0x83,0x00,0x02,  \;Wake
  0x2A,0x03,0x82,0x00,0x02,  \;Sleep
  \
  0x26,0x01,0x8D,0x00,0x02,  \;Guide
  0x0D,0x02,0x0D,0x00,0x02,  \;Green Start Button
  0x25,0x02,0x25,0x00,0x02,  \;Live TV
  0x47,0x02,0x47,0x00,0x02,  \;Music
  0x48,0x02,0x48,0x00,0x02,  \;Recorded TV
  0x49,0x02,0x49,0x00,0x02,  \;Pictures
  0x4A,0x02,0x4A,0x00,0x02,  \;Videos
  0x50,0x02,0x50,0x00,0x02,  \;FM Radio
  0x3C,0x02,0x3C,0x00,0x02,  \;Extras
  0x3D,0x02,0x3D,0x00,0x02,  \;Extras App
  \
  0x24,0x02,0x24,0x00,0x02,  \;DVD Menu
  0x4B,0x02,0x4B,0x00,0x02,  \;DVD Angle
  0x4C,0x02,0x4C,0x00,0x02,  \;DVD Audio
  0x4D,0x02,0x4D,0x00,0x02,  \;DVD Subtitle
  0x28,0x02,0x28,0x00,0x02,  \;DVD Eject
  0x43,0x02,0x43,0x00,0x02,  \;DVD Top Menu
  \
  0x5A,0x02,0x5A,0x00,0x02,  \;TELETEXT
  0x5B,0x02,0x5B,0x00,0x02,  \;Red
  0x5C,0x02,0x5C,0x00,0x02,  \;Green
  0x5D,0x02,0x5D,0x00,0x02,  \;Yellow
  0x5E,0x02,0x5E,0x00,0x02,  \;Blue
  \
  0x32,0x02,0x32,0x00,0x02,  \;Ext0
  0x33,0x02,0x33,0x00,0x02,  \;Ext1
  0x34,0x02,0x34,0x00,0x02,  \;Ext2
  0x35,0x02,0x35,0x00,0x02,  \;Ext3
  0x36,0x02,0x36,0x00,0x02,  \;Ext4
  0x37,0x02,0x37,0x00,0x02,  \;Ext5
  0x38,0x02,0x38,0x00,0x02,  \;Ext6
  0x39,0x02,0x39,0x00,0x02,  \;Ext7
  0x3A,0x02,0x3A,0x00,0x02,  \;Ext8
  0x80,0x02,0x80,0x00,0x02,  \;Ext9
  0x81,0x02,0x81,0x00,0x02,  \;Ext10
  0x6F,0x02,0x6F,0x00,0x02,  \;Ext11
  \
  0x2B,0x02,0x2B,0x00,0x02,  \;Closed Captioning
  0x27,0x02,0x27,0x00,0x02,  \;Zoom
  0x42,0x02,0x42,0x00,0x02,  \;Channel Input
  0x2D,0x02,0x2D,0x00,0x02,  \;Sub Audio
  0x3E,0x02,0x3E,0x00,0x02,  \;10
  0x3F,0x02,0x3F,0x00,0x02,  \;11
  0x40,0x02,0x40,0x00,0x02,  \;12
  0x4F,0x02,0x4F,0x00,0x02,  \;Display
  0x6A,0x02,0x6A,0x00,0x02,  \;Kiosk
  0x2C,0x02,0x2C,0x00,0x02,  \;Network Selection
  0x78,0x02,0x78,0x00,0x02,  \;BD Tool
  0x41,0x02,0x41,0x00,0x02,  \;Channel Information
  \
  0x54,0x02,0x54,0x00,0x02,  \;HP Menu
  0x71,0x02,0x71,0x00,0x02   \;HP Home

;===============================================================
;   VHidDevice (Virtual Hid Device) install section
; - Only a Null service is installed.
;===============================================================
[VHidDevice.Inst]

[VHidDevice.Inst.NT]

[VHidDevice.Inst.NT.Services]
AddService = ,0x00000002,   ; NULL Service


;================================================================
[Strings] 
;  *******Localizable Strings******* 
VENDOR         = "ITE Tech. Inc." 
VHidMini       = "ITECIR Hid Driver" 
VHidDevice     = "Hid CIR Device" 
DISK_NAME      = "ITECIR Hid Driver Install Disk"
;  *******Non Localizable Strings******* 

SERVICE_BOOT_START     = 0x0 
SERVICE_SYSTEM_START   = 0x1 
SERVICE_AUTO_START     = 0x2 
SERVICE_DEMAND_START   = 0x3 
SERVICE_DISABLED       = 0x4 

SERVICE_KERNEL_DRIVER  = 0x1 
SERVICE_ERROR_IGNORE   = 0x0 
SERVICE_ERROR_NORMAL   = 0x1 
SERVICE_ERROR_SEVERE   = 0x2 
SERVICE_ERROR_CRITICAL = 0x3 

REG_EXPAND_SZ          = 0x00020000 
REG_DWORD              = 0x00010001 
REG_MULTI_SZ           = 0x00010000
REG_BINARY             = 0x00000001
REG_SZ                 = 0x00000000

