View previous topic :: View next topic |
Author |
Message |
alwaysfresh
Joined: 04 Jul 2005 Posts: 8
|
|
Posted: Thu Jul 07, 2005 9:00 am |
|
|
Mark wrote: | You might have a little trouble if there are any pointers to consts but you can work around that. |
I have found a couple of const lilke:
void function(const rom char *data);
I would like to know how to handle this. I removed the "rom" because ccs does not know what to do with it. Still doesn't compile through, but I would like to know what are the troubles with pointers to consts.
void function(const char *data);
All advice is very much appreciated Mark,
Andy |
|
|
Darren Rook
Joined: 06 Sep 2003 Posts: 287 Location: Milwaukee, WI
|
|
Posted: Thu Jul 07, 2005 9:13 am |
|
|
Just so you know, CCS provides their own CDC library. It's not a port of Microchip's. It's not included in the compiler yet, you have to ask CCS nicely in an e-mail. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Thu Jul 07, 2005 12:09 pm |
|
|
alwaysfresh wrote: | Mark wrote: | You might have a little trouble if there are any pointers to consts but you can work around that. |
I have found a couple of const lilke:
void function(const rom char *data);
I would like to know how to handle this. I removed the "rom" because ccs does not know what to do with it. Still doesn't compile through, but I would like to know what are the troubles with pointers to consts.
void function(const char *data);
All advice is very much appreciated Mark,
Andy |
CCS doesn't support pointers to consts. The easiest fix is to copy the const data to a char array and pass a pointer to the char array. |
|
|
alwaysfresh
Joined: 04 Jul 2005 Posts: 8
|
|
Posted: Fri Jul 08, 2005 6:42 am |
|
|
I will try to contact ccs to get the CDC library as mentioned by Darren. Thanks Mark for your always quick responses. If I am not able to get the library from CCS I will try to continue to port the c18 code. I'll post it if I ever get it done, so others may use it.
Andy |
|
|
alwaysfresh
Joined: 04 Jul 2005 Posts: 8
|
|
Posted: Tue Jul 12, 2005 10:14 am |
|
|
I got the CDC library from CCS support. If anyone is looking for CDC library for CCS you can email them and ask for it, as Darren has already mentioned.
If someone is familar with the code. I have one problem with the code, when I enable Interrupts-on-change the USB enumeration does not occur. This is done using the default settings of the CDC library provided by CCS. I can't find where the CDC library would be affected by port b settings.
Thanks
Andy |
|
|
alwaysfresh
Joined: 04 Jul 2005 Posts: 8
|
|
|
PICoHolic
Joined: 04 Jan 2005 Posts: 224
|
|
Posted: Thu Mar 30, 2006 2:03 am |
|
|
hi alwaysfresh
I was wondering if you were able to translate the rest of the CDC code from C18 to CCS!?!
Or you got it from CCS?
Sorry if I'm late. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Thu Mar 30, 2006 6:13 am |
|
|
Didn't you read what he said?!
alwaysfresh wrote: | I got the CDC library from CCS support. If anyone is looking for CDC library for CCS you can email them and ask for it, as Darren has already mentioned.
|
|
|
|
|