| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| JGoodman 
 
 
 Joined: 25 Aug 2005
 Posts: 8
 
 
 
			    
 
 | 
			
				| lcd.c limitation |  
				|  Posted: Mon Aug 29, 2005 7:00 am |   |  
				| 
 |  
				| 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
 
 
			      
 
 | 
			
				|  |  
				|  Posted: Mon Aug 29, 2005 7:18 am |   |  
				| 
 |  
				| 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
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Mon Aug 29, 2005 7:49 am |   |  
				| 
 |  
				| Thank you very much, that did the trick! 
 J G
 |  | 
	
		|  | 
	
		|  |