Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:663dd0dc4636, committed 2010-07-26
- Comitter:
- dadaista
- Date:
- Mon Jul 26 15:00:51 2010 +0000
- Commit message:
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/EthernetNetIf.lib Mon Jul 26 15:00:51 2010 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/donatien/code/EthernetNetIf/#bc7df6da7589
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HTTPClient.lib Mon Jul 26 15:00:51 2010 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/donatien/code/HTTPClient/#d97a4fc01c86
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/HTTPClientExample.cpp Mon Jul 26 15:00:51 2010 +0000
@@ -0,0 +1,53 @@
+#include "mbed.h"
+#include "EthernetNetIf.h"
+#include "HTTPClient.h"
+
+//EthernetNetIf eth;
+HTTPClient http;
+DigitalOut led1(LED1);
+DigitalOut led2(LED4);
+
+int main() {
+
+ printf("Setting up...\n");
+
+ EthernetNetIf eth(
+ IpAddr(10,0,0,20), //IP Address
+ IpAddr(255,0,0,0), //Network Mask
+ IpAddr(10,0,0,1), //Gateway
+ IpAddr(10,0,0,1) //DNS
+ );
+
+
+ EthernetErr ethErr = eth.setup();
+ if(ethErr)
+ {
+ printf("Error %d in setup.\n", ethErr);
+ return -1;
+ }
+ printf("Setup OK\n");
+
+ HTTPText txt;
+
+ HTTPResult r = http.get("http://10.0.0.1/", &txt);
+ if(r==HTTP_OK)
+ {
+ printf("GET Result :\"%s\"\n", txt.gets());
+ led1=1;
+ led2=1;
+ }
+ else
+ {
+ printf("Error %d\n", r);
+ led1=0;
+ led2=1;
+ }
+
+ while(1)
+ {
+ //printf("ciao");
+ }
+
+ return 0;
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Jul 26 15:00:51 2010 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9114680c05da