Fork of LCD-Window which works with Enhanced TextLCD from Wim

Fork of LcdWindow by Hendrik Lipka

Committer:
charly
Date:
Wed Jan 13 19:38:54 2016 +0000
Revision:
13:99b500b05716
Parent:
12:393329d0e050
added enableDisplay and disableDisplay for Terminal to stop the output to LCD.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hlipka 4:aa08e82834dc 1 /* mbed TextLCD Library, for a 4-bit LCD based on HD44780
hlipka 4:aa08e82834dc 2 * Copyright (c) 2007-2010, sford
hlipka 4:aa08e82834dc 3 *
hlipka 4:aa08e82834dc 4 * Permission is hereby granted, free of charge, to any person obtaining a copy
hlipka 4:aa08e82834dc 5 * of this software and associated documentation files (the "Software"), to deal
hlipka 4:aa08e82834dc 6 * in the Software without restriction, including without limitation the rights
hlipka 4:aa08e82834dc 7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
hlipka 4:aa08e82834dc 8 * copies of the Software, and to permit persons to whom the Software is
hlipka 4:aa08e82834dc 9 * furnished to do so, subject to the following conditions:
hlipka 4:aa08e82834dc 10 *
hlipka 4:aa08e82834dc 11 * The above copyright notice and this permission notice shall be included in
hlipka 4:aa08e82834dc 12 * all copies or substantial portions of the Software.
hlipka 4:aa08e82834dc 13 *
hlipka 4:aa08e82834dc 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
hlipka 4:aa08e82834dc 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
hlipka 4:aa08e82834dc 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
hlipka 4:aa08e82834dc 17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
hlipka 4:aa08e82834dc 18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
hlipka 4:aa08e82834dc 19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
hlipka 4:aa08e82834dc 20 * THE SOFTWARE.
hlipka 4:aa08e82834dc 21 */
hlipka 4:aa08e82834dc 22
hlipka 4:aa08e82834dc 23 #ifndef MBED_TEXTLCDADAPTER_H
hlipka 4:aa08e82834dc 24 #define MBED_TEXTLCDADAPTER_H
hlipka 4:aa08e82834dc 25
hlipka 4:aa08e82834dc 26 #include "TextLCD.h"
hlipka 4:aa08e82834dc 27 #include "window.h"
hlipka 4:aa08e82834dc 28
hlipka 4:aa08e82834dc 29 /**
hlipka 4:aa08e82834dc 30 * adapter class to wrap a TextLCD instance as Window
hlipka 4:aa08e82834dc 31 */
hlipka 4:aa08e82834dc 32 class TextLCDAdapter : public Window {
hlipka 4:aa08e82834dc 33 public:
hlipka 4:aa08e82834dc 34
charly 10:d40c70908bf0 35 TextLCDAdapter(TextLCD_Base* lcd);
hlipka 4:aa08e82834dc 36 virtual void clear();
charly 10:d40c70908bf0 37 virtual void writeText(const unsigned int column, const unsigned int row, const char text[]);
hlipka 4:aa08e82834dc 38
charly 12:393329d0e050 39 virtual int getRows() {return _rows;};
charly 12:393329d0e050 40 virtual int getColumns(){return _columns;};
hlipka 4:aa08e82834dc 41 virtual void character(int column, int row, int c);
hlipka 4:aa08e82834dc 42 int putc(int c);
hlipka 4:aa08e82834dc 43 int printf(const char* format, ...);
hlipka 4:aa08e82834dc 44
hlipka 4:aa08e82834dc 45 private:
charly 10:d40c70908bf0 46 TextLCD_Base *_lcd;
charly 12:393329d0e050 47 int _columns;
charly 12:393329d0e050 48 int _rows;
hlipka 4:aa08e82834dc 49 };
hlipka 4:aa08e82834dc 50
hlipka 4:aa08e82834dc 51 #endif