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 CCS Technical Support

LCD driver string formating

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







LCD driver string formating
PostPosted: Sun Nov 01, 2009 8:37 am     Reply with quote

I'm having problems with lcd eaDogme string formatting.

The driver from the code library is working OK but I don't know how
to set some signs or how to use \f .
What I want to do is set the >> sign before some other text.
Code:

printf(lcd_putc,"\f >> %s",Value);

In eadogme this should be set like this:
Code:

printf(eaDogM_WriteString, Value);

but on this way I can't set any >> sign
so this should be done like:
Code:

#define EADMSYM_DARWR   0b11111100     // double >>
void eaDogM_double(void) {
   eaDogM_WriteCommand(EADMSYM_DARWR);
}

But how to call it inside WriteString function ?.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Nov 01, 2009 2:58 pm     Reply with quote

Quote:

I'm having problems with lcd eaDogme string formatting.

You could use sprintf() to put formatted output into a character buffer
(an array). Then give the buffer to the EADogm write_string routine.


Quote:

In eadogme this should be set like this:

printf(eaDogM_WriteString, Value);

I don't think that's true.

At the top of his program, he says the function takes a single char
as the argument:
Code:
eaDogM_WriteString(char str); // writes a string to the display

But then within the program, he now says it takes a string pointer:
Code:
void eaDogM_WriteString(char *strPtr)

Your proposed code assumes that his first definition is correct.
But in fact, the write string function really expects a string buffer.
That's why I suggested using sprintf() to make string, and put it into
a buffer (you must declare the buffer before using sprintf), and then
give the buffer to the write string function.
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