|
|
View previous topic :: View next topic |
Author |
Message |
Username0C Guest
|
LCD driver string formating |
Posted: Sun Nov 01, 2009 8:37 am |
|
|
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
|
|
Posted: Sun Nov 01, 2009 2:58 pm |
|
|
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. |
|
|
|
|
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
|