View previous topic :: View next topic |
Author |
Message |
jmaurin
Joined: 29 Mar 2008 Posts: 26 Location: Ribeirão Preto, SP, Brasil
|
Send string to function as parameter |
Posted: Sun Jul 27, 2008 12:37 am |
|
|
Hi. This is possible in CCS?
I need to send a string to my custom function in CCS, but i don't know how.
Creating a function like lcd_putc and calling like " printf(lcd_putc,'test'); " doesn't work because printf will call 'lcd_putc' 4 times, one for each char and i need to call the function only one.
PS: currently, i'm using a global variable (char[50]) to pass the string, so i need this code to work:
Code: | strcpy(var,"test");
MyFunction(); |
So, in my function i work with 'var' to get the text. I would like to simple call:
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
jmaurin
Joined: 29 Mar 2008 Posts: 26 Location: Ribeirão Preto, SP, Brasil
|
|
Posted: Sun Jul 27, 2008 8:31 pm |
|
|
thank you! |
|
|
|