Hui Xie(deleted)
|
USB DDK, usbd_alloc usbd_alloc_urb fails
|
Hui Xie(deleted)
05/15/2013 1:43 AM
post101426
|
USB DDK, usbd_alloc usbd_alloc_urb fails
Hi Guys,
I am new to QNX, and recently I began to write a driver code for the USB device. Everything goes well until now I found
that I cannot alloc memory using usbd_alloc usbd_alloc_urb.
#include <cstdlib>
#include <iostream>
using namespace std;
#include <sys/neutrino.h>
#include<sys/usbdi.h>
//#include "PCTx.h"
int main(int argc, char *argv[]) {
std::cout << "Welcome to the QNX Momentics IDE" << std::endl;
//// std::cout<<"Debug"<<std::endl;
// usbd_urb* hello =(usbd_urb*)10000;
usbd_alloc_urb(NULL);
// PCTx *myPCTx = PCTx::getInstance();
// bool connected = myPCTx->connect(argc, argv);
// cout<<"The connected value : "<<connected<<endl;
// myPCTx->updateChannel(2,200);
while(1);
cout<<"exit"<<endl;
return EXIT_SUCCESS;
}
The program just stops at "usbd_alloc_urb(NULL);"
no errors come out.
|
|
|