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.
SerialLcd/SerialLcd.cpp
- Committer:
- komaida424
- Date:
- 2014-10-14
- Revision:
- 4:4060309b9cc0
- Parent:
- 2:59ac9df97701
- Child:
- 8:1db19b529b22
File content as of revision 4:4060309b9cc0:
#include "mbed.h"
#include "SerialLcd.h"
SerialLcd::SerialLcd(PinName TX,PinName RX): _lcd(TX,RX)
{
// LCD_contrast = 60;
}
int SerialLcd::_putc(int value) {
_lcd.putc(value);
return value;
}
int SerialLcd::_getc() {
return -1;
}
void SerialLcd::cls()
{
_lcd.putc(0xFE);
_lcd.putc(0x01);
wait(0.01);
}
void SerialLcd::locate(int clm,int row)
{
_lcd.putc(0xFE);
_lcd.putc( 0x80 + (row * 0x40) + clm );
wait(0.01);
}
;