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

lcd.c limitation

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



Joined: 25 Aug 2005
Posts: 8

View user's profile Send private message

lcd.c limitation
PostPosted: Mon Aug 29, 2005 7:00 am     Reply with quote

Hello,

I may just be doing something wrong, but it seems like the lcd.c library which ccs provides is somewhat limited. I can only ouput characters that I type into the function call e.g. lcd_putc("Hello"). It does not seem like I can send strings or variables to this function e.g. char bob[6]="hello"; lcd_putc(bob);


Any advice?


-Thanks.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Mon Aug 29, 2005 7:18 am     Reply with quote

Did you even look at what the parameter for lcd_putc() is????? If you want to pass something else, write your own function or wrap the function inside another. you can also use the printf function with lcd_putc

Code:

  char *pointer;
  char bob[6]="hello";

  pointer = bob;
  while (*pointer)
  {
    lcd_putc(*pointer);
    pointer++;
  }

  printf(lcd_putc,"Hello");
  printf(lcd_putc,"%S",bob);
JGoodman



Joined: 25 Aug 2005
Posts: 8

View user's profile Send private message

PostPosted: Mon Aug 29, 2005 7:49 am     Reply with quote

Thank you very much, that did the trick!

J G
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