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.
Fork of DigoleSerialDisp by
Revision 5:920614dc6fca, committed 2016-10-24
- Comitter:
- pinfred
- Date:
- Mon Oct 24 16:24:54 2016 +0000
- Parent:
- 4:c4b2a8f0d056
- Child:
- 6:3ed9cddf46d0
- Commit message:
- add functions
Changed in this revision
| DigoleSerialDisp.cpp | Show annotated file Show diff for this revision Revisions of this file |
| DigoleSerialDisp.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/DigoleSerialDisp.cpp Mon Feb 25 06:12:59 2013 +0000
+++ b/DigoleSerialDisp.cpp Mon Oct 24 16:24:54 2016 +0000
@@ -25,8 +25,8 @@
_device(sda, scl)
{
_address = (address<<1);
- _device.frequency(100000);
- _Comdelay=70;
+ _device.frequency(300000);
+ _Comdelay=70;//70;
}
size_t DigoleSerialDisp::write(const char x)
@@ -345,6 +345,21 @@
}
}
+void DigoleSerialDisp::drawBitmap256(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *bitmap) {
+ uint8_t i = 0;
+ if ((w & 7) != 0)
+ i = 1;
+ write("EDIM1");
+ write(x); //x;
+ write(y);
+ write(w);
+ write(h);
+ for (int j = 0; j < h * w; j++) {
+ write((const char *) (bitmap+j));
+ delay(1);
+ }
+}
+
void DigoleSerialDisp::setRot90(void) {
write("SD1");
}
@@ -443,6 +458,11 @@
write(color);
}
+void DigoleSerialDisp::setBgColor(uint8_t color) {
+ write("BGC");
+ write(color);
+}
+
void DigoleSerialDisp::backLightOn(void) {
write("BL");
write(1);
--- a/DigoleSerialDisp.h Mon Feb 25 06:12:59 2013 +0000
+++ b/DigoleSerialDisp.h Mon Oct 24 16:24:54 2016 +0000
@@ -252,6 +252,7 @@
/*----------Functions for Graphic LCD/OLED adapters only---------*/
//the functions in this section compatible with u8glib
void drawBitmap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *bitmap);
+ void drawBitmap256(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *bitmap);
void setRot90(void);
void setRot180(void);
void setRot270(void);
@@ -281,6 +282,9 @@
/** set color for graphic function */
void setColor(uint8_t);
+
+ /** set bg color for graphic function */
+ void setBgColor(uint8_t);
/** Turn on back light */
void backLightOn(void);
