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 2:67c271b56755, committed 2014-01-19
- Comitter:
- pwheels
- Date:
- Sun Jan 19 14:09:22 2014 +0000
- Parent:
- 1:e7ce82863fe9
- Commit message:
- update on display coding
Changed in this revision
lc_display.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/lc_display.h Fri Jan 17 15:58:39 2014 +0000 +++ b/lc_display.h Sun Jan 19 14:09:22 2014 +0000 @@ -181,14 +181,14 @@ } void _WriteLCD(int Cmd, char *par1, int par2) { -// par2 maintained in call but no longer used +// par2 != 0 -> use par2 else actual length of string int i; int j = 1000; i2c.start(); i2c.write(I2C_ADDR); i2c.write(Cmd & 0xff); // Set Command - for (i = 0; i < strlen(par1); i++) { + for (i = 0; i < (par2 != 0) ? par2 : strlen(par1); i++) { i2c.write(par1[i]); } i2c.stop();