Display text on LCD displays (even on multiple ones). Allow to create windows (frames) on display, and to combine them (split, add, duplicate, scroll). See http://mbed.org/users/hlipka/notebook/lcdwindow/ for more information.

Dependents:   Mbell

Committer:
hlipka
Date:
Tue Feb 22 22:57:44 2011 +0000
Revision:
9:2fe93daa2106
Parent:
4:aa08e82834dc
fixed semaphore handling - should now be really thread safe (can be called from interrupts)

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
hlipka 4:aa08e82834dc 35 TextLCDAdapter(TextLCD* lcd);
hlipka 4:aa08e82834dc 36 virtual void clear();
hlipka 4:aa08e82834dc 37
hlipka 4:aa08e82834dc 38 virtual int getRows();
hlipka 4:aa08e82834dc 39 virtual int getColumns();
hlipka 4:aa08e82834dc 40 virtual void character(int column, int row, int c);
hlipka 4:aa08e82834dc 41 int putc(int c);
hlipka 4:aa08e82834dc 42 int printf(const char* format, ...);
hlipka 4:aa08e82834dc 43
hlipka 4:aa08e82834dc 44 private:
hlipka 4:aa08e82834dc 45 TextLCD *_lcd;
hlipka 4:aa08e82834dc 46
hlipka 4:aa08e82834dc 47 };
hlipka 4:aa08e82834dc 48
hlipka 4:aa08e82834dc 49 #endif