Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 6:83cada1140d4, committed 2013-05-13
- Comitter:
- codeman
- Date:
- Mon May 13 18:00:23 2013 +0000
- Parent:
- 5:4a6254e2012f
- Commit message:
- Public beta version
Changed in this revision
| ezLCDLib.cpp | Show annotated file Show diff for this revision Revisions of this file |
| ezLCDLib.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/ezLCDLib.cpp Thu May 02 02:32:26 2013 +0000
+++ b/ezLCDLib.cpp Mon May 13 18:00:23 2013 +0000
@@ -126,7 +126,7 @@
*str++ = c;
}
timeOut++;
- } while(c!='\r' && timeOut != 0xfffff);
+ } while(c!='\r' && timeOut != 0xfffffff);
*str--;
*str = 0;
}
@@ -136,7 +136,7 @@
char c=0;
unsigned long timeOut=0;
while(rx_in == rx_out) {
- if(timeOut++ > 0xfffff) return false;
+ if(timeOut++ > 0xffffff) return false;
}
c=rx_buffer[rx_out];
rx_out = (rx_out + 1) % buffer_size;
@@ -249,13 +249,13 @@
waitForCR();
}
-void ezLCD3::box(int x, int y, bool filled)
+void ezLCD3::box(int width, int heigth, bool filled)
{
sendInt(Box);
_ser.putc(' ');
- sendInt(x);
+ sendInt(width);
_ser.putc(' ');
- sendInt(y);
+ sendInt(heigth);
if(filled) {
_ser.putc(' ');
_ser.putc('f');
@@ -264,15 +264,13 @@
waitForCR();
}
-void ezLCD3::light(int i)
+void ezLCD3::light(int level)
{
- if (i >= 0 && i <= 100) {
- sendInt(Light);
+ sendInt( Light );
putc(' ');
- sendInt( i );
+ sendInt( level );
putc('\r');
waitForCR();
- }
}
int ezLCD3::getXmax( void )
@@ -342,6 +340,17 @@
waitForCR();
}
+void ezLCD3::fontw( int ID, int font)
+{
+ sendInt(Fontw);
+ _ser.putc(' ');
+ sendInt(ID);
+ _ser.putc(' ');
+ sendInt(font);
+ _ser.putc('\r');
+ waitForCR();
+}
+
void ezLCD3::font( char *str)
{
sendInt(Font);
--- a/ezLCDLib.h Thu May 02 02:32:26 2013 +0000
+++ b/ezLCDLib.h Mon May 13 18:00:23 2013 +0000
@@ -212,12 +212,12 @@
bool sync( void );
/** Send a integer to the display
- * @param i integer to send
+ * @param[in] i integer to send
*/
void sendInt( int i );
/** Get a integer from the display
- * @param str string to put the data in
+ * @param[out] str string to put the data in
*
*/
int getInt( char *str );
@@ -269,51 +269,51 @@
/** set pixel in current draw color at x y
*
- * @param x is the x coordinate
- * @param y is the y coordinate
+ * @param[in] x is the x coordinate
+ * @param[in] y is the y coordinate
*/
void plot(int x, int y);
/** draw line from current x y to new x y
*
- * @param x is the x coordinate
- * @param y is the y coordinate
+ * @param[in] x is the x coordinate
+ * @param[in] y is the y coordinate
*/
void line(int x, int y);
/** Set line drawing type
- * @param type Options: 0 = solid, 1= dotted (1 pixel spacing between dots), 2 = dashed (2 pixel spacing between dashes)
+ * @param[in] type Options: 0 = solid, 1= dotted (1 pixel spacing between dots), 2 = dashed (2 pixel spacing between dashes)
*
*
*/
void lineType( int type );
/** Set line drawing width
- * @param width in pixels
+ * @param[in] width in pixels
*
*
*/
void lineWidth( int width );
/** Draw circle in current color at current x y
*
- * @param radius diameter of circle
- * @param filled true for a filled box outline if false
+ * @param[in] radius diameter of circle
+ * @param[in] filled true for a filled box outline if false
*/
void circle(int radius, bool filled);
- /** draw a box from current x y to new x y
+ /** draw a box from current x y of width and heigth
*
- * @param x
- * @param y
- * @param filled true for a filled box outline if false
+ * @param[in] width
+ * @param[in] heigth
+ * @param[in] filled true for a filled box outline if false
*/
- void box(int x, int y, bool filled);
+ void box(int width, int heigth, bool filled);
/** set backlight brightness
*
- * @param i is brightness 0=off 100=full in steps of 32
+ * @param[in] level is brightness 0=off 100=full in steps of 32
*/
- void light(int i);
+ void light(int level);
/** Send a command direct to display
* @param str command string
@@ -375,6 +375,7 @@
*/
void fontw( int id, char *str);
+ void fontw( int ID, int font);
/**
*
*