添加项目文件。
This commit is contained in:
BIN
3rdparty/can/USB驱动安装工具Setup(V1.30).exe
vendored
Normal file
BIN
3rdparty/can/USB驱动安装工具Setup(V1.30).exe
vendored
Normal file
Binary file not shown.
BIN
3rdparty/can/dll/ControlCAN.dll
vendored
Normal file
BIN
3rdparty/can/dll/ControlCAN.dll
vendored
Normal file
Binary file not shown.
95
3rdparty/can/inc/ControlCAN.h
vendored
Normal file
95
3rdparty/can/inc/ControlCAN.h
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
#ifndef CONTROLCAN_H
|
||||
#define CONTROLCAN_H
|
||||
|
||||
////<2F>ļ<EFBFBD><C4BC>汾<EFBFBD><E6B1BE>v2.01 20190410
|
||||
//#include <cvidef.h> //ʹ<><CAB9>CVIƽ̨<C6BD><CCA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>ø<EFBFBD><C3B8><EFBFBD><EFBFBD>䡣
|
||||
|
||||
//<2F>ӿڿ<D3BF><DABF><EFBFBD><EFBFBD>Ͷ<EFBFBD><CDB6><EFBFBD>
|
||||
|
||||
#define VCI_USBCAN1 3
|
||||
#define VCI_USBCAN2 4
|
||||
#define VCI_USBCAN2A 4
|
||||
|
||||
#define VCI_USBCAN_E_U 20
|
||||
#define VCI_USBCAN_2E_U 21
|
||||
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>״ֵ̬
|
||||
#define STATUS_OK 1
|
||||
#define STATUS_ERR 0
|
||||
|
||||
/*------------------------------------------------<2D><><EFBFBD><EFBFBD>ZLG<4C>ĺ<EFBFBD><C4BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>------------------------------------------------*/
|
||||
//1.ZLGCANϵ<4E>нӿڿ<D3BF><DABF><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͡<EFBFBD>
|
||||
typedef struct _VCI_BOARD_INFO{
|
||||
USHORT hw_Version;
|
||||
USHORT fw_Version;
|
||||
USHORT dr_Version;
|
||||
USHORT in_Version;
|
||||
USHORT irq_Num;
|
||||
BYTE can_Num;
|
||||
CHAR str_Serial_Num[20];
|
||||
CHAR str_hw_Type[40];
|
||||
USHORT Reserved[4];
|
||||
} VCI_BOARD_INFO,*PVCI_BOARD_INFO;
|
||||
|
||||
//2.<2E><><EFBFBD><EFBFBD>CAN<41><4E>Ϣ֡<CFA2><D6A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͡<EFBFBD>
|
||||
typedef struct _VCI_CAN_OBJ{
|
||||
UINT ID;
|
||||
UINT TimeStamp;
|
||||
BYTE TimeFlag;
|
||||
BYTE SendType;
|
||||
BYTE RemoteFlag;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>Զ<EFBFBD><D4B6>֡
|
||||
BYTE ExternFlag;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>չ֡
|
||||
BYTE DataLen;
|
||||
BYTE Data[8];
|
||||
BYTE Reserved[3];
|
||||
}VCI_CAN_OBJ,*PVCI_CAN_OBJ;
|
||||
|
||||
//3.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>CAN<41><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
typedef struct _VCI_INIT_CONFIG{
|
||||
DWORD AccCode;
|
||||
DWORD AccMask;
|
||||
DWORD Reserved;
|
||||
UCHAR Filter;
|
||||
UCHAR Timing0;
|
||||
UCHAR Timing1;
|
||||
UCHAR Mode;
|
||||
}VCI_INIT_CONFIG,*PVCI_INIT_CONFIG;
|
||||
|
||||
///////// new add struct for filter /////////
|
||||
typedef struct _VCI_FILTER_RECORD{
|
||||
DWORD ExtFrame; //<2F>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA>չ֡
|
||||
DWORD Start;
|
||||
DWORD End;
|
||||
}VCI_FILTER_RECORD,*PVCI_FILTER_RECORD;
|
||||
|
||||
#define EXTERNC extern "C"
|
||||
|
||||
EXTERNC DWORD __stdcall VCI_OpenDevice(DWORD DeviceType,DWORD DeviceInd,DWORD Reserved);
|
||||
EXTERNC DWORD __stdcall VCI_CloseDevice(DWORD DeviceType,DWORD DeviceInd);
|
||||
EXTERNC DWORD __stdcall VCI_InitCAN(DWORD DeviceType, DWORD DeviceInd, DWORD CANInd, PVCI_INIT_CONFIG pInitConfig);
|
||||
|
||||
EXTERNC DWORD __stdcall VCI_ReadBoardInfo(DWORD DeviceType,DWORD DeviceInd,PVCI_BOARD_INFO pInfo);
|
||||
|
||||
EXTERNC DWORD __stdcall VCI_SetReference(DWORD DeviceType,DWORD DeviceInd,DWORD CANInd,DWORD RefType,PVOID pData);
|
||||
|
||||
EXTERNC ULONG __stdcall VCI_GetReceiveNum(DWORD DeviceType,DWORD DeviceInd,DWORD CANInd);
|
||||
EXTERNC DWORD __stdcall VCI_ClearBuffer(DWORD DeviceType,DWORD DeviceInd,DWORD CANInd);
|
||||
|
||||
EXTERNC DWORD __stdcall VCI_StartCAN(DWORD DeviceType,DWORD DeviceInd,DWORD CANInd);
|
||||
EXTERNC DWORD __stdcall VCI_ResetCAN(DWORD DeviceType,DWORD DeviceInd,DWORD CANInd);
|
||||
|
||||
EXTERNC ULONG __stdcall VCI_Transmit(DWORD DeviceType,DWORD DeviceInd,DWORD CANInd,PVCI_CAN_OBJ pSend,ULONG Len);
|
||||
EXTERNC ULONG __stdcall VCI_Receive(DWORD DeviceType,DWORD DeviceInd,DWORD CANInd,PVCI_CAN_OBJ pReceive,ULONG Len,INT WaitTime);
|
||||
|
||||
|
||||
/*------------------------------------------------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>亯<EFBFBD><E4BAAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽṹ<DDBD><E1B9B9><EFBFBD><EFBFBD>------------------------------------------------*/
|
||||
|
||||
|
||||
#define EXTERNC extern "C"
|
||||
|
||||
EXTERNC DWORD __stdcall VCI_UsbDeviceReset(DWORD DevType,DWORD DevIndex,DWORD Reserved);
|
||||
EXTERNC DWORD __stdcall VCI_FindUsbDevice2(PVCI_BOARD_INFO pInfo);
|
||||
|
||||
#endif
|
||||
BIN
3rdparty/can/lib/ControlCAN.lib
vendored
Normal file
BIN
3rdparty/can/lib/ControlCAN.lib
vendored
Normal file
Binary file not shown.
BIN
3rdparty/can/vs2008_vcredist_x64.exe
vendored
Normal file
BIN
3rdparty/can/vs2008_vcredist_x64.exe
vendored
Normal file
Binary file not shown.
BIN
3rdparty/can/win7 win8 win10 driver/inf/amd64/WdfCoInstaller01011.dll
vendored
Normal file
BIN
3rdparty/can/win7 win8 win10 driver/inf/amd64/WdfCoInstaller01011.dll
vendored
Normal file
Binary file not shown.
BIN
3rdparty/can/win7 win8 win10 driver/inf/amd64/winusbcoinstaller2.dll
vendored
Normal file
BIN
3rdparty/can/win7 win8 win10 driver/inf/amd64/winusbcoinstaller2.dll
vendored
Normal file
Binary file not shown.
BIN
3rdparty/can/win7 win8 win10 driver/inf/i386/WdfCoInstaller01011.dll
vendored
Normal file
BIN
3rdparty/can/win7 win8 win10 driver/inf/i386/WdfCoInstaller01011.dll
vendored
Normal file
Binary file not shown.
BIN
3rdparty/can/win7 win8 win10 driver/inf/i386/winusbcoinstaller2.dll
vendored
Normal file
BIN
3rdparty/can/win7 win8 win10 driver/inf/i386/winusbcoinstaller2.dll
vendored
Normal file
Binary file not shown.
BIN
3rdparty/can/win7 win8 win10 driver/inf/mchpwinusb.cat
vendored
Normal file
BIN
3rdparty/can/win7 win8 win10 driver/inf/mchpwinusb.cat
vendored
Normal file
Binary file not shown.
132
3rdparty/can/win7 win8 win10 driver/inf/mchpwinusb.inf
vendored
Normal file
132
3rdparty/can/win7 win8 win10 driver/inf/mchpwinusb.inf
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
;---------------------------------------------------------------------------------
|
||||
;Note: When the driver package is signed, any modifications to this .inf file will
|
||||
;break the signature, and the driver package will need to be re-signed.
|
||||
;---------------------------------------------------------------------------------
|
||||
; Windows Custom/Vendor Class WinUSB Setup File
|
||||
; Copyright (C) 2012 Microchip Technology Inc.
|
||||
;---------------------------------------------------------------------------------
|
||||
; This .inf file is a modified version of the example INF provided
|
||||
; in the Microsoft document:
|
||||
; "How to Use WinUSB to Communicate with a USB Device"
|
||||
;---------------------------------------------------------------------------------
|
||||
|
||||
|
||||
[Version]
|
||||
Signature = "$Windows NT$"
|
||||
Class = CustomUSBDevices
|
||||
ClassGuid= {a503e2d3-a031-49dc-b684-c99085dbfe92}
|
||||
Provider = %MFGNAME%
|
||||
DriverVer=12/03/2012,1.0.0.7
|
||||
CatalogFile=mchpwinusb.cat ;CAT file needed for a signed driver pacakage
|
||||
;------------------------------------------------------------------------------
|
||||
; ========== Manufacturer/Models sections ===========
|
||||
;------------------------------------------------------------------------------
|
||||
[Manufacturer]
|
||||
%MFGNAME% = MyDevice_WinUSB,NTx86,NTamd64
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Vendor and Product ID Definitions
|
||||
;------------------------------------------------------------------------------
|
||||
; When developing your custom USB device, the VID and PID used in the PC side
|
||||
; application program and the firmware on the microcontroller must match.
|
||||
; Modify the below lines to use your VID and PID. Use the format as shown below.
|
||||
; Note: One INF file can be used for multiple devices with different VID and PIDs.
|
||||
; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
|
||||
; There is a maximum number of devices that can be supported per line however.
|
||||
; If you append a large number of VID/PIDs to the end of the line, and get a:
|
||||
; "The data area passed to a system call is too small." error when trying to install
|
||||
; the INF, try removing some of the VIDs/PIDs.
|
||||
;------------------------------------------------------------------------------
|
||||
[MyDevice_WinUSB.NTx86]
|
||||
%DESCRIPTION% =USB_Install, USB\VID_04d8&PID_0053,USB\VID_04d8&PID_0052,USB\VID_04d8&PID_020A,USB\VID_04d8&PID_020B,USB\VID_04d8&PID_020F,USB\VID_04d8&PID_005F&MI_01,USB\VID_04d8&PID_020C&MI_01,USB\VID_04d8&PID_020D&MI_02
|
||||
|
||||
[MyDevice_WinUSB.NTamd64]
|
||||
%DESCRIPTION% =USB_Install, USB\VID_04d8&PID_0053,USB\VID_04d8&PID_0052,USB\VID_04d8&PID_020A,USB\VID_04d8&PID_020B,USB\VID_04d8&PID_020F,USB\VID_04d8&PID_005F&MI_01,USB\VID_04d8&PID_020C&MI_01,USB\VID_04d8&PID_020D&MI_02
|
||||
|
||||
|
||||
|
||||
;=========================================================================================
|
||||
;ClassInstall32 and ClassInstall_AddReg sections used to make new device manager category.
|
||||
;=========================================================================================
|
||||
[ClassInstall32]
|
||||
AddReg=ClassInstall_AddReg
|
||||
|
||||
[ClassInstall_AddReg]
|
||||
HKR,,,,%DEVICEMANAGERCATEGORY%
|
||||
HKR,,Icon,,"-20"
|
||||
|
||||
|
||||
; =================== Installation ===================
|
||||
|
||||
[USB_Install]
|
||||
Include=winusb.inf
|
||||
Needs=WINUSB.NT
|
||||
|
||||
[USB_Install.Services]
|
||||
Include=winusb.inf
|
||||
AddService=WinUSB,0x00000002,WinUSB_ServiceInstall
|
||||
|
||||
[WinUSB_ServiceInstall]
|
||||
DisplayName = %WinUSB_SvcDesc%
|
||||
ServiceType = 1
|
||||
StartType = 3
|
||||
ErrorControl = 1
|
||||
ServiceBinary = %12%\WinUSB.sys
|
||||
|
||||
[USB_Install.Wdf]
|
||||
KmdfService=WINUSB, WinUsb_Install
|
||||
|
||||
[WinUSB_Install]
|
||||
KmdfLibraryVersion=1.11
|
||||
|
||||
[USB_Install.HW]
|
||||
AddReg=Dev_AddReg
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
;When editing the GUID (the big hex number with dashes inside the squiggly
|
||||
;braces), make sure to write the intended PC application to use the same GUID.
|
||||
;Otherwise the application won't be able to find the USB device properly.
|
||||
;The GUID is intended to be a "Globablly Unique Identifier". When making a new
|
||||
;product, the VID, PID, and GUID should be updated, to avoid potential conflicts
|
||||
;with any existing products.
|
||||
;------------------------------------------------------------------------------
|
||||
[Dev_AddReg]
|
||||
HKR,,DeviceInterfaceGUIDs,0x10000,"{58D07210-27C1-11DD-BD0B-0800200C9A66}"
|
||||
|
||||
[USB_Install.CoInstallers]
|
||||
AddReg=CoInstallers_AddReg
|
||||
CopyFiles=CoInstallers_CopyFiles
|
||||
|
||||
[CoInstallers_AddReg]
|
||||
HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01011.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"
|
||||
|
||||
[CoInstallers_CopyFiles]
|
||||
WinUSBCoInstaller2.dll
|
||||
WdfCoInstaller01011.dll
|
||||
|
||||
[DestinationDirs]
|
||||
CoInstallers_CopyFiles=11
|
||||
|
||||
; ================= Source Media Section =====================
|
||||
|
||||
[SourceDisksNames]
|
||||
1 = %DISK_NAME%,,,\i386
|
||||
2 = %DISK_NAME%,,,\amd64
|
||||
|
||||
[SourceDisksFiles.x86]
|
||||
WinUSBCoInstaller2.dll=1
|
||||
WdfCoInstaller01011.dll=1
|
||||
|
||||
[SourceDisksFiles.amd64]
|
||||
WinUSBCoInstaller2.dll=2
|
||||
WdfCoInstaller01011.dll=2
|
||||
|
||||
; =================== Strings ===================
|
||||
|
||||
[Strings]
|
||||
MFGNAME="Microchip Technology, Inc."
|
||||
DESCRIPTION="WinUSB Device"
|
||||
WinUSB_SvcDesc="WinUSB Device"
|
||||
DISK_NAME="WinUSB Device Install Disk"
|
||||
DEVICEMANAGERCATEGORY="Custom USB Devices"
|
||||
|
||||
Reference in New Issue
Block a user