I am writing a application on WinCE6.0 to test USB HOST.
My application should set USB HOST port into TEST_MODE for TEST_J,TEST_K etc
I am building USB_COMP_TEST.exe in \WINCE600\PLATFORM\SMDK6450\SDK\ and running it on board.
I am trying to get the file handle for EHCI driver using below API
hEHCIDrv = CreateFile(L"HCD1:", GENERIC_READ|GENERIC_WRITE, 0, NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);The API call is success.
Now I am trying to create my IOCTL code using below snippet:
#define EHCI_DEVICE_TYPE (0xC000) // EHCI-unique device type random number written
#define IOCTL_EHCI_REQ CTL_CODE(EHCI_DEVICE_TYPE,500, METHOD_BUFFERED, FILE_ANY_ACCESS)
And trying post this IOCTL to HCD1(EHCI driver).
IOCTL_Result =DeviceIoControl(hEHCIDrv, IOCTL_EHCI_REQ, &ctrl_req, sizeof(USB_DEVICE_REQUEST), NULL, 0, NULL, NULL);
But after posting this my control is not coming to HCD_IOControl().
Please let me know Is this the way to Interact with EHCI driver from user app(USB_COMP_TEST.exe ).