Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - USB DDK, usbd_alloc usbd_alloc_urb fails: (2 Items)
   
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.
Attachment: Text PCTx_USB.cpp 518 bytes
Re: USB DDK, usbd_alloc usbd_alloc_urb fails  
Thanks in advance. Your time and help is really appreciated.