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

PIC18F4550 + USB + HeaderFiles

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



Joined: 12 Dec 2005
Posts: 50
Location: Curitiba - Brazil

View user's profile Send private message Send e-mail

PIC18F4550 + USB + HeaderFiles
PostPosted: Wed Jun 21, 2006 12:33 pm     Reply with quote

Hi,
PIC18F4550 MPLAB 7.10 CCS3.235

I initialize the usb CDC driver in the main routine inside code.c file, which calls a library show.h. Inside this library I have a
Code:
printf(usb_cdc_putc,"x_axis = %5lu    alfa  = %f    v_x = %f \n\r",x_axis, alfa, v_x);
.
The problem is that the copiler does not find the usb_cdc_putc pointer inshow.h because it was not declared in this file, and receive a
Quote:
: Undefined identifier usb_cdc_putc
error.
How or where do I declare the pointer usb_cdc_putc inside show.h so that I can use both the code.c and show.h files without any problem ?
What do I have to change in the code.c main routine ?
Thanks for any help.
Pasini
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jun 21, 2006 1:08 pm     Reply with quote

usb_cdc_putc is the name of a function, and it's declared in the
USB_CDC.H file, which is in this folder:

c:\program files\picc\drivers

Just include the usb_cdc.h file in your program with an #include statement.

Look at these two CCS example files. The both have an #include
statement for the usb_cdc.h file.
c:\program files\picc\examples\ex_usb_serial.c
c:\program files\picc\examples\ex_usb_serial2.c
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