Paul Evans
/
Newhaven_LCD
Newhaven 320x240 LCD
Diff: newhaven.h
- Revision:
- 1:fa44aeffcfd6
- Parent:
- 0:c8893901ef8a
- Child:
- 2:2058e2f79157
diff -r c8893901ef8a -r fa44aeffcfd6 newhaven.h --- a/newhaven.h Sun Feb 27 21:01:16 2011 +0000 +++ b/newhaven.h Sun Feb 27 21:14:19 2011 +0000 @@ -1,7 +1,38 @@ -#include "mbed.h" +/* mbed Newhaven LCD Library, for the NHD-320240WG model + * Copyright (c) 2011, Paul Evans + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "mbed.h" class NHLCD { public: + /* Creates a Newhaven LCD interface using several DigitalOut pins and a 8-bit BusInOut + * + * @param PIN_E Operation enable signal + * @param PIN_RW Read/Write select signal (1 = read, 0 = write) + * @param PIN_A0 Register select signal (1 = data, 0 = command) + * @param PIN_CS Active LOW chip select + * @param PIN_RST Active LOW reset signal + * @param BUSLCD Bi-directional 8-bit data bus + */ NHLCD(PinName PIN_E,PinName PIN_RW,PinName PIN_A0,PinName PIN_CS,PinName PIN_RST, BusInOut *BUSLCD); void Init(); void comm_out(unsigned char j);