sparkfun Compatible Serial LCD
SerialLcd.cpp
- Committer:
- komaida424
- Date:
- 2013-07-11
- Revision:
- 0:f30bad3f815d
File content as of revision 0:f30bad3f815d:
#include "mbed.h" #include "SerialLcd.h" SerialLcd::SerialLcd(PinName TX): _lcd(TX,NC) { // 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); } ;