这是我的程序 我用的是avr单片机 自带usb #include <cstdlib> #include <iostream> #include <windows.h> #include "AtUsbHid.h"
#define Vid 0x03EB #define Pid 0x2013
using namespace std;
void main(void) { HINSTANCE hLib = NULL; hLib =LoadLibrary(AT_USB_HID_DLL); if(hLib == NULL){ cout << "no hlib\n"; } //cout << "ok\n"; if (loadFuncPointers(hLib)==NULL) { cout << "no load\n"; }
if (DYNCALL(findHidDevice(Vid, Pid))) { // timer1->Enabled=true; // button1->Text="Ready"; // timer1->Start; cout << "ok\n"; } else { // Can't access leds button if not connected cout << "no device\n"; } //system("PAUSE"); // return EXIT_SUCCESS; } 结果显示 no device at90usb的id 如我所写vid0x03EB Pid 0x2013 但是为什么我电脑还是只能显示unknown device呢 请大虾指点下
|