parser sample for udenokai

Dependencies:   TextLCD csv_parser mbed SDFileSystem

Files at this revision

API Documentation at this revision

Comitter:
marishi
Date:
Fri Jun 10 18:58:46 2011 +0000
Commit message:

Changed in this revision

FATFileSystem.lib Show annotated file Show diff for this revision Revisions of this file
SDFileSystem.lib Show annotated file Show diff for this revision Revisions of this file
TextLCD.lib Show annotated file Show diff for this revision Revisions of this file
csv_parser.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.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/FATFileSystem.lib	Fri Jun 10 18:58:46 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_unsupported/code/fatfilesystem/
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SDFileSystem.lib	Fri Jun 10 18:58:46 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/SDFileSystem/#b1ddfc9a9b25
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Fri Jun 10 18:58:46 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#e4cb7ddee0d3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csv_parser.lib	Fri Jun 10 18:58:46 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/hlipka/code/csv_parser/#7c9aa931c67c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jun 10 18:58:46 2011 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+#include "csv_parser.h"
+#include "TextLCD.h"
+#include "SDFileSystem.h"
+#include <map>
+#include <iostream>
+
+SDFileSystem sd(p5, p6, p7, p8, "sd");
+TextLCD lcd(p24, p26, p27, p28, p29, p30);
+
+using namespace std;
+
+int main()
+{
+    map<string,string> names;
+    
+    csv_parser csv;
+    csv.init("/sd/mydir/koi.csv");
+    
+    while(csv.has_more_rows()){
+        csv_row row = csv.get_row();
+        names.insert( make_pair( row[0] , row[1] ) );
+    }
+    
+    for(;;){
+        string str;
+        cin >> str;
+        if( str == "exit" ) break;
+        
+        lcd.cls();
+        lcd.printf( names[str].c_str() );
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jun 10 18:58:46 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912