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: dogm_spi.cpp
- Revision:
- 3:e5d5e2fe4bf6
- Parent:
- 2:5ac5bab7daaf
- Child:
- 9:2fe93daa2106
diff -r 5ac5bab7daaf -r e5d5e2fe4bf6 dogm_spi.cpp
--- a/dogm_spi.cpp Sat Nov 27 22:54:13 2010 +0000
+++ b/dogm_spi.cpp Sun Nov 28 22:09:54 2010 +0000
@@ -50,15 +50,18 @@
void DogmLCDSPI::character(int column, int row, int c)
{
int address=(row)*0x40+(column);
+ _guard->take();
sendCmd((char)address|0x80);
wait_ms(1);
sendData(c);
+ _guard->release();
wait_ms(1);
}
void DogmLCDSPI::writeText(const unsigned int column, const unsigned int row, const char text[])
{
int address=(row)*0x40+(column);
+ _guard->take();
sendCmd((char)address|0x80);
wait_ms(1);
@@ -69,10 +72,13 @@
wait_ms(1);
i++;
}
+ _guard->release();
}
void DogmLCDSPI::clear()
{
+ _guard->take();
sendCmd(1);
+ _guard->release();
}
