Hi all. Mcc18 has a function in string.h file called strcpypgm2ram() defined as:
Quote:
char *strcpypgm2ram (auto char *s1, auto const MEM_MODEL rom char *s2);
/** @name strcpyram2pgm
* The {\bf strcpyram2pgm} function performs a {\bf strcpy} where {\bf s1}
* points to program memory and {\bf s2} point to data memory.
* @param s1 pointer to destination in program memory
* @param s2 pointer to source in data memory
*/
In my LCD.c file I am using this function as:
strcpypgm2ram((char *)t_string,version);
where version is : rom const char version[] = "0_00";
and t_string is : unsigned char t_string[12];
How do I do that in CCS?
Regards
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Fri Nov 28, 2008 8:46 am
It's very simple. Use strcpy().
Code:
strcpy(t_string, version);
BlueTower
Joined: 23 Oct 2008 Posts: 29
Posted: Fri Nov 28, 2008 11:56 am
Thanks I have done that before you reply. I should have reply earlier saying it's ok. Sorry.
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