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 LcdWindow by
Diff: ks0108_8bit.cpp
- Revision:
- 3:e5d5e2fe4bf6
- Parent:
- 2:5ac5bab7daaf
- Child:
- 9:2fe93daa2106
diff -r 5ac5bab7daaf -r e5d5e2fe4bf6 ks0108_8bit.cpp
--- a/ks0108_8bit.cpp Sat Nov 27 22:54:13 2010 +0000
+++ b/ks0108_8bit.cpp Sun Nov 28 22:09:54 2010 +0000
@@ -39,9 +39,11 @@
}
void KS0108LCD8bit::clear() {
+ _guard->take();
clearHalf(_left);
if (NULL!=_right)
clearHalf(_right);
+ _guard->release();
}
void KS0108LCD8bit::clearHalf(DigitalOut* cs) {
@@ -74,6 +76,7 @@
if (NULL==cs)
return;
+ _guard->take();
sendCmd(0xb8|row,cs); // set x page
unsigned int y=icolumn*8;
@@ -85,6 +88,7 @@
sendData(font_data[c][i],cs);
}
+ _guard->release();
}
KS0108LCD8bit::KS0108LCD8bit
