CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

USB.c

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
cconner



Joined: 16 Aug 2006
Posts: 1
Location: Morgantown, WV

View user's profile Send private message

USB.c
PostPosted: Wed Aug 16, 2006 11:28 am     Reply with quote

Quote:
case USB_STANDARD_REQUEST_GET_INTERFACE:
if ( curr_config && (usb_ep0_rx_buffer[4] < USB_NUM_INTERFACES[curr_config-1]) ) { //book says only supports configed state
debug_usb(debug_putc,"GI");
usb_ep0_tx_buffer[0]=USB_Interface[usb_ep0_rx_buffer[4]];//our new outgoing byte
usb_request_send_response(1);; //send byte back
}
else
usb_request_stall();
break;


At the bolded above section in USB.c, I am getting a "Previous identifier must be a pointer" error. Can anyone help me? Or let me know what other information you need.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Aug 16, 2006 11:45 am     Reply with quote

What CCS example file are you compiling that includes the USB.c driver ?
I made a MPLAB project for EX_USB_HID.c, with a 16C765. I compiled
it with PCM vs. 3.249 and it compiled with no errors. It uses the USB.c
driver file.

Also, what PIC are you compiling it for, and what's your compiler version ?
Guest








PostPosted: Thu Aug 17, 2006 8:56 am     Reply with quote

I'm using the USB_Desc.h example file with a PIC18F4550. I'm using the PCH vs 3.2something....not sure the exact version, I can get it in a bit.
Ttelmah
Guest







PostPosted: Thu Aug 17, 2006 10:06 am     Reply with quote

There is not a 'usb_desc.h' file. All these files will be something like 'usb_desc_mouse.h'. Notice the extra bit after the 'desc'. This is the descriptor file for a mouse device, and ones are provided for cdc, hid, a couple of keyboard/mouse combinations, and the 'scope' demo.
Now, the usb.c file, is a set of drivers, which has to be used in conjunction with a descriptor file. The files in the 'drivers' directory, are not themselves designed to compile. The files that show how to use these, are in the 'examples' directory, where (for example) 'ex_usb_mouse.c', shows how to use the above 'mouse' descriptor file. Notice the sequence in particular, where the hardware interface drivers are first included, then the descriptor file, and only then the 'usb.c' driver file. This order is _essential_, with usb.c, requiring data from the earlier files to work.
It sounds as if you are perhaps trying to set up your own 'test' enviroment using these files. If so, lookat how the examples do it first.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group