HTTP File Server using SD Card for Arch Max

Dependencies:   EthernetInterface SDFileSystem mbed-rtos mbed

Fork of HTTP_SDcard_file_server by Ivan Georgiev

Files at this revision

API Documentation at this revision

Comitter:
yihui
Date:
Wed Apr 22 14:15:05 2015 +0000
Parent:
0:fbb29d9ea96b
Child:
2:27a5e2b422ee
Commit message:
small changes for Arch Max

Changed in this revision

EthernetInterface.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 annotated file Show diff for this revision Revisions of this file
--- a/EthernetInterface.lib	Sun Apr 07 11:23:03 2013 +0000
+++ b/EthernetInterface.lib	Wed Apr 22 14:15:05 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/EthernetInterface/#9b2d10dc0392
+http://mbed.org/users/mbed_official/code/EthernetInterface/#2fc406e2553f
--- a/main.cpp	Sun Apr 07 11:23:03 2013 +0000
+++ b/main.cpp	Wed Apr 22 14:15:05 2015 +0000
@@ -11,7 +11,7 @@
 #define PORT    80
 
 Serial pc (USBTX,USBRX);    // tx, rx
-SDFileSystem sd(p5, p6, p7, p8, "wfs"); // the pinout on the mbed
+SDFileSystem sd(SD_MOSI, SD_MISO, SD_SCK, SD_CS, "wfs"); // the pinout on the mbed
 
 char sMethod[7];
 char sURL[250];
@@ -174,11 +174,11 @@
     sentBuffer[0]=NULL;
     sprintf(line_response,"<!DOCTYPE html>\r\n<html>\n<head><title>Index of %s</title>\n",path);
     snprintf(&(sentBuffer[strlen(sentBuffer)]),sizeof(sentBuffer),"%s",line_response); //append to buffer
-    
+
     sprintf(line_response,"<meta content=\"text/html; charset=iso-8859-1\" http-equiv=\"Content-Type\"></head>\n");
     snprintf(&(sentBuffer[strlen(sentBuffer)]),sizeof(sentBuffer),"%s",line_response); //append to buffer
-    
-    
+
+
     sprintf(line_response,"<body><center>\n<h3>Index of %s</h3>\n", path);
     snprintf(&(sentBuffer[strlen(sentBuffer)]),sizeof(sentBuffer),"%s",line_response); //append to buffer
     send_HTML_line(sentBuffer, strlen(sentBuffer));
@@ -300,13 +300,13 @@
 
 int main()
 {
-
+    printf("\r\n---- HTTP Server ----\r\n");
 
     ledTick.attach(&ledTickfunc,0.5);
     //ledTick.detach();
     //setup ethernet interface
-    //eth.init(); //Use DHCP
-    eth.init(IP,MASK,GATEWAY);  //IP,mask,Gateway
+    eth.init(); //Use DHCP
+    // eth.init(IP,MASK,GATEWAY);  //IP,mask,Gateway
     eth.connect();
     printf("IP Address is %s\n\r", eth.getIPAddress());
 
--- a/mbed-rtos.lib	Sun Apr 07 11:23:03 2013 +0000
+++ b/mbed-rtos.lib	Wed Apr 22 14:15:05 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed-rtos/#53e6cccd8782
+http://mbed.org/users/mbed_official/code/mbed-rtos/#34292fba723c
--- a/mbed.bld	Sun Apr 07 11:23:03 2013 +0000
+++ b/mbed.bld	Wed Apr 22 14:15:05 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/5e5da4a5990b
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889
\ No newline at end of file