LPC1768 Mini-DK EasyWeb application with SPI TFT output. Started from EasyWebCR and modified for DM9161 PHY support.

Dependencies:   Mini-DK mbed

This is a very basic EasyWeb application.

No error checking is performed during initialisation.

Information

If the webpage is not reachable or the 'Webserver running' message does not appear, press the reset button on the Mini-DK and wait until the message 'Webserver running' appears.
This happens sometimes when powering up the Mini-DK because the DM9161 reset pin is NOT controlled by the LPC1768, it is directly connected to the reset button.

IP adress/mask/gateway in tcpip.h : 192.168.0.200 / 255.255.255.0 / 192.168.0.1

MAC address in ethmac.h : 6-5-4-3-2-1

Committer:
frankvnk
Date:
Fri Dec 21 15:41:54 2012 +0000
Revision:
0:636056c0b5e1
First version - rewrite from EasyWebCR

Who changed what in which revision?

UserRevisionLine numberNew contents of line
frankvnk 0:636056c0b5e1 1 /* mbed TextDisplay Library Base Class
frankvnk 0:636056c0b5e1 2 * Copyright (c) 2007-2009 sford
frankvnk 0:636056c0b5e1 3 * Released under the MIT License: http://mbed.org/license/mit
frankvnk 0:636056c0b5e1 4 *
frankvnk 0:636056c0b5e1 5 * A common base class for Text displays
frankvnk 0:636056c0b5e1 6 * To port a new display, derive from this class and implement
frankvnk 0:636056c0b5e1 7 * the constructor (setup the display), character (put a character
frankvnk 0:636056c0b5e1 8 * at a location), rows and columns (number of rows/cols) functions.
frankvnk 0:636056c0b5e1 9 * Everything else (locate, printf, putc, cls) will come for free
frankvnk 0:636056c0b5e1 10 *
frankvnk 0:636056c0b5e1 11 * The model is the display will wrap at the right and bottom, so you can
frankvnk 0:636056c0b5e1 12 * keep writing and will always get valid characters. The location is
frankvnk 0:636056c0b5e1 13 * maintained internally to the class to make this easy
frankvnk 0:636056c0b5e1 14 */
frankvnk 0:636056c0b5e1 15
frankvnk 0:636056c0b5e1 16 #ifndef MBED_TEXTDISPLAY_H
frankvnk 0:636056c0b5e1 17 #define MBED_TEXTDISPLAY_H
frankvnk 0:636056c0b5e1 18
frankvnk 0:636056c0b5e1 19 #include "mbed.h"
frankvnk 0:636056c0b5e1 20
frankvnk 0:636056c0b5e1 21 class TextDisplay : public Stream {
frankvnk 0:636056c0b5e1 22 public:
frankvnk 0:636056c0b5e1 23
frankvnk 0:636056c0b5e1 24 // functions needing implementation in derived implementation class
frankvnk 0:636056c0b5e1 25 /** Create a TextDisplay interface
frankvnk 0:636056c0b5e1 26 *
frankvnk 0:636056c0b5e1 27 * @param name The name used in the path to access the strean through the filesystem
frankvnk 0:636056c0b5e1 28 */
frankvnk 0:636056c0b5e1 29 TextDisplay(const char *name = NULL);
frankvnk 0:636056c0b5e1 30
frankvnk 0:636056c0b5e1 31 /** output a character at the given position
frankvnk 0:636056c0b5e1 32 *
frankvnk 0:636056c0b5e1 33 * @param column column where charater must be written
frankvnk 0:636056c0b5e1 34 * @param row where character must be written
frankvnk 0:636056c0b5e1 35 * @param c the character to be written to the TextDisplay
frankvnk 0:636056c0b5e1 36 */
frankvnk 0:636056c0b5e1 37 virtual void character(int column, int row, int c) = 0;
frankvnk 0:636056c0b5e1 38
frankvnk 0:636056c0b5e1 39 /** return number if rows on TextDisplay
frankvnk 0:636056c0b5e1 40 * @result number of rows
frankvnk 0:636056c0b5e1 41 */
frankvnk 0:636056c0b5e1 42 virtual int rows() = 0;
frankvnk 0:636056c0b5e1 43
frankvnk 0:636056c0b5e1 44 /** return number if columns on TextDisplay
frankvnk 0:636056c0b5e1 45 * @result number of rows
frankvnk 0:636056c0b5e1 46 */
frankvnk 0:636056c0b5e1 47 virtual int columns() = 0;
frankvnk 0:636056c0b5e1 48
frankvnk 0:636056c0b5e1 49 // functions that come for free, but can be overwritten
frankvnk 0:636056c0b5e1 50
frankvnk 0:636056c0b5e1 51 /** redirect output from a stream (stoud, sterr) to display
frankvnk 0:636056c0b5e1 52 * @param stream stream that shall be redirected to the TextDisplay
frankvnk 0:636056c0b5e1 53 */
frankvnk 0:636056c0b5e1 54 virtual bool claim (FILE *stream);
frankvnk 0:636056c0b5e1 55
frankvnk 0:636056c0b5e1 56 /** clear screen
frankvnk 0:636056c0b5e1 57 */
frankvnk 0:636056c0b5e1 58 virtual void cls();
frankvnk 0:636056c0b5e1 59 virtual void locate(int column, int row);
frankvnk 0:636056c0b5e1 60 virtual void foreground(uint16_t colour);
frankvnk 0:636056c0b5e1 61 virtual void background(uint16_t colour);
frankvnk 0:636056c0b5e1 62 // putc (from Stream)
frankvnk 0:636056c0b5e1 63 // printf (from Stream)
frankvnk 0:636056c0b5e1 64
frankvnk 0:636056c0b5e1 65 protected:
frankvnk 0:636056c0b5e1 66
frankvnk 0:636056c0b5e1 67 virtual int _putc(int value);
frankvnk 0:636056c0b5e1 68 virtual int _getc();
frankvnk 0:636056c0b5e1 69
frankvnk 0:636056c0b5e1 70 // character location
frankvnk 0:636056c0b5e1 71 uint16_t _column;
frankvnk 0:636056c0b5e1 72 uint16_t _row;
frankvnk 0:636056c0b5e1 73
frankvnk 0:636056c0b5e1 74 // colours
frankvnk 0:636056c0b5e1 75 uint16_t _foreground;
frankvnk 0:636056c0b5e1 76 uint16_t _background;
frankvnk 0:636056c0b5e1 77 char *_path;
frankvnk 0:636056c0b5e1 78 };
frankvnk 0:636056c0b5e1 79
frankvnk 0:636056c0b5e1 80 #endif