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:
- 2:5ac5bab7daaf
- Parent:
- 1:65f72ed914fa
- Child:
- 3:e5d5e2fe4bf6
--- a/dogm_spi.cpp Tue Nov 16 20:49:18 2010 +0000
+++ b/dogm_spi.cpp Sat Nov 27 22:54:13 2010 +0000
@@ -28,8 +28,8 @@
#include "wait_api.h"
DogmLCDSPI::DogmLCDSPI
-(unsigned int width, unsigned int height, SPI *spi, PinName enable, PinName rs)
-:SPILCDBase(width,height,spi,enable,rs)
+(unsigned int columns, unsigned int rows, SPI *spi, PinName enable, PinName rs)
+:SPILCDBase(columns,rows,spi,enable,rs)
{
}
@@ -47,9 +47,18 @@
}
}
-void DogmLCDSPI::writeText(const unsigned int line, const unsigned int pos, const char text[])
+void DogmLCDSPI::character(int column, int row, int c)
{
- int address=(line)*0x40+(pos);
+ int address=(row)*0x40+(column);
+ sendCmd((char)address|0x80);
+ wait_ms(1);
+ sendData(c);
+ wait_ms(1);
+}
+
+void DogmLCDSPI::writeText(const unsigned int column, const unsigned int row, const char text[])
+{
+ int address=(row)*0x40+(column);
sendCmd((char)address|0x80);
wait_ms(1);
