AnsweredAssumed Answered

Question on USB_ROM_HID Example

Question asked by Timothy Masters on Feb 1, 2017
Latest reply on Feb 9, 2017 by jeremyzhou

Hi,

 

I am trying to get the NXP USB_ROM_HID Example to compile on LCPXpresso IDE. I had to change several of the statements to use the version of lpc_chip_11uxx_lib on my machine. But I am still having a problem with one line of the example to get a successful compile.

 

This is the trouble line:

 

pUsbApi = (USBD_API_T*)((*ROM **)(0x1FFF1FF8))->pUSBD);

 

The compiler error for this line is:

error: 'ROM' undeclared (first use in this function)

 

I have attached both the example main.c file and my edited version (NXP_USB.c) which compiles with the exception of the one line above to provide further information. I admit I am not sure what is going on with the USB API at all but am trying to trudge through the example to understand it. I have written embedded code for HID USB devices several times in my career at the assembly level so I have a good understanding what has to happen to get the device to configure and how to manage transactions. But I am inexperienced using the high level API.  I am sure it is much easier than the granular assembly drivers I wrote previously but I can't seem to comprehend how to utilize the USB_ROM_API.

 

If anyone could go through my file and add some comments about what is going on when the different USB API interaction is occurring, I would greatly appreciate it.

 

After I get the example to run, I am not sure how to manage the data for the endpoint0 and 1 in and out. Somewhat lost on this. 

 

Thanks

Tim

Original Attachment has been moved to: NXP_USB.c.zip

Original Attachment has been moved to: main.c.zip

Original Attachment has been moved to: compiler-error.txt.zip

Outcomes