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.
main.cpp
00001 #include "mbed.h" 00002 #include "iniparser.h" 00003 00004 /* iniparser - an INI file parser under mit licence. 00005 url: http://ndevilla.free.fr/iniparser/ 00006 doc: http://ndevilla.free.fr/iniparser/html/index.html 00007 */ 00008 00009 #if 0 // content of foo.txt 00010 [sec1] 00011 foo = bar ; command 00012 quax = 42 00013 00014 [sec2] 00015 foo = 0; nope 00016 #endif 00017 00018 DigitalOut myled(LED1); 00019 LocalFileSystem local("local"); 00020 int main() { 00021 dictionary *dir = iniparser_load("/local/foo.txt"); 00022 printf("sec1: %s\n", iniparser_getstring(dir, "sec1:foo", "default")); 00023 printf("sec2: %d\n", iniparser_getint(dir, "sec2:foo", 42)); 00024 while(1) { 00025 myled = 1; 00026 wait(0.2); 00027 myled = 0; 00028 wait(0.2); 00029 } 00030 }
Generated on Thu Jul 14 2022 07:58:10 by
1.7.2