Fork of LCD-Window which works with Enhanced TextLCD from Wim
Fork of LcdWindow by
Diff: hd44780_8bit.cpp
- Revision:
- 1:65f72ed914fa
- Parent:
- 0:ae5037e3d6e0
- Child:
- 2:5ac5bab7daaf
--- a/hd44780_8bit.cpp Mon Nov 15 22:37:30 2010 +0000
+++ b/hd44780_8bit.cpp Tue Nov 16 20:49:18 2010 +0000
@@ -28,7 +28,7 @@
#include "wait_api.h"
-void HD44780LCD8bit::writeText(unsigned int line, unsigned int pos, char text[]) {
+void HD44780LCD8bit::writeText(const unsigned int line, const unsigned int pos, const char text[]) {
// printf("print to %d,%d {%s}\n",line,pos,text);
int address=line*0x40+pos;
sendCmd((unsigned char)address|0x80);
@@ -46,13 +46,13 @@
sendCmd(1);
}
-void HD44780LCD8bit::sendCmd(unsigned char cmd) {
+void HD44780LCD8bit::sendCmd(const unsigned char cmd) {
_rs->write(0);
wait_us(1);
sendByte(cmd);
}
-void HD44780LCD8bit::sendData(unsigned char cmd) {
+void HD44780LCD8bit::sendData(const unsigned char cmd) {
_rs->write(1);
wait_us(1);
sendByte(cmd);
@@ -77,7 +77,7 @@
}
}
-void HD44780LCD8bit::sendByte(unsigned char byte) {
+void HD44780LCD8bit::sendByte(const unsigned char byte) {
_data->write(byte);
_enable->write(1);
wait_us(2);
