Simple web browser.

Dependencies:   4DGL BasicWeb EthernetInterface HTTPClient PS2 mbed-rtos mbed

Fork of uVGAII_demo by jim hamblen

Files at this revision

API Documentation at this revision

Comitter:
yaolu23
Date:
Wed Mar 12 16:17:28 2014 +0000
Parent:
1:38ef731c7bdf
Child:
3:5ea5b724297b
Commit message:
Commit all libraries.

Changed in this revision

4DGL.lib Show annotated file Show diff for this revision Revisions of this file
BasicWeb.lib Show annotated file Show diff for this revision Revisions of this file
EthernetInterface.lib Show annotated file Show diff for this revision Revisions of this file
HTTPClient.lib Show annotated file Show diff for this revision Revisions of this file
PS2.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show diff for this revision Revisions of this file
mbed.lib Show annotated file Show diff for this revision Revisions of this file
--- a/4DGL.lib	Fri Feb 25 01:59:37 2011 +0000
+++ b/4DGL.lib	Wed Mar 12 16:17:28 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/Kerpower/code/4DGL/#6063b076187b
+http://mbed.org/users/Kerpower/code/4DGL/#cc9c742bb1a0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BasicWeb.lib	Wed Mar 12 16:17:28 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/yaolu23/code/BasicWeb/#5f688bcc92b9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EthernetInterface.lib	Wed Mar 12 16:17:28 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/EthernetInterface/#dd9794ce1d64
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HTTPClient.lib	Wed Mar 12 16:17:28 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/donatien/code/HTTPClient/#1f743885e7de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PS2.lib	Wed Mar 12 16:17:28 2014 +0000
@@ -0,0 +1,1 @@
+PS2#33c8907eb27a
--- a/main.cpp	Fri Feb 25 01:59:37 2011 +0000
+++ b/main.cpp	Wed Mar 12 16:17:28 2014 +0000
@@ -1,60 +1,25 @@
-//
-// TFT_4DGL is a class to drive 4D Systems TFT touch screens
-//
-// Copyright (C) <2010> Stephane ROCHON <stephane.rochon at free.fr>
-//
-// TFT_4DGL is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// TFT_4DGL is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with TFT_4DGL.  If not, see <http://www.gnu.org/licenses/>.
+#include "mbed.h"
+#include "BasicWeb.h"
+#include "PS2Keyboard.h"
 
-#include "mbed.h"
-#include "TFT_4DGL.h"
-
-// overwrite 4DGL library screen size settings in TFT_4DGL.h
-#define SIZE_X  479
-#define SIZE_Y  639
-//
-
-TFT_4DGL ecran(p9,p10,p11); // serial tx, serial rx, reset pin;
+BasicWeb web(p9, p10, p8);      // tx, rx, reset
+PS2Keyboard kb(p12, p11);       // clk, data
 
 int main() {
-//    char s[500];
-//    int x = 0, y = 0, status, xc = 0, yc = 0;
+
+    PS2Keyboard::keyboard_event_t evt_kb;
 
-    ecran.baudrate(115200);
-// added - Set Display to 640 by 480 mode
-    ecran.display_control(0x0c, 0x01);
-//
-    ecran.background_color(DGREY);
-    ecran.circle(120, 160, 80, 0xFF00FF);
-    ecran.triangle(120, 100, 40, 300, 200, 270, 0x0000FF);
-    ecran.line(0, 0, 239, 319, 0xFF0000);
-    ecran.rectangle(50, 50, 200, 90, 0x00FF00);
-    ecran.ellipse(100, 250, 80, 30, 0xFFFF00);
-    ecran.pixel(120, 160, BLACK);
-    ecran.read_pixel(120, 170);
-    ecran.screen_copy(50, 50, 200, 200, 100, 100);
-    ecran.pen_size(WIREFRAME);
-    ecran.circle(120, 160, 60, BLACK);
-    ecran.set_font(FONT_8X8);
-    ecran.text_mode(TRANSPARENT);
-    ecran.text_char('B', 9, 8, BLACK);
-    ecran.text_char('I',10, 8, BLACK);
-    ecran.text_char('G',11, 8, BLACK);
-    ecran.graphic_char('G', 120, 120, BLACK, 4, 4);
-    ecran.text_string("This is a test of string", 2, 12, FONT_8X8, WHITE);
-    ecran.graphic_string("This is a test of graphic string", 20, 200, FONT_8X8, WHITE, 2, 2);
-    ecran.text_button("OK", UP, 40, 260, 0xFF0000, FONT_8X8, BLACK, 2, 2);
-
-  // delete touch screen demo - no touch on uVGA II
-
-}
\ No newline at end of file
+    web.browser();      // display browser page
+    
+    // read in keys
+    while(1){
+        if(kb.processing(&evt_kb)){
+            if(evt_kb.length == 1){
+                web.newKey(evt_kb.scancode[0]);
+            }else if(evt_kb.length == 2){
+                web.modKey(evt_kb.scancode[0], evt_kb.scancode[1]);
+            }
+        }
+    }
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rtos.lib	Wed Mar 12 16:17:28 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed-rtos/#53e6cccd8782
--- a/mbed.bld	Fri Feb 25 01:59:37 2011 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/9114680c05da
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.lib	Wed Mar 12 16:17:28 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/#3d0ef94e36ec