Simple web browser.

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

Fork of uVGAII_demo by jim hamblen

Committer:
yaolu23
Date:
Wed Mar 12 16:19:42 2014 +0000
Revision:
3:5ea5b724297b
Parent:
2:967fc3249172
library for uVGAII WebBrowser

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yaolu23 2:967fc3249172 1 #include "mbed.h"
yaolu23 2:967fc3249172 2 #include "BasicWeb.h"
yaolu23 2:967fc3249172 3 #include "PS2Keyboard.h"
4180_1 0:cfcf73272647 4
yaolu23 2:967fc3249172 5 BasicWeb web(p9, p10, p8); // tx, rx, reset
yaolu23 2:967fc3249172 6 PS2Keyboard kb(p12, p11); // clk, data
4180_1 0:cfcf73272647 7
4180_1 0:cfcf73272647 8 int main() {
yaolu23 2:967fc3249172 9
yaolu23 2:967fc3249172 10 PS2Keyboard::keyboard_event_t evt_kb;
4180_1 1:38ef731c7bdf 11
yaolu23 2:967fc3249172 12 web.browser(); // display browser page
yaolu23 2:967fc3249172 13
yaolu23 2:967fc3249172 14 // read in keys
yaolu23 2:967fc3249172 15 while(1){
yaolu23 2:967fc3249172 16 if(kb.processing(&evt_kb)){
yaolu23 2:967fc3249172 17 if(evt_kb.length == 1){
yaolu23 2:967fc3249172 18 web.newKey(evt_kb.scancode[0]);
yaolu23 2:967fc3249172 19 }else if(evt_kb.length == 2){
yaolu23 2:967fc3249172 20 web.modKey(evt_kb.scancode[0], evt_kb.scancode[1]);
yaolu23 2:967fc3249172 21 }
yaolu23 2:967fc3249172 22 }
yaolu23 2:967fc3249172 23 }
yaolu23 2:967fc3249172 24
yaolu23 2:967fc3249172 25 }